Prevent trades in the RSI divergence strategy only until there are at least divergence period bars available
This commit is contained in:
parent
5c67629db4
commit
399ba5a35c
@ -46,7 +46,7 @@ namespace NinjaTrader.NinjaScript.Strategies
|
|||||||
|
|
||||||
protected override void OnBarUpdate()
|
protected override void OnBarUpdate()
|
||||||
{
|
{
|
||||||
if (CurrentBar < BarsRequiredToTrade)
|
if (CurrentBar < DivergencePeriod)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (rsi[0] > rsi[DivergencePeriod] && Close[0] < Close[DivergencePeriod])
|
if (rsi[0] > rsi[DivergencePeriod] && Close[0] < Close[DivergencePeriod])
|
||||||
|
Loading…
Reference in New Issue
Block a user