// Calculate the highest high and lowest low over the past 20 bars
double highestHigh = MAX(High, 20)[0];
double lowestLow = MIN(Low, 20)[0];
// Calculate the average of the highest high and lowest low
double hllAverage = (highestHigh + lowestLow) / 2;
// Calculate the closing price minus the average of the highest high and lowest low
double closeMinusHllAverage = Close[0] - hllAverage;
linreg = LinReg(closeMinusHllAverage, 20);
I get the below error:
| The best overloaded method match for 'NinjaTrader.NinjaScript.Strategies.Strategy.LinRe g(NinjaTrader.NinjaScript.ISeries<double>, int)' has some invalid arguments | CS1502 |
| Argument 1: cannot convert from 'double' to 'NinjaTrader.NinjaScript.ISeries<double>' | CS1503 |

Comment