Get dynamic indicator color

Created at 19 Sep 2017, 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!
FE

feltoti.denes

Joined 19.09.2017

Get dynamic indicator color
19 Sep 2017, 12:17


Hi!

I am making a Currency Strength Indicator using RSI, and I'm in trouble coloring a the currency indicator's label. The graph color value is dynamic, but I can't get it to color its label (so I use a predefined color). It is a little bit bad UX because if the user changes one of the currency graph colors the label color not aligned.

Is it possible to get the custom graph color to use it for the label?

Thanks for your help!

        
// I'd like to get the highlighted dynamic color value in this block.
private void ShowCSIOutput(String currency, IndicatorDataSeries result, int index, Index idx, int textY)
        {
            result[index] = GetRSI(idx, index);

            if (is_show_value)
            {

                string text = string.Format("{0} {1}", currency, Math.Round(result[index], 2));

                ChartObjects.DrawText(currency, text, index + 1, textY, VerticalAlignment.Center, HorizontalAlignment.Right, idx.Color);
            }
        }


@feltoti.denes
Replies

Spotware
19 Sep 2017, 14:47

Dear Trader,

Thanks for posting your question in the forum. Unfortunately, currently there is no way to get the graph color of an IndicatorDataSeries from within a cBot. 

Best Regards,

cTrader Team


@Spotware