Remove RSI smoothing parameters from ConnorsRSI indicator in Trading New Highs strategy

This commit is contained in:
moshferatu 2025-01-09 08:37:44 -08:00
parent 4e20777d93
commit 26e05c6ec2

View File

@ -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;