When running a tick data backtest, the progress indicator appears to work fine but no orders are placed.
In the vast majority of the cases, this is caused by something related to the EA you are backtesting.
You can easily check if that's the case by running a backtest of the MACD Sample EA on the same symbol, using the same configuration and the same tick data. Be sure to provide a sufficiently high starting balance and to set the lot size to something supported by your configuration. If the MACD Sample EA places trades just fine, the problem is related to your EA.
First of all, check the backtest journal (rightmost tab of the MT4 backtest pane) for any information that might be related to the problem. Sometimes you might see a divide by zero error, sometimes you might see a lot of orders that attempt to get placed but errors are encountered for each of them, sometimes you might see a message from the EA informing you about the problem (for instance, a missing license key).
If the error is apparent in the backtest journal and it's not something that you can solve, you should contact the EA vendor and copy/paste the error message(s) that you see.
However, there are many things that you can fix on your own, for example:
- In many cases, OrderSend error 131 can be solved by adjusting the traded lot size. In an ideal world, the EA should validate the lot size and inform the user about any errors but we're not living in an ideal world.
If the EA's auto money management fails to take into account the settings of your account, you can also override the minimum lot size and the lot step, setting both of them to 0.01 in the Advanced tab of the Tick data settings dialog.
- If you see OrderSend error 130, it's usually because an EA fails to take into account the minimum stop distance and violates it by attempting to place a stop loss and/or take profit that is too close to the market price.
You can perhaps make the EA run in your backtest by overriding the Stops level setting in the Expert tab of the Tick data settings dialog and increasing it to a level that works with the EA. However, that only changes the backtest environment; in all likelihood the EA will not work on the account that you are connected with.
In some cases, the EA simply fails to provide a proper stop loss/take profit - in these cases, overriding the Stops level setting will have no effect on the backtest outcome.
- Generally, if you see any MQL-related error, it might be an idea to look it up at https://book.mql4.com/appendix/errors. While some errors cannot be easily handled without the source code of the EA, some problems will become a lot clearer if you read about the error codes.
For example, if you see OrderSend error 134 and you look it up at the URL it becomes clear that the EA attempts to place an order with a lot size that is not covered by the available margin.
- There might be error messages printed by the EA in relation to the configuration of the EA. If that's the case, you might be able to adjust the configuration as required.
- Some EAs fail to take into account the number of bars available in history at the start of the backtest. This can have various results ranging from errors such as "array out of range" (4002) or "zero divide" (4012, 4013) to EA-related messages such as "not enough bars" or perhaps even incorrect placement of orders.
While this constitutes a bug in the EA, you can sometimes work around it by increasing the amount of Bars before data in the Advanced tab of the Tick data settings dialog.
- When using variable spread, sometimes the spread of the tick data you are using (or perhaps when adjusted by a custom configuration) exceeds the spreads accepted by the EA. In this case there is typically no error message but you can easily test if this is the problem by disabling the Use variable spread checkbox in the Basic tab of the Tick data settings dialog and setting the Spread in the MT4 backtest pane to 1.
- Some EAs will simply refuse to trade unless you backtest them on the timeframe that they are intended for. If your EA came with a manual, guide, instruction set or anything of the sort, be sure to read it and find out if there's anything special that you have to configure when backtesting it.
Sometimes there is no information at all to be found in the backtest journal. If that is the case it would be advisable to attempt to run a visual backtest of the EA as sometimes information will be displayed on the chart, including error messages.
If you are able to gather some error information from the backtest journal or visual backtest but you are unsure how to deal with it, contact the EA vendor, inform them about the problem, provide the relevant information (exact error messages, symbol, timeframe, spread, date range of the backtest, EA configuration etc.) and ask them how to proceed.
If you performed the MACD Sample EA backtest as described in the Cause section above and it also failed to trade, please open a support ticket using the Tick Data Suite support assistant (which you can run from your Start menu). Leave the log file checkboxes enabled, describe the problem and very important: make sure you paste all the lines that get printed to your backtest journal when you click the Start button for the MACD Sample EA backtest (or attach a screenshot that includes them).
Was this article helpful?
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
We appreciate your effort and will try to fix the article