Have a problem when test the strategies in MT4
I generated daily strategies in “Selected Timeframe” mode. It give me great equity curve in strategy quant. However, unlike strategies generated from “Trade on Bar Open”, it fail miserably when I test in MT4 platform. I assume that the exit conditions about
profit trailing, stop trailing, and stop loss might affect the result in MT4.
What do you think about this problem and please suggest how to solve it.
these modes are different in the way when they take trades and when they fill SL/PT,so the results might be also very different – depending on the strategy.
Why would you want to develop strategy in one mode and then trade it in another mode?
“Trade On Bar Open” is a specific mode that should be used alone. It provides quite high backtesting precision, because it doesn’t consider inside bar movements.
Try to generate strategies in SQ in this mode ifyou want to trade this way.
Also, I noticed you probably use daily bars but your SL/PT is quite small (100 pips). If SL/PT is smaller than the daily bar range then it cannot be simulated properly using Selected Timeframe precision, maybe that’s why you get so great results.
Try to use minute precision instead.
I mean that I use to trade with “Trade on bar open” mode, and the test result on both SQ and MT4 are quite similar. Now, I want to generate and trade with “Selected timeframe” mode, but the test results in SQ and MT4 are totally different. In addition, the average daily price change of this instrument is about 200 pips, so the 300 pips TP/SL of the strategies generated from SQ4 should not be the problem.
I want to set TP/SL inside bar( daily bar ). Do you think I should set “Selected timeframe” or “one minute” precision. However, I don’t have a minute data.
Can I use “one minute” precision ?
these differences between SQ and MT4 mean that most probably the strategy is not tested with enough precision. Unless you use really big SL/PT (maybe few times of daily range) you’d need minute data to run accurate tests.
You can get quality tick or minute data using our Tick Data Downloader.
I have more questions about Profit Trailing and Stop Trailing. What is the price condition that trigger the trailing ? Does the trailing trigger after the end of starting bar or it triggers in some other ways ? So, I can check the list of trade compare with MT4.
How does the program calculate the P&L when the SL and TP are in the same bar in the Selected Timeframe mode ?
trailing triggers always at the new bar open (for MetaTrader) or bar close (for Ninja/Tradestation).
In Selected Timeframe you cannot really simulate when your SL and PT are in the same bar, it is only guess what comes first.
So you shouldn’t use this tight SL/PT for this precision, otherwise your results could be very inaccurate.
I must add here, that about 40% – it varies between 20% and 66% – of all strategies built in SQ does not work in MT4 Strategy Tester.
I only export/import the code nothing else changed.
It might be a bigger problem.
I doublechecked it on a second MT4 account. It is a programming problem in SQ.
It is not programmed correctly. Many strategies show totally different results in MT4 than in SQ.
That must be changed.
i have tested many strategies both in MT4 and SQ. Sometimes its little different, but not that it send you to loss.
If you have strategy that is logic and robust and you test it in SQ at ducascopy tick data, then the retest in MT4 is almost the same.
What can I do wrong ? I just save the MT4 strategy with the brokers datafeed and then I test it again ni Strategy Tester of MT4 Terminal.
I notices huge differences in a good number of instances.
Andreas, do you use real tick data for testing in both SQ and MT4? Or which precision are you using for testing in SQ?
When strategies are different in both programs it could be a bug in SQ, but it is unlikely, it has been tested multiple times.
It is more likely that the strategy was curve fitted to the data, and it wouldn’t work when the data are slightly changed.
The tick simulation algorithms are not exctly the same between SQ and MT4, but if this causes big differences in tests it is a clear sign that your strategy is curve fitted.
Viewing 12 posts - 1 through 12 (of 12 total)