|
<< Click to Display Table of Contents >> Navigation: »No topics above this level« Frequently Asked Questions |
An expert advisor may not enter a trade for numerous reasons, depending of course on what entry criteria it uses and whether any errors are occurring while attempting to enter a trade. Quite commonly, EAs are dependent on the current spread of the market. If it's too high, the EA will refrain from trading. In most EAs, the spread limit is a configurable parameter and you can try adjusting this value to a higher threshold, just to see if this encourages the EA to open a trade. Other reasons for an EA not entering a trade can often be found by analyzing the tester's Journal tab which often contain informational messages and may be reporting error numbers during the EA's operation.
If your strategy is not trading, please try the following:
▪If testing in Every Tick mode, make sure you have exported sufficient historical data for the test. ▪Check that your EA settings are correct. If possible, "relax" any restrictions such as the trading window or any minimum spread required before a trade is taken. There may be other such EA parameters that are preventing or filtering trades which you might also be causing your problem. You can revert all your settings back to default once you have identified the problem. ▪Check the Metatrader Strategy Tester Journal for any errors that may assist you in trouble-shooting the issue. If you are coding your own expert advisor, add some logging to help identify why there are no trades. If the expert advisor was written by a third-party, contact the author for technical support. ▪Turn on Visual Mode in the Metatrader Strategy Tester to see if the chart is running through the data as expected and pause/replay the moment where you expect a trade to occur. ▪If the issue still persists, attempt to do your back-test without the Advanced Tester so you can isolate which setting is causing the problem.
|
If you are receiving errors in the Metatrader Strategy Tester Journal, note the error number and do a Google search for that error. You can also search to our Support Forum which might have a solution. Common errors include:
Order Send Error 131 (ERR_INVALID_TRADE_VOLUME) - This usually indicates that the lot size that the EA has specified is incorrect. Check the 'Lot step' parameter you have set in Tickstory when you exported your data. If the lot size that your EA is using is not a multiple of this number, you will get this error and need to modify your EA so it correctly “normalizes” the order volume so it conforms. In some EAs, there is a “Lot size” parameter which can be set. In this case, make sure that your lot-size is a multiple of the “lot step” parameter.
Order Send Error 134 (ERR_NOT_ENOUGH_MONEY) - This one means that your account cannot open the requested trade due to lack of money. You can adjust your initial deposit settings in MT4 Strategy Tester to supply your EA with additional funds for the back-test (or you can try lowering any parameters in your EA that deal with risk or lot-size).
Order Send Error 129 (ERR_INVALID_PRICE) - This can occur when your EA tries to enter a trade at a certain price, but the market price has since changed. In this case, putting a RefreshRates() call in your EA just prior to entering a trade can resolve this problem.
Zero-divide error - This error can occur if the EA is trying to use a particular parameter (Lot size, for example) and the value is zero. Just review your EA for where this error is occurring. Once you have established which specific parameter is zero, ensure that you have correctly exported this value in your Tickstory “MT4 Settings”.
If you continue to receive errors, firstly disable any advanced custom settings you may have configured as these may be causing the problem. You can also stop the Advanced Tester to trouble-shoot the issue further. If your expert advisor was written by a third-party, we recommend you contact the author if you cannot resolve the issue.
|
If you are having difficulties with your testing, please consider the following possible causes and remedies:
▪Bug in the EA: Ensure your EA is not the cause of the issue by checking the EA parameters, the Strategy Tester journal logs and other all possible areas to identify the malfunction/error. Ensure your code is not being subject to some sort of bug that is causing your trading issue. Place plenty of log entries in the code to see where the issue may lie. You should also utilize the “Visual mode” of the Strategy Tester which may give some hints as to why your EA is entering or not entering a trade. ▪Problematic Test Settings: Ensure a specific setting is not causing your issue by switching each customized setting off one-by-one and re-executing your test. ▪Known MT4 issue: In some cases there are known issues with the Strategy Tester. The Tickstory & MT4 forums are often a good place to read about issues that people have come across. ▪Issue with the Advanced Tester: In the event you believe there may be an issue with the Advanced Tester, firstly identify the differences between your test with and without using the Advanced Tester. Is your EA having issues with tick data? Does it not trade in certain conditions such as with certain lot sizes, spreads, etc? Knowing exactly what is causing the issue will help understand where the problem lies and how to resolve it. If this still doesn't help, compile the information into a minimum viable example - that is, the basic information required to reproduce the issue. You can then post this information on our Support Forum to see if we can assist you further in identifying the issue*.
* NOTE: We unfortunately do not provide any Metatrader debugging or coding services, so please ensure you do not post information specific to your EA as we will be unable to assist. In order to help you effectively, all examples should be brief with a set of reproducible steps with accompanying screen-shots that highlight the issue with the Advanced Tester.
|
If there is no final walk-forward report, this means that there were no trading results were produced across the periods tested. Some reasons for this include:
▪There was no data available in Metatrader for the given symbol and test period. Please double-check in Metatrader's History Center that you have data for the required dates. ▪Your EA did not trade with the specified optimization parameters. In such a case, you can make sure you are getting results by performing a 'single' test in Metatrader by un-checking the Optimization option and loading your EA settings. If your test does not yield any results, you will need to trouble-shoot why. Some common causes include that your EA is not trading due to unfavorable spread conditions. Other parameters such as time-zones and account balance may be causing some trade entry conditions not to be met. You will need to go through each variable until your single test produces a result (refer to the question "Why is my EA not trading? Or, Why isn't my EA doing X?" in this FAQ for more). With this information, you can nominate the correct settings that are needed for your optimization.
|