Add long-term trend period parameter to Internal Bar Strength Band strategy

This commit is contained in:
moshferatu 2024-11-16 06:48:56 -08:00
parent 300b2fb5b2
commit 4b1d873ebf

View File

@ -25,6 +25,7 @@ namespace NinjaTrader.NinjaScript.Strategies
LowerBandMultiplier = 2.5;
IBSEntryThreshold = 0.3;
LongTermTrendPeriod = 200;
}
else if (State == State.DataLoaded)
{
@ -33,7 +34,7 @@ namespace NinjaTrader.NinjaScript.Strategies
ibs = InternalBarStrength();
highestHigh = MAX(High, 10);
highMinusLowAverage = SMA(highMinusLow, 25);
longTermTrend = SMA(200); // Regime filter.
longTermTrend = SMA(LongTermTrendPeriod);
}
}
@ -64,5 +65,9 @@ namespace NinjaTrader.NinjaScript.Strategies
[NinjaScriptProperty]
[Display(Name = "IBS Entry Threshold", GroupName = "Internal Bar Strength Band Bot", Order = 2)]
public double IBSEntryThreshold { get; set; }
[NinjaScriptProperty]
[Display(Name = "Long-Term Trend Period", GroupName = "Internal Bar Strength Band Bot", Order = 3)]
public int LongTermTrendPeriod { get; set; }
}
}