I'm backtesting a strategy on a daily chart (so BarsInProgress == 0 is daily), and my results seem to show a bug in the executions logic. Using ExitOnClose = true gets me out of the trades before I enter them. (why do I even get executions when the exit price wasn't reached?)
I attached two pictures. The exit price seems ok, but please have a look at the Date, 19.01. - that should be 20.01. (as in the appropriate chart).
To get intraday Executions I added minute data to the strategy:
protected override void Initialize() { ... Add(PeriodType.Day, 1); // BarsInProgress == 1 Add(PeriodType.Minute, 1); // BarsInProgress == 2 ... }
if (BarsInProgress != 1)
return;
...
}
All I need is a daily chart showing the intraday executions.
Best Regards,
Cody
Comment