I have written a simple custom Indicator:
_ema = Indicators.ExponentialMovingAverage(Source, Period);
_ema1 = Indicators.ExponentialMovingAverage(Source, Period1);
And I referenced it in my algorithm:
_diff = Indicators.GetIndicator<Difference>(Bars.ClosePrices);
but as soon as I add a condition:
_diff.Result.Last() > DMAX &&
I get an error in Backtest:
Crashed in OnStart with ArgumentException: Incorrect parameters count. Parameter name: parameterValues
I understand that it is me not defining the right parameters, but am unsure what I am missing as everything else is defined in the Indicator itself?