- Bugs MT5 backtests price per point
- mt5 and mt4 backtest completely different
- Experts: Martingale Smart
MT4 Strategy tester uses fixed spread, with zero delay. You will have to recreate the exact same conditions on MT5 Strategy Tester, including the contract specifications for swaps and commission too.
Apart from that it will not be very plausible to assume that your code is not the cause, because it usually is.
I say this from experience because I too code for both MQL4 and MQL5, and test on both with tick data from DukasCopy (which is the data that TickStory uses).
MT4 Strategy tester uses fixed spread, with zero delay. You will have to recreate the exact same conditions on MT5 Strategy Tester, including the contract specifications for swaps and commission too.
Apart from that it will not be very plausible to assume that your code is not the cause, because it usually is.
I say this from experience because I too code for both MQL4 and MQL5, and test on both with tick data from DukasCopy (which is the data that TickStory uses).
I can almost guarantee that Spreads are not the same, because MT5 uses floating spread, and setting a fixed spread in the tester's contract specification has no effect when using "real tick data".
You can only adjust to a fixed spread when using the virtual ticks generated by MT5 Tester, not when using real ticks.
To overcome this, you would have to generate the Custom Symbol with a fixed spread in the actual tick data used for the Custom Symbol.
I can almost guarantee that Spreads are not the same, because MT5 uses floating spread, and setting a fixed spread in the tester's contract specification has no effect when using "real tick data".
You can only adjust to a fixed spread when using the virtual ticks generated by MT5 Tester, not when using real ticks.
To overcome this, you would have to generate the Custom Symbol with a fixed spread in the actual tick data used for the Custom Symbol.
Yes, you are theoretically correct that only using open prices, then a fixed spread should work.
However, just a warning that you should be somewhat wary of — It has happened to be me on several occasions, that for some unknown reason, the spread sometimes floats a few bars and then returns to the fixed value. I've never been able to figure out why or when this happens. It just does, so it is probably a bug, but it's inconsistent and have yet to be able to properly replicated it every time so as to report it as a bug.
Maybe this "bug" will not happen to you as you seem to be testing against a Custom Symbol of data imported from TickStory. But to be on the safe side, include some code in your EA to monitor the spread and output a message to the log when it is not what it is supposed to be.
Yes, you are theoretically correct that only using open prices, then a fixed spread should work.
However, just a warning that you should be somewhat wary of — It has happened to be me on several occasions, that for some unknown reason, the spread sometimes floats a few bars and then returns to the fixed value. I've never been able to figure out why or when this happens. It just does, so it is probably a bug, but it's inconsistent and have yet to be able to properly replicated it every time so as to report it as a bug.
Maybe this "bug" will not happen to you as you seem to be testing against a Custom Symbol of data imported from TickStory. But to be on the safe side, include some code in your EA to monitor the spread and output a message to the log when it is not what it is supposed to be.
No, as I mentioned in a previous post here to you, if you want your Custom Symbol to have a fixed spread, you have to feed it tick data that has a fixed spread.
The CSV data generated by TickStory with Dukascopy tick data, has a floating spread. In other words it has both a Bid and a Ask price quote that float. You will have to edit the CSV so as to have a fixed spread instead. You will have to change the Ask prices so that the difference between Ask and Bid is always fixed.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use