diff --git a/strategies/trading-new-highs/TradingNewHighs.cs b/strategies/trading-new-highs/TradingNewHighs.cs index 0b2d251..67ff55c 100644 --- a/strategies/trading-new-highs/TradingNewHighs.cs +++ b/strategies/trading-new-highs/TradingNewHighs.cs @@ -5,16 +5,16 @@ using System.ComponentModel.DataAnnotations; namespace NinjaTrader.NinjaScript.Strategies { - public class TradingNewHighs : Strategy - { - private const int FiftyTwoWeeksInDays = 252; + public class TradingNewHighs : Strategy + { + private const int FiftyTwoWeeksInDays = 252; private ConnorsRSI connorsRSI; protected override void OnStateChange() - { - if (State == State.SetDefaults) - { + { + if (State == State.SetDefaults) + { Name = "Trading New Highs"; Description = @"Taken from chapter 7 of Buy the Fear, Sell the Greed (2018) by Larry Connors"; Calculate = Calculate.OnBarClose; @@ -24,14 +24,14 @@ namespace NinjaTrader.NinjaScript.Strategies EntryThreshold = 15; ExitThreshold = 70; } - else if (State == State.DataLoaded) - { - connorsRSI = ConnorsRSI(3, 1, 2, 1, 100); + else if (State == State.DataLoaded) + { + connorsRSI = ConnorsRSI(3, 2, 100); } - } + } - protected override void OnBarUpdate() - { + protected override void OnBarUpdate() + { if (CurrentBar < FiftyTwoWeeksInDays) return;