Troubleshoot EA

If you don't know how to run an EA on your computer or you've never ran an EA before. We suggest starting at the very beginning: Help - I'm new. Below you'll discover solutions to your EA's issue by selecting the scenario that best fits your situation:

I do not get orders any orders.

The very first thing you should do is check if you see any errors. If you were running a backtest, Please open the 'Journal' tab on the Strategy Tester panel. If you are running on a Demo account, please both check the 'Journal' and the 'Experts' tab on the Toolbox panel. If the panels are not visible and you don't know how to open the panels, please go to 'View' and select 'Toolbox' (Demo/ Live) or 'Strategy Tester' (Backtesting). We highly recommend to first make the EA work by running a backtest, since it simplifies testing and solving the issue. Also, it's faster.

Errors visible on the Experts tab
Example of errors visible on the 'Journal' tab when backtesting the EA

If you're seeing an error after scrolling through the tab(s), but you don't know what the error means. Please move to the part of this troubleshoot page which says 'I'm getting an error'.

If you're not seeing an error after scrolling through the tabs, then most likely the EA wasn't configured correctly. We highly recommend to create a simple example EA, by choosing one of our templates. When you've verified the EA works, only add 1 module or condition (Open Buy/ Open Sell) at a time. After each step of adding something new to your EA, test your EA again. When you stop getting orders, you know where you made a mistake. If you need any help configuring your EA, please Subscribe and Contact us. If you first want to make sure the problem is with the configuration, you can always Contact us first to verify for you.

Since you do get orders in a backtest, the configuration of the EA is probably fine, but something is blocking the EA from trading on a Demo and thus also on a Live account. First make sure you've waited long enough to be sure that the EA isn't trading and your conditions were met. If you're seeing an error you obviously don't need to wait.

Next thing you should do is check if you see any errors. Please both check the 'Journal' and the 'Experts' tab on the Toolbox panel. If the panels are not visible and you don't know how to open the panels, please go to 'View' and select 'Toolbox'.

Errors visible on the Experts tab
Example of errors visible on the 'Experts' tab when running the EA on a Demo account

If you're seeing an error after scrolling through the tabs, but you don't know what the error means. Please move to the part of this troubleshoot page which says 'I'm getting an error'.

If you're not seeing an error after scrolling through the tabs, but you are getting orders when backtesting, please make sure you're running on the same Symbol and Timeframe as you were when backtesting. It's possible that the order's conditions were met on the symbol when backtesting, but the characteristics of the symbol you're trading on Demo are different. We highly recommend backtesting your symbol first. If you're not getting orders when backtesting either, please go to the answer of 'I do get orders in Backtest, but I don't get orders on a Demo account' on this page.

If you need any additional help, please Contact us and describe the problem as detailed as possible.

I'm getting orders, but...

It's crucial for you to observe the SL/TP lines on the chart, represented by horizontal green and red lines. If you cannot see these lines on the chart, please refer to the section titled "I'm not seeing Stop loss and Take profit on the chart".

However, it's correct that you won't find the stop loss (SL) or take profit (TP) displayed on the Trade tab of your Toolbox panel, as the EA is responsible for managing them. This decision is made to prevent the broker from accessing your trade information for alternative purposes. Additionally, brokers often lack support for trailing or frequent modification of orders, crucial for trailing strategies. Therefore, the only viable option is to trail the SL/TP internally within the EA's memory, ensuring precision down to 0.1 pip accuracy.

If you're not finding the stop loss (SL) or take profit (TP) displayed on the chart, please consider the following:

  1. Are you getting any error(s) when attaching the EA to the chart? If so, please jump to 'I'm getting an error' and select the error you're seeing.
    Errors visible on the Experts tab
    Example of errors visible on the 'Experts' tab when running the EA on a Demo account
  2. Was the order opened by the EA or was it manually placed? If you expect the EA to manage trades opened manually, please ensure that the EA's 'Magic Number' is set to '0' in the Expert Advisor's properties window (Input tab) in MetaTrader. This way the EA will further manage your manually opened orders, including setting the SL/ TP if it was configured to do so.
    ea magic number property
    Magic number of an EA. You can change the value to 0 for manual orders.
  3. Could it be that the EA was disabled after the order was placed? Check the top right corner of the chart: is the EA depicted as active (happy face) or inactive (sad face)? In MetaTrader 5, an active EA is indicated by a blue hat (in MT4 a happy face), while an inactive one is indicated by a gray hat (in MT4 a sad face). Only an active EA will manage SL/TP. To prevent your EA from disabling automatically, please see the instructions under 'Run your EA in a backtest' on Tutorial - Run first EA and uncheck the 'Disable' checkboxes.
    ea magic number property
    EA is running and not disabled.
  4. The SL/TP lines might be positioned beyond the visible area of the chart. Zoom out and verify if the SL/TP lines should be within the visible range.
  5. Ensure that after loading the EA onto the chart, you see a message in the 'Expert' tab similar to: "Pip (forex)/ Point (indices): 0.00010" for EURUSD. If you're trading a different symbol, confirm that the displayed value (in the case of EURUSD 0.00010) corresponds to the value of 1 pip/point for your symbol. If not, manually adjust the 'Manual pip point (0 = auto detection)' in the Inputs tab of your EA's properties to the correct value. For instance, if you're trading USDBTC (Bitcoin), set it to 1 if you want 1 pip to represent $1. You could also not adjust the "Manual pip point" setting, but instead adjust the number of pips you enter for your SL and TP.
    ea pip point property
    Pip/ point calculated automatically. Can be set to preferred value manually.

The most likely reason for the SL/ TP not to show where you want it is that you're trading a symbol with a different value per pip than you expect. An example would be that when you're trading EURUSD, then the EA automatically calculates a Pip equals a value of 0.00010. Most people would agree to that. So if I set the value of SL to 50 pips and my sell order's price is 1.22668, then my SL will be at 1.22668 + (50 * 0.00010) = 1.23168.

So how do you know what the value of a pip is? When you attach the EA to a chart and you look at the 'Expert' tab you'll see this line: Pip (forex)/ Point (indices): 0.00010. This will tell you what the value of a pip is: 0.00010. If this is not as you expect, please open the EA properties and set the following property: Manual pip point (0 = auto detection) to the value you expect 1 pip to be. Then you can retry testing this symbol. You could use the Strategy Tester for that and select the same symbol, as it will give the same result.

It's conceivable that if you're trading US 30, you'd prefer your pip/point value to be $1. Please adjust the mentioned setting to 1 accordingly. You have the option to save your EA setup to a file, although in most cases, MetaTrader will retain your settings automatically. You could also not adjust the setting, but instead adjust the number of pips you enter for your SL and TP.

ea pip point property
Pip/ point calculated automatically. Can be set to preferred value manually.

The most common reason is that your Open signal is still active. The EA won't close the order if the Open signal is still active, because if it would close the order, the Open signal would immediately open a new order in the same direction (closing a Buy would be followed by a new Buy) and you would 'lose' commission/ spread. There are a few ways to make sure your open signal is only active for a short amount of time:
  • Most common is to use a crossover in your open signal. This especially works well when the EA has a low timeframe or (in case of a high timeframe) the SL/ TP are large, causing the price usually not to hit the SL/ TP within the same bar as the opening bar. By using a crossover the value of the indicator is not just checked to be bigger than another value (which often holds true for too long), but it will only be active as long as the previous value (in the previous bar) was still smaller. When the next bar opens the crossover is no longer true, because now the previous value was already bigger than the other value. Make sure you only use 1 crossover per signal, because it's very rare for 2 crossovers to occur simultaneously.
  • Because a crossover is active for the period of the timeframe of the indicator used in the crossover (f.e. 60 minutes), you could alternatively, or additionally, use the Time gap between orders module. Make sure you enable 'Apply after closed order' and make sure the amount of minutes you enter matches the amount of minutes of the timeframe you're using (in this case 60 minutes). What the EA will do is pretty interesting. When your SL/ TP is hit, it will check what the EA would do if it would close the order now. Would the Open signal open a new order? Yes it would? But wait, no it wouldn't, because the Time Gap module would prevent it.

I'm getting an error

As the message suggests, you have to look for an error on your panels. If you were running a backtest, Please open the 'Journal' tab on the Strategy Tester panel. If you are running on a Demo account, please both check the 'Journal' and the 'Experts' tab on the Toolbox panel. If the panels are not visible and you don't know how to open the panels, please go to 'View' and select 'Toolbox' or 'Strategy Tester'.

Errors visible on the Experts tab
Example of errors visible on the 'Journal' tab when backtesting the EA

Now look for any other error except for the error you've already seen ("Open (all) order(s) failed. Please check EA [Number] and look at the Journal and Expert tab."). Once found, go to the error which matches that description on this page.

If the error you're seeing doesn't match any error on this page, please Contact us and tell us which error you're seeing.

Your EA can't find your indicator. Your indicator must be in MetaTrader's 'Indicators' folder and NOT in any sub-folder. So, 'Indicators\Examples', 'Indicators\Market' or similar will not work. To open the 'Indicators' folder from MetaTrader, go to 'File' and then 'Open Data Folder' (CTRL + Shift + D). Then, in the File Exploprer, click, 'MQL4' and 'Indicators'.

If that didn't solve this specific error, then please verify the 'ex4' file is in the 'Indicators' folder and not just the 'mq4' file. If the 'ex4' file is missing. Please open your 'mq4' file in MetaEditor and click the 'Compile' button.

Your EA can't find your indicator. Your indicator must be in MetaTrader's 'Indicators' folder and NOT in any sub-folder. So, 'Indicators\Examples', 'Indicators\Market' or similar will not work. To open the 'Indicators' folder from MetaTrader, go to 'File' and then 'Open Data Folder' (CTRL + Shift + D). Then, in the File Exploprer, click, 'MQL5' and 'Indicators'.

If that didn't solve this specific error, then please verify the 'ex5' file is in the 'Indicators' folder and not just the 'mq4' file. If the 'ex4' file is missing. Please open your 'mq5' file in MetaEditor and click the 'Compile' button.

Before orders are opened, the required margin is calculated based on the broker's symbol specification. Sometimes the broker's symbol specification is incorrect. Please ask your broker to correct the symbol specification's 'Margin Currency' for your symbol (f.e. XAUUSD) to 'USD' and not 'XAU', since XAU is not a currency.

To temporarily work around this issue, please open your EA's properties and set 'Margin validation' to 'false' and use the Fixed lot size Money manager.

Your EA is using an indicator which in turn loads DLL's to function. If you're sure about running this EA and you trust the EA's publisher, please scroll to the instructions under 'Run your EA in a backtest' of Tutorial - Run your first EA and enable 'Allow DLL imports'.

Most likely your MetaTrader's configuration isn't setup correctly yet to allow EA's to trade automatically. Please scroll to the instructions under 'Run your EA in a backtest' of Tutorial - Run your first EA and enable 'Allow automated trading'.

You're trying to open an order with a volume (lot size) smaller or bigger than the accepted size by the broker. This can for example happen when the broker isn't accepting nano lots (0.0001 lot) when trying to use that volume.

Please Contact us and let us know which error you're getting. We'll tell you how to solve the error and add the error to this page.