Plot chart icons in an indicator
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!