I am currently backtesting a strategy which generates signals on a daily basis (Calculate on Bar Close = true) and purchases on the market opening the next day. In addition, I also backtested the same strategy with 1Minute data in order to check, whether it would be better to buy already at 15:59 on the previous day (15:58 in backtest). As there is only 1 Minute left, the probability that a daily signal will be reversed within this Minute is quite low.
However, the difference in the results of the daily and 1Minute data is much higher than I expected. As I am running out of ideas to explain this phenomenom, I wanted to ask you whether my Multitimeframe-coding for the 1Minute data is correct?! Once again, it should generate a daily signal which is generated shortly before close.
Or do you know any issues, which may explain these differences?
Thank you very much for your help!
protected override void Initialize()
{
Add(PeriodType.Day, 1);
CalculateOnBarClose = false;
}
protected override void OnBarUpdate()
{
// Enter Long
if (ToTime(Time[0]) == 215800)
&& entryOrder == null
&& StochasticMod(BarsArray[1],5, 9).D[0] < 30)
{
entryOrder = EnterLong(OrderQuantity,"Long");
}
// Exit Long 1
if (ToTime(Time[0]) == 215800)
&& StochasticMod(BarsArray[1],5, 9).D[0] > 70
{
ExitLong();
}
}


Comment