I generated a shell indicator using the Wizard, did not specify any input parameters and only 1 plot series, all of which compiled clean. However when I attempted to include the calling indicator following the example in the BoolSeriesSample (which is a strategy) I encountered 2 compile errors. The format of the Add as per the sample is:
Add(myIndicator());
The error messages I received are:
1. Indicator\MyCustomIndicator.cs The best overloaded method match for 'NinjaTrader.Indicator.IndicatorBase.Add(NinjaTrad er.Gui.Chart.Line)' has some invalid arguments CS1502
2. Indicator\MyCustomIndicator.cs Argument '1': cannot convert from 'NinjaTrader.Indicator.myIndicator' to 'NinjaTrader.Gui.Chart.Line' CS1503
As best as I can determine a parameter needs to be included in the Add (I tried “void” with no success). Mousing over the indicator name displays a tip box which indicates there is +1 overload available. Unlike others that I’ve seen that allow one to scroll though the various overloads available this tip box disappears as soon as the mouse is moved.
I gather that the overload is generate when the called indicator is compiled and the necessary arguments are somehow determined.
So, all that said:
- how do I determine what needs to be included in the Add method, and
- if parameters are passed to the called indicator will they override it’s current settings (which I do not want)?
I am neither a NinjaScript or C# programmer so I appreciate any given help.
Thank you
Comment