I switch Price Data Tooltips on or off multiple times every day, using Preferences, Miscellaneous, Display options.
It would be nice to have a quick key to do this.
However, when I tried to set up a quick key I could not find Price Data Tooltips anywhere in Tools, Customise, Keyboard.
Any thoughts?
Apply this code then click CTRL+R
to turn on off.
toolOnOff = ParamToggle("ToolTip", "ON|OFF", 1);
SetChartOptions( 1, chartShowDates | chartShowArrows | chartWrapTitle | (chartDisableTooltips*toolOnOff) );
Plot( C, "Price", colorDefault, styleCandle );
Thanks fxshrat,
Ctrl+R brings up the Parameters in which you can now toggle ToolTips on or off. However it still requires several clicks.
Dear Tomasz or fxshrat,
Please would you put "Price data tooltips" on the View toolbar of an Amibroker update?
An alternative is to put it in Tools, Customize, Keyboard, View so we can set up a quick key.
Thanks
IMPORTANT NOTE:
I am not employee at amibroker.com.
So do not ask me to add/update internal AmiBroker features.
Only AmiBroker.com can add/update features of its main software.
So rather go to their feedback center.
AmiBroker - Members only zone
If you do not want to use parameter window then you may use mouse and keybord state AFL functions.
So in the code below you have to use left mouse button plus CTRL key to turn tooltip on/off per pan.
/// @link https://forum.amibroker.com/t/price-data-tooltips-quick-key/26602/5
gcmb = GetCursorMouseButtons();
LMB = gcmb == 9;
CTRL = GetAsyncKeyState(17) < 0;
hot_key = LMB AND CTRL;
off = Nz(StaticVarGet("ToolTip_OFF"));
if ( hot_key AND off == 0 ) {
StaticVarSet("ToolTip_OFF", 1);
Say("Tool tip OFF.");
} else if ( hot_key AND off == 1 ) {
StaticVarSet("ToolTip_OFF", 0);
Say("Tool tip ON.");
}
toolOff = Nz(StaticVarGet("ToolTip_OFF"));
printf("Tooltip OFF? %g\n", toolOff);
SetChartOptions( 1, chartShowDates | chartShowArrows | chartWrapTitle | (chartDisableTooltips*toolOff) );
Plot( C, "Price", colorDefault, styleCandle );
//RequestMouseMoveRefresh();
Thank you again fxshrat for sharing your great expertise.
I'll make that suggestion in the feedback centre.
Instead of Price data tooltips, consider using Data Window (Window->Data Window). It can be made floating and it is accessible via Keyboard customization.
But anyway, I will add option to add custom keyboard key for DataTips.
This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.