diff --git a/strategies/connors-rsi/ConnorsRSIBot.cs b/strategies/connors-rsi/ConnorsRSIBot.cs index 154f1a6..5d32b20 100644 --- a/strategies/connors-rsi/ConnorsRSIBot.cs +++ b/strategies/connors-rsi/ConnorsRSIBot.cs @@ -1,6 +1,7 @@ #region Using declarations using NinjaTrader.Cbi; using NinjaTrader.NinjaScript.Indicators; +using System; using System.ComponentModel.DataAnnotations; #endregion @@ -39,7 +40,7 @@ namespace NinjaTrader.NinjaScript.Strategies protected override void OnBarUpdate() { - if (CurrentBar < 200) + if (CurrentBar < Math.Max(LongTermTrendPeriod, PercentRankPeriod)) return; if (Close[0] > longTermTrend[0] && connorsRSI[0] < 15)