Add high minus low period parameter to Internal Bar Strength Band strategy

This commit is contained in:
moshferatu 2024-11-16 06:52:52 -08:00
parent f7352cc976
commit a81ac688f4

View File

@ -26,6 +26,7 @@ namespace NinjaTrader.NinjaScript.Strategies
LowerBandMultiplier = 2.5;
IBSEntryThreshold = 0.3;
RollingHighPeriod = 10;
HighMinusLowPeriod = 25;
LongTermTrendPeriod = 200;
}
else if (State == State.DataLoaded)
@ -34,7 +35,7 @@ namespace NinjaTrader.NinjaScript.Strategies
ibs = InternalBarStrength();
highestHigh = MAX(High, RollingHighPeriod);
highMinusLowAverage = SMA(highMinusLow, 25);
highMinusLowAverage = SMA(highMinusLow, HighMinusLowPeriod);
longTermTrend = SMA(LongTermTrendPeriod);
}
}
@ -72,7 +73,11 @@ namespace NinjaTrader.NinjaScript.Strategies
public int RollingHighPeriod { get; set; }
[NinjaScriptProperty]
[Display(Name = "Long-Term Trend Period", GroupName = "Internal Bar Strength Band Bot", Order = 4)]
[Display(Name = "High Minus Low Period", GroupName = "Internal Bar Strength Band Bot", Order = 4)]
public int HighMinusLowPeriod { get; set; }
[NinjaScriptProperty]
[Display(Name = "Long-Term Trend Period", GroupName = "Internal Bar Strength Band Bot", Order = 5)]
public int LongTermTrendPeriod { get; set; }
}
}