PlotType.Line with breaks in it. Is it possible?

Created at 11 Jun 2013, 12:17
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!
FR

FrankMan

Joined 11.06.2013

PlotType.Line with breaks in it. Is it possible?
11 Jun 2013, 12:17


I'm currently implementing a line indicator which does not have values for every bar. Basically, I have data for a few bars, then NaN, then more data. I would like to also have a Line on the chart which is drawn for a few bars, then nothing, then it appears again.

Currently, PlotType.Line draws a line between the last point in the first series and the first point in the last data series. Is there any option to correct this behavior?

I have tried using the dot series plot type and it kind'of works but I like straight lines more.


@FrankMan
Replies

cAlgo_Fanatic
11 Jun 2013, 12:31

You can implement this with the ChartObjects.DrawLine methods.
See more examples here.


@cAlgo_Fanatic

FrankMan
11 Jun 2013, 14:18

RE:

cAlgo_Fanatic said:

You can implement this with the ChartObjects.DrawLine methods.
See more examples here.

It's not as east as simply setting the PlotType but it works. Thanks for the suggestion, I managed to get it to work. I do have one more question regarding chart objects. How would I go about setting the object color as an external user input? I've also posted this question in the thread you pointed out (Drawing Lines /forum/whats-new/913).


@FrankMan