Expert Advisor Troubleshooting Guide

If your expert advisor isn't working correctly (and chances are there will be a few bugs), please be sure to include the following information when you email me for support. This will help ensure that your issue will be solved as quickly and inexpensively as possible.

  • Attach The Log - This is very important. Please attach the expert advisor log file from the date(s) that the trades were placed. Be sure to test your EA with Debug=true. You may want to include the logs from the day before and after, if applicable. See the FAQ below for log file locations.
  • Include Order Numbers - Be sure to mention the ticket numbers of specific trades that were placed incorrectly, along with a description of the problem with that trade.
  • Attach The Settings File - You may want to attach a settings (.set) file showing the parameters that you are testing with. This is especially true if you are backtesting the EA. See the FAQ below on how to save a settings file.
  • Screenshots - Screenshots can be helpful, but are not a replacement for the above information! In most cases they're not even necessary. Please send screenshots as image files instead of word processing documents. See the FAQ below for more information on sending screenshots.

When demo testing your EA, please try to limit your testing to no more than 2 charts or expert advisors at a time. Trading multiple charts at once increases the size of the log file and the time required to troubleshoot.

Frequently Asked Questions

  • My expert advisor won't run!
    • Is there a smiley face in the top left corner of the chart? If not, then your terminal is not set for automated trading. Your EA should alert you as to which settings need to be adjusted.
      • "Allow Live Trading" must be enabled under the Common tab in the Expert Advisor properties. Press F7 on your keyboard to open this window.
      • The Expert Advisors button on the toolbar must be enabled.
    • Check the log under the Experts tab in the Terminal window. Do you see any error messages?
    • Are you logged into your live account? The testing versions of your EA will only run on a demo account. This is to protect you from losing money from testing a buggy EA on your live account.
    • If none of the above work, be sure to attach the log file when you email. See below for log file locations.
  • MetaTrader crashes as soon as I run my expert advisor!
    • Your MetaTrader 4 build is out of date. Download and reinstall MT4 from your broker's website.
  • Where are the log files located?
    • Trading: The log contents are listed under the Experts tab (NOT the Journal tab!) in the Terminal window. Right-click anywhere in this window and select Open from the pop-up menu. The logs are saved in the \experts\logs folder inside your MT4 installation directory.
    • Backtesting: The log contents are listed under the Journal tab in the Tester window. Right-click anywhere in this window and select Open from the pop-up menu. The logs are saved in the \tester\logs folder inside your MT4 installation directory.
    • Windows Vista Users: If the log files are not in the default locations, you'll need to disable Vista's User Account Control (UAC). See How to Disable Vista's User Account Control.

    • If you are demo trading your EA and you spot a problem, please shut down MetaTrader first before you attach the trading log to your email message. Otherwise, the full contents of the log may not be written to the disk.
    • Do not include any files from the logs folder in your MT4 directory. Do not cut and paste the output from the Experts or Journal windows - attach the file from your hard drive.
  • How do I save my expert advisor settings to a file?
    • Click the Save button in the bottom-right corner of the Expert Properties window to save your current settings to a file. The file is saved to the \experts\presets folder by default with a .set extension. If you're using the Strategy Tester, the default save folder is \tester.
  • Where are the server files for my broker's demo server?
    • In some cases, I may need to test your expert advisor on the same server you're using to determine a problem. The server files are located in the \config folder and have the .srv extension. Attach any files that say "demo".
  • How do I take a screenshot?
    • Use the PrtScr key on your keyboard (above the Insert key and to the right of the F12 key) to save a screenshot to the clipboard. Use the Paste function (Ctrl+V) in any image program to paste the screenshot. Save it as a .jpg, .gif or .bmp file.
    • Please use a program such as MS Paint (installed on every Windows machine) or a free program such as Irfanview, instead of a Word document.
  • Why can't I place a small stop loss? What is a stop level?
    • The stop level is the minimum number of pips away from the Bid & Ask price that you are allowed to place a stop loss, take profit or pending order. For most brokers, this is less than 5 pips, although it varies by broker. The image below will illustrate:

  • Remember that for the stop loss, you are adding the spread to the stop level to determine the minimum stop loss. So if the spread is 3 pips and the stop level is 3 pips, the minimum stop loss is 6 pips.
  • Sell stop loss, buy take profit, pending buy stop and sell limit orders must be placed above the upper stop level. Buy stop loss, sell take profit, pending sell stop and buy limit orders must be placed below the lower stop level.
  • If you attempt to place a stop loss, take profit or pending order inside the stop levels, you will get an error 130, "invalid stops".
  • Your expert advisor will automatically attempt to adjust the price so that it is valid. In this case, you'll likely never see an error message. If you do not wish for your EA to have this behavior, it can be replaced with a customized error message.
Copyright © 2010-13 EasyExpertForex.com