Execution timing
Execution timing means when your strategy is triggered, evaluated and executed.
Strategies running on D1 (daily) timeframe can be triggered two times during a day:
-
on entry - this is when entry conditions are evaluated and strategy places orders
-
on exit - this is when (optional) exit conditins are evaluated and open orders are closed
Triggers timing explained
Before Bar Open
evaluates strategy before Bar open (it is before Market open for daily strategies).
Trades will be executed when market is opened.
Implications
Block with Shift=0 with this trigger returns the current value of the last finished bar.
So for example Close[0] returns Close price of previous market day. Open[0] returns Open price of previous market day.
On Bar Open
evaluates strategy on bar open (when Market opens for daily strategies). We trigger this a few minutes AFTER the actual market open
to allow for accurate prices. Strategy will have access to current market open price.
Trades will be executed immediately.
Implications
OnBarOpen
Block with Shift=0 with this trigger returns the current value of the current open bar.
So Open[0] returns current day Open price, Close[0] returns the last current price, very similar to Open[0]. Since the day didn't finish yet, Close[0] at Bar Open is NOT as same as final Close[0] at the end of the day.
On Bar Close
evaluates strategy on bar close (when Market closes for daily strategies). We trigger this a few minutes BEFORE the actual
market close to allow for correct executions.
Trades will be executed immediately.
Implications
OnBarClose
Block with Shift=0 with this trigger returns the current value of the current open bar.
So Open[0] returns current day Open price, Close[0] returns the last current price. Since we are very near to market close, it will be very similar to real market daily Close price.
The choice of yout triggers will have impact on when and how the strategy trades, strategy can have different results when used with different timing.
You can backtest the strategy with the exact timing and you should use the timing that you used in your backtest.