Skip to main content

How Do I Install an Automated Trading Program in MT4?

Place a trading program and its supporting resources in the correct MT4 folders, verify installation, review its parameters and permissions, and attach it to a chart.

Install program files only from a source you trust. These steps show where to place the files; installation or appearance in Navigator does not verify the code, safety or compatibility and does not guarantee order generation, execution or a trading result. Review the program and test it before enabling automated trading.

Expert Advisors cannot be installed or run in FXTRADING.com App.

  1. Open the MT4 platform and select 'File' from the main menu

  2. Click on 'Open Data Folder' to bring up a new folder panel

  3. Open the 'MQL4' folder, then open its 'Experts' folder. Copy your program files (.ex4 and/or .mq4) into 'Experts'.

  4. Restart MetaTrader 4 for changes to take effect

Detailed Installation Guide


Step 1: Obtain the Automated Trading Program Files

Before installation, ensure you have the necessary program files. These typically include:

  • .ex4 file (compiled program)

  • .mq4 file (source code, optional)

  • Additional libraries or resources if required by the program


Step 2: Access the Data Folder

  1. Launch your MT4 platform

  2. Click on 'File' in the top menu

  3. Select 'Open Data Folder' from the dropdown menu


Step 3: Navigate to the Experts Folder

  1. In the File Explorer window that opens, double-click on the 'MQL4' folder

  2. Inside the MQL4 folder, find and open the 'Experts' folder


Step 4: Install the Program Files

  1. Copy your program files (.ex4 and/or .mq4)

  2. Paste them into the 'Experts' folder

    • If your program requires additional libraries, place them in the 'Libraries' folder within MQL4

    • If your program includes custom indicators, place them in the 'Indicators' folder

If you received only an MQ4 source file, open that file in the matching MT4 MetaEditor and use its Compile command. Successful compilation produces an EX4 executable; resolve any reported errors before trying to run the program. Copying an MQ4 file or renaming it to EX4 is not compilation. If you already have a compatible EX4 file, you do not need source code merely to install it.


Step 5: Restart and Verify

  1. Close and restart your MT4 platform

  2. Check the Navigator panel (press Ctrl+N if not visible)

  3. Expand the 'Expert Advisors' section

  4. Your newly installed program should appear in the list


Step 6: Attach the Program to a Chart

  1. Right-click on the program in the Navigator panel

  2. Select 'Attach to a Chart' or drag and drop it onto your desired chart

  3. Configure the program settings in the dialog box that appears

    Review and save Program Parameters
    ​

    1. Open the program’s input-parameter tab. Its fields are supplied by the program developer and can differ between programs.

    2. Double-click a value to edit it. Use parameters you understand; do not guess settings for trade size or risk.

    3. To reuse a saved preset, select Load and choose a settings file intended for this program. Review the loaded values.

    4. Select Save to keep the current parameter set. Give the file a name that identifies the program and settings.

    5. Select Reset only when you want the program’s default inputs. Check the resulting values before continuing.

    6. Review all values before selecting OK in Step 6. Use a Demo Account to test this configuration.

    Saving a preset does not install the program, verify its safety or enable automated trading.
    ​

  4. Click OK to attach the configured program to the chart. Attachment alone does not allow it to place trades: the terminal's automated-trading setting and the program's own trading permission must allow that activity. Review both settings and test the program on a Demo account before using it for live trading.


Troubleshooting Tips

  • If the program doesn't appear after restart, verify the file was placed in the correct folder

  • Ensure the program file is compatible with your MT4 version

  • Check if the program requires additional files or libraries

  • If the program requests additional files, libraries or permissions, confirm the specific requirement with a trusted source and enable only what is necessary. DLL imports and external access can run or connect to third-party code; do not share passwords, one-time codes, private keys or recovery phrases, and do not grant remote access.

Did this answer your question?