Just been coding a strategy for backtesting purposes and I've hit a wall. I'm currently using end of day data, in a 1 day candlestick chart, btw.
So is it possible to get the Open price of a bar, and then put in a buy, which would execute at the start of that same day? For example this code:
protected override void OnBarUpdate() {
if (Time[0].DayOfWeek == DayOfWeek.Wednesday) {
EnterLong(DefaultQuantity, "");
)
if (Time[0].DayOfWeek == DayOfWeek.Thursday) {
ExitLong;
)
}
I did try and shift the days back, which results in the correct days being executed, but then I can't access the Open price on Wednesday.
Any ideas?
Thanks for the help, Tim.

Comment