How to display a time tag for a vertical line?

Created at 22 Apr 2022, 17:54
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!
Capt.Z-Fort.Builder's avatar

Capt.Z-Fort.Builder

Joined 03.06.2020

How to display a time tag for a vertical line?
22 Apr 2022, 17:54


Hello, 

I know how to draw a vertical line in a chart.

ChartVerticalLine _verticalLine = Chart.DrawVerticalLine("Vert.Line", timeValue, Color.LightSkyBlue, 1, LineStyle.Dots); 

But I want to know how to make the vertical line always display its time tag, like pressing down the mouse middle wheel, the crosshair will show the time tag at X-axis always? 

Please advise,

Thanks.


@Capt.Z-Fort.Builder
Replies

amusleh
25 Apr 2022, 13:14

Hi,

To show the time on x axis you have to set the line IsInteractive property to true.


@amusleh

Capt.Z-Fort.Builder
25 Apr 2022, 13:34

RE:

Oh, thanks.  I just realised.

Generally, if the object in chart is IsInteractive = True, is there any way to get rid of the highlight when the mouse hovers over? Maybe not, I guess...

 

amusleh said:

Hi,

To show the time on x axis you have to set the line IsInteractive property to true.

 


@Capt.Z-Fort.Builder

amusleh
26 Apr 2022, 09:12

RE: RE:

TheNiatpac said:

Oh, thanks.  I just realised.

Generally, if the object in chart is IsInteractive = True, is there any way to get rid of the highlight when the mouse hovers over? Maybe not, I guess...

 

amusleh said:

Hi,

To show the time on x axis you have to set the line IsInteractive property to true.

 

Hi,

You can try setting the IsLocked property of object to True, this will lock the object and user will not be able to update the object unless it's unlocked.


@amusleh

Capt.Z-Fort.Builder
26 Apr 2022, 12:27

RE: RE: RE:

Oh, yes, I tried locking the object, but the highlight is still there when hovering over it. Anyway, it's a tiny issue here.   

Thanks for the reply again. :)

amusleh said:

TheNiatpac said:

Oh, thanks.  I just realised.

Generally, if the object in chart is IsInteractive = True, is there any way to get rid of the highlight when the mouse hovers over? Maybe not, I guess...

 

amusleh said:

Hi,

To show the time on x axis you have to set the line IsInteractive property to true.

 

Hi,

You can try setting the IsLocked property of object to True, this will lock the object and user will not be able to update the object unless it's unlocked.

 


@Capt.Z-Fort.Builder