From 26e05c6ec2c195ac98e675de812860e4aef995bc Mon Sep 17 00:00:00 2001 From: moshferatu Date: Thu, 9 Jan 2025 08:37:44 -0800 Subject: [PATCH] Remove RSI smoothing parameters from ConnorsRSI indicator in Trading New Highs strategy --- .../trading-new-highs/TradingNewHighs.cs | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) 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;