Indicator Line Color Per Bar

Created at 05 Mar 2020, 07:34
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!
K1

K100

Joined 04.11.2018

Indicator Line Color Per Bar
05 Mar 2020, 07:34


Hi,

Is it possible to set the color of a parameter line output per bar ?

I would like to allow another variable to influence the line color on a per bar basis. 

I thought that if it isn't possible to influence the line color per bar, i could use:

IndicatorArea.DrawTrendLine(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness, LineStyle lineStyle)

And draw a trend line per index. But with 7 lines and approximately indexing 2500 bars - will this cause an issue ?

Thanks

 

 


@K100
Replies

PanagiotisCharalampous
05 Mar 2020, 08:40

Hi Hans,

No there is no such option. Another approach would be to use multiple IndicatorDataSeries with different color on each and add values only to the series with the relevant color each time.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

K100
05 Mar 2020, 09:30

RE:

PanagiotisCharalampous said:

Hi Hans,

No there is no such option. Another approach would be to use multiple IndicatorDataSeries with different color on each and add values only to the series with the relevant color each time.

Best Regards,

Panagiotis 

Join us on Telegram

 

Thanks.


@K100