identify by code a vertical line

Created at 21 May 2020, 18:52
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!
EY

eynt

Joined 08.05.2020

identify by code a vertical line
21 May 2020, 18:52


Is there a way to identify by code a vertical line that was placed on the chart manually?

 

Thanks


@eynt
Replies

PanagiotisCharalampous
22 May 2020, 08:04

Hi Yuval,

Try something like the below

            foreach (var obj in Chart.Objects)
            {
                if (obj is ChartVerticalLine)
                {
                    // Do something
                }
            }

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

eynt
22 May 2020, 11:03

RE:

Thank you.

Once I discovered such an object how can I remove it from the chart?


@eynt

PanagiotisCharalampous
25 May 2020, 08:27

Hi Yuval,

Check RemoveObject().

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous