im trying to add a Plot to my strategy which will draw a new indicator (when running the strategy).
I added a line to initialize():
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line,"MyPlot"));
and later on in OnBarUpdate() I would like to set my required values (e.g. from an array the I have):
MyPlot.Set(myArray[i]);
when im trying to compile im getting this error (related to the Add func):
The best overloaded method match for The best overloaded method match for 'NinjaTrader.Strategy.StrategyBase.Add(NinjaTrader .Indicator.IndicatorBase)' has some invalid arguments
Argument '1': cannot convert from 'NinjaTrader.Gui.Chart.Plot' to 'NinjaTrader.Indicator.IndicatorBase'
would highly appreciate your help.
BTW - I don't want to create a different 'indicator' for that. i'd like it to be coded within my current strategy
Comment