Plot chart icons in an indicator

Created at 01 Sep 2020, 01: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!
TA

tabehan

Joined 01.09.2020

Plot chart icons in an indicator
01 Sep 2020, 01:34


Hi

I'd like to be able to plot Symbols or chart icons along a line, this would making porting from MQL to cTrader a lot easier, perhaps additions to the Output attributes could be...

// Long Signal
[Output("Long signal", LineColor = "DodgerBlue", Thickness = 2, LineIcon = ChartIconType.UpArrow, PlotType = PlotType.ChartIcon)]
public IndicatorDataSeries LongSignal { get; set; }

// Short Signal
[Output("Short signal", LineColor = "Red", Thickness = 2, LineIcon = ChartIconType.DownArrow, PlotType = PlotType.ChartIcon)]
public IndicatorDataSeries ShortSignal { get; set; }


Then in Calculate()...

...

 LongSignal[index] = price; // Plot an arrow at this price

...

 ShortSignal[index] = Double,NaN; // No arrow plot here

...

Thanks for your consideration!

 

 


cTrader Automate
@tabehan