Make the true range series lookback infinite in order to facilitate backtesting over larger date ranges

This commit is contained in:
moshferatu 2024-07-28 05:17:15 -07:00
parent f9b4da8b4a
commit 89669bd022

View File

@ -37,7 +37,7 @@ namespace NinjaTrader.NinjaScript.Indicators
} }
else if (State == State.DataLoaded) else if (State == State.DataLoaded)
{ {
trueRange = new Series<double>(this); trueRange = new Series<double>(this, MaximumBarsLookBack.Infinite);
maxRange = MAX(trueRange, TrueRangeLookback); maxRange = MAX(trueRange, TrueRangeLookback);
minRange = MIN(trueRange, TrueRangeLookback); minRange = MIN(trueRange, TrueRangeLookback);