Add ConnorsRSI parameters to Trading New Highs strategy
This commit is contained in:
parent
34e5a701b0
commit
15c7873b2c
@ -21,12 +21,15 @@ namespace NinjaTrader.NinjaScript.Strategies
|
|||||||
EntriesPerDirection = 1;
|
EntriesPerDirection = 1;
|
||||||
|
|
||||||
MaxDaysSinceHigh = 20;
|
MaxDaysSinceHigh = 20;
|
||||||
|
RSIPeriod = 3;
|
||||||
|
StreakRSIPeriod = 2;
|
||||||
|
PercentRankPeriod = 100;
|
||||||
EntryThreshold = 15;
|
EntryThreshold = 15;
|
||||||
ExitThreshold = 70;
|
ExitThreshold = 70;
|
||||||
}
|
}
|
||||||
else if (State == State.DataLoaded)
|
else if (State == State.DataLoaded)
|
||||||
{
|
{
|
||||||
connorsRSI = ConnorsRSI(3, 2, 100);
|
connorsRSI = ConnorsRSI(RSIPeriod, StreakRSIPeriod, PercentRankPeriod);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,11 +55,23 @@ namespace NinjaTrader.NinjaScript.Strategies
|
|||||||
public double MaxDaysSinceHigh { get; set; }
|
public double MaxDaysSinceHigh { get; set; }
|
||||||
|
|
||||||
[NinjaScriptProperty]
|
[NinjaScriptProperty]
|
||||||
[Display(Name = "ConnorsRSI Entry Threshold", GroupName = "Trading New Highs", Order = 2)]
|
[Display(Name = "RSI Period", GroupName = "Trading New Highs", Order = 2)]
|
||||||
|
public int RSIPeriod { get; set; }
|
||||||
|
|
||||||
|
[NinjaScriptProperty]
|
||||||
|
[Display(Name = "Streak RSI Period", GroupName = "Trading New Highs", Order = 3)]
|
||||||
|
public int StreakRSIPeriod { get; set; }
|
||||||
|
|
||||||
|
[NinjaScriptProperty]
|
||||||
|
[Display(Name = "Percent Rank Period", GroupName = "Trading New Highs", Order = 4)]
|
||||||
|
public int PercentRankPeriod { get; set; }
|
||||||
|
|
||||||
|
[NinjaScriptProperty]
|
||||||
|
[Display(Name = "ConnorsRSI Entry Threshold", GroupName = "Trading New Highs", Order = 5)]
|
||||||
public double EntryThreshold { get; set; }
|
public double EntryThreshold { get; set; }
|
||||||
|
|
||||||
[NinjaScriptProperty]
|
[NinjaScriptProperty]
|
||||||
[Display(Name = "ConnorsRSI Exit Threshold", GroupName = "Trading New Highs", Order = 3)]
|
[Display(Name = "ConnorsRSI Exit Threshold", GroupName = "Trading New Highs", Order = 6)]
|
||||||
public double ExitThreshold { get; set; }
|
public double ExitThreshold { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user