Mouse over text for the IndicatorArea
Mouse over text for the IndicatorArea
21 Mar 2021, 10:00
How can I display some custom text when the mouse rolls over an IndicatorDataSeries Output on a indicator area? In other words, the IsOverlay is set to false for the indicator.
Replies
lec0456
21 Mar 2021, 17:45
RE:
lec0456 said:
How can I display some custom text when the mouse rolls over an IndicatorDataSeries Output on a indicator area? In other words, the IsOverlay is set to false for the indicator.
It does not appear that the Output Series' are considered objects on the chart. because if I place: Print("objects:"+obj.ChartArea.Objects.Count); in the MouseMove event it returns zero.
@lec0456
amusleh
21 Mar 2021, 18:14
RE: RE:
lec0456 said:
Thanks, but what i am really looking for it that the tooltip appears when the mouse rolls over the Output line. So, if Main is the moving average, when you rollover main it displays the text at the point you rolled over the line.
The sample I posted does the same thing, please test.
@amusleh
amusleh
21 Mar 2021, 13:16
Hi,
This sample indicator might help you:
The only issue with sample is tolerance parameter, you have to find a way to calculate a good tolerance that works well for all symbols and outputs, you can do it by using an output x previous values average difference or change, or you can use percentage change in output.
If the tooltips is not showing for some very volatile symbols like BTCUSD then try to increase the tolerance.
There might be other better ways to achieve this but right now this is the only option in my mind.
@amusleh