I have an existing strategy built through the strategy builder that I operate on the 1 minute time frame. It has no additional data series and operates as expected.
I am trying to add another condition to this strategy through the condition builder using daily time frame data:
I've added the daily data series and indicator as demonstrated here: https://paul-ninjatrader.tinytake.com/tt/MzU5OTAwNV8xMDg3NzUyMQ
When back-testing this new strategy, the script fails to execute the action. I have confirmed various instances where conditions are fulfilled to enable the script to execute the action with this new condition, but it just doesn't.
A comparison backtest of the old vs. new strategy shows that the old will execute, but the new will not, despite the new daily RSI condition being met in both cases.
Your insight is greatly appreciated.
An excerpt of the script:
{
AddDataSeries(Data.BarsPeriodType.Day, 1);
}
else if (State == State.DataLoaded)
{
VOL1 = VOL(Close);
ROC1 = ROC(Close, 9);
MACD1 = MACD(Close, 12, 26, 9);
RSI1 = RSI(Close, 14, 3);
RSI2 = RSI(Closes[1], 14, 3);
SetStopLoss(@"SHORTLMT", CalculationMode.Percent, SETSL, false);
SetProfitTarget(@"SHORTLMT", CalculationMode.Percent, SETPT);
}
}
protected override void OnBarUpdate()
{
if (BarsInProgress != 0)
return;
if (CurrentBars[0] < 2
|| CurrentBars[1] < 1)
return;
// Set 1
if ((VOL1[0] >= 10000)
// I have omitted most of the existing 1-minute conditions and left the new daily RSI condition below.
&& (RSI2.Avg[1] > 45))
{
// I have omitted the action.
}
}

Comment