Strategy Tester vs Real Conditions

 
I was testing my EA in visual mode and it seems like (please correct me if I am wrong), that if there is a buy stop order, say on a stock CFD, and price opens the next day beyond the buy stop price, that the tester assumes that the trade was opened AT the stop price, however, I would assume that in reality, the gap up would open the stop order at the first opening price, which could be well beyond the stop price. Similarly, if you have a trade with a stop loss and price opens beyond the stop loss (or TP), the opening price will be used to close the trade, and NOT the TP/SL price as set on the position. Could someone who has experience with this verify that this is/is not the case? Thank you.
 
GOLDENbc:
I was testing my EA in visual mode and it seems like (please correct me if I am wrong), that if there is a buy stop order, say on a stock CFD, and price opens the next day beyond the buy stop price, that the tester assumes that the trade was opened AT the stop price, however, I would assume that in reality, the gap up would open the stop order at the first opening price, which could be well beyond the stop price. Similarly, if you have a trade with a stop loss and price opens beyond the stop loss (or TP), the opening price will be used to close the trade, and NOT the TP/SL price as set on the position. Could someone who has experience with this verify that this is/is not the case? Thank you.

You are correct in both cases.

That's why the difference between backtesting and live trading can be significant.

 
GOLDENbc:
I was testing my EA in visual mode and it seems like (please correct me if I am wrong), that if there is a buy stop order, say on a stock CFD, and price opens the next day beyond the buy stop price, that the tester assumes that the trade was opened AT the stop price, however, I would assume that in reality, the gap up would open the stop order at the first opening price, which could be well beyond the stop price. Similarly, if you have a trade with a stop loss and price opens beyond the stop loss (or TP), the opening price will be used to close the trade, and NOT the TP/SL price as set on the position. Could someone who has experience with this verify that this is/is not the case? Thank you.

Yes and No! It depends on which modelling method you are using on MT5. If you use "real tick data" modelling method then that will not happen. All other modelling methods applies the logic you have just described.

 
Fernando Carreiro #:

Yes and No! It depends on which modelling method you are using on MT5. If you use "real tick data" modelling method then that will not happen. All other modelling methods applies the logic you have just described.

why would the modelling method matter? A stock CFD has overnight trading which could make the open on the new day significantly different from the close of the prior day. The first real tick would be the gap up/down on the open of the new day regardless of modelling method chosen right?

 
Oleksandr Medviediev #:

You are correct in both cases.

That's why the difference between backtesting and live trading can be significant.

Thanks. I'm not sure why strategy tester isn't designed to process that gap and still uses the SL/TP/open price from the order. Seems like it would a simple thing to get that to much more accurately reflect real results.

 
GOLDENbc #:why would the modelling method matter? A stock CFD has overnight trading which could make the open on the new day significantly different from the close of the prior day. The first real tick would be the gap up/down on the open of the new day regardless of modelling method chosen right?
I simply stated an observed fact. You can debate whether that is logical or not, but that will not change the outcome. You are free to do as you wish.