Intra-bar Conditional Entries & Exits

 

Still learning about MT5 EAs and backtesting them.  If I have an EA coded to enter and exit positions based on (as an example) moving average (MA) crossovers and these MA crossovers occur within the the same candle (after candle open and before that same candle closes):

1.  When live trading this type of EA, will the orders get placed at that time of MA crossing (at the exact time of the condition is met) or during live trading will the order only get placed at the opening (or close) of the next candle?

2.  If, during live trading the orders do get placed at the exact time of the condition being met as opposed to waiting for next candle, is there a way to emulate this in the strategy backtester?  It appears while backtesting the EA, the positions are only being opened/closed after the conditions are being met and at a subsequent (later) candle.

Any help would be appreciated.

 

During live: Orders get placed at the time of MA crossing if it is coded that way.

During backtest: You should make sure to use "based on real ticks" mode to emulate what happens in live. If you choose "On Open Price only" things will happen upon each candle being closed.

 
Yashar Seyyedin #:

During live: Orders get placed at the time of MA crossing if it is coded that way.

During backtest: You should make sure to use "based on real ticks" mode to emulate what happens in live. If you choose "On Open Price only" things will happen upon each candle being closed.

thank you!
Reason: