Make Drawing Interactive When Mouse Hover

Created at 28 Feb 2022, 23:07
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
FV

FVAp

Joined 11.05.2020

Make Drawing Interactive When Mouse Hover
28 Feb 2022, 23:07


I created a custom Anchored Vwap and I use `Chart.DrawVerticalLine` to draw a line and move the custom Anchored VWAP.

I would like to make this VerticalLine interactive ONLY when the indicator is hovered over or selected. Is it possible?


@FVAp
Replies

amusleh
01 Mar 2022, 09:14

Hi,

The mouse hover event for objects only works if the object is interactive, so if you are using this event and if you make your object non interactive then it will not work.

You can use combination of lock and interactive, set object IsLocked to True unless mouse hover over it.


@amusleh