- Questions from Beginners MQL5 MT5 MetaTrader 5
- Is there proof of profit from using Autotrading?
- Grid stop order management function
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.
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.
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?
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.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use