﻿---
title: "How to run strategy in trading platform"
description: "To deploy a StrategyQuant strategy to MetaTrader, export the strategy as an Expert Advisor, copy the EA plus its StrategyQuant (SQX) custom indicators into the matching MQL Experts and Indicators fold..."
url: https://quantmonitor.net/how-to-run-strategy-in-trading-platform/
date: 2024-05-22
modified: 2026-07-21
author: "Kornel"
image: https://quantmonitor.net/wp-content/uploads/2024/05/expert_advisors-jpg.avif
categories: ["Nezařazené"]
type: post
lang: en
---

# How to run strategy in trading platform

To deploy a StrategyQuant strategy to MetaTrader, export the strategy as an Expert Advisor, copy the EA plus its StrategyQuant (SQX) custom indicators into the matching MQL `Experts` and `Indicators` folders, compile both in MetaEditor, then attach the EA to the correct chart with AutoTrading and “Allow live trading” enabled — if it runs but takes no trades, the cause is almost always missing custom indicators or a disabled permission.

Once you have the strategy, the next step is to deploy it live in the trading platform. This guide provides simple, step-by-step instructions to help you set up and run your trading strategies in MT5.

#### Step 1: Copy Indicators to the MT5 Folder

1. **Locate Indicator Files**: Find the `.mq5` files for the indicators you need to use. [You can download these files here](http://webdev.quantmonitor.net/wp-content/uploads/2024/05/CustomIndicators.zip).
2. **Open MetaTrader**: Launch your MetaTrader platform (MT4 or MT5).
3. **Open Data Folder**:
   - In MetaTrader, go to `File` > `Open Data Folder`.
4. **Navigate to Indicators Folder**:
   - In the Data Folder window, navigate to `MQL4` (for MT4) or `MQL5` (for MT5), then open the `Indicators` folder.
5. **Copy Indicator Files**:
   - Copy the `.mq5` indicator files to the `Indicators` folder.

![How to run strategy in trading platform](http://webdev.quantmonitor.net/wp-content/uploads/2024/05/Snimek-obrazovky-2024-05-23-v-9.16.42-2000x1057.png)

#### Step 2: Copy the Strategy to the MT5 Folder

1. **Locate EA Strategy Files**: Find the `.mq5` files for the EA strategy you want to use.
2. **Open MetaTrader Data Folder**:
   - Follow the same steps as above to open the Data Folder.
3. **Navigate to Experts Folder**:
   - In the Data Folder window, go to `MQL4` (for MT4) or `MQL5` (for MT5), then open the `Experts` folder.
4. **Copy EA Files**:
   - Copy the `.mq5` EA files to the `Experts` folder.

![How to run strategy in trading platform](http://webdev.quantmonitor.net/wp-content/uploads/2024/05/Snimek-obrazovky-2024-05-23-v-9.18.59-2000x1057.png)

#### Step 3: Compile the Strategy and Indicators

1. **Open MetaEditor**:
   - In MetaTrader, go to `Tools` > `MetaQuotes Language Editor` or simply press `F4`.
2. **Compile Indicator Files**:
   - In MetaEditor, navigate to the `Indicators` folder, select all `.mq5` indicator files, and click the `Compile` button (or press `F7`). Ensure there are no errors in the compilation.

![How to run strategy in trading platform](http://webdev.quantmonitor.net/wp-content/uploads/2024/05/Snimek-obrazovky-2024-05-23-v-9.23.59-2000x1197.png)

3. **Compile EA Strategy File**:

- Open the `.mq5` file of your EA strategy and click the `Compile` button (or press `F7`). Again, ensure there are no errors in the compilation.

![How to run strategy in trading platform](http://webdev.quantmonitor.net/wp-content/uploads/2024/05/Snimek-obrazovky-2024-05-23-v-9.23.45-2000x1197.png)

4. After compilation, there will be both `.mq5` and `.ex5` files in the respective folders.

![How to run strategy in trading platform](http://webdev.quantmonitor.net/wp-content/uploads/2024/05/Snimek-obrazovky-2024-05-23-v-8.53.02-2-2000x1057.png)

![How to run strategy in trading platform](http://webdev.quantmonitor.net/wp-content/uploads/2024/05/Snimek-obrazovky-2024-05-23-v-8.53.39-2000x1057.png)

#### Step 4: Refresh MetaTrader 5

1. **Refresh Navigator**:
   - Go back to MetaTrader 5.
   - In the `Navigator` window, right-click and select `Refresh` to update the list of available indicators and EAs.

![How to run strategy in trading platform](http://webdev.quantmonitor.net/wp-content/uploads/2024/05/Snimek-obrazovky-2024-05-23-v-9.31.28.png)

#### Step 5: Enable Auto Trading

1. **Enable Auto Trading Globally**:
   - In MetaTrader, ensure that the `Auto Trading` button on the main toolbar is enabled. The button should be green. If it’s red, click it to enable auto trading.
2. **Configure Auto Trading Settings**:
   - Go to `Tools` > `Options` (or press `Ctrl+O`), and then navigate to the `Expert Advisors` tab.
   - Check the options `Allow automated trading` and `Allow DLL imports`. Make sure to configure any additional settings according to your preferences.

![How to run strategy in trading platform](http://webdev.quantmonitor.net/wp-content/uploads/2024/05/Snimek-obrazovky-2024-05-23-v-9.33.32.png)

#### Step 6: Insert the Strategy into the Chart

1. **Open the Desired Chart**:
   - Open a chart for the currency pair or financial instrument you want the EA to trade on.
2. **Add the EA to the Chart**:
   - In the `Navigator` window, under `Expert Advisors`, find your EA.
   - Drag and drop the EA onto the chart, or right-click on the EA and select `Attach to a chart`.

### Warning

If the strategy name contains `DE_15...`, it means the strategy is designed for the DAX40 symbol and the M15 timeframe. Ensure that your chart is set to the correct timeframe.

![How to run strategy in trading platform](http://webdev.quantmonitor.net/wp-content/uploads/2024/05/Snimek-obrazovky-2024-05-23-v-9.39.44-2000x709.png)

3. **Configure EA Settings**:

- A settings window will pop up where you can configure the parameters of your EA. Adjust the settings according to your strategy’s requirements.
- Ensure that the `Allow live trading` option is checked in the `Common` tab.
- Don’t forget to set the lot size – trade volume based on your account size.

![How to run strategy in trading platform](http://webdev.quantmonitor.net/wp-content/uploads/2024/05/Snimek-obrazovky-2024-05-23-v-9.42.45-2000x709.png)

4. **Confirm and Start**:

- Click `OK` to apply the settings. The EA should now be active on the chart.
- You should see a smiley face icon in the top right corner of the chart if the EA is running correctly. If there’s a sad face, recheck your settings and auto trading status.

## Why is your StrategyQuant EA not trading?

An EA that compiles and loads but never opens a position is usually blocked by one of a small set of causes. Match the symptom you see to the fix below before touching the strategy code or parameters.

| Symptom | Likely cause | Fix |
| --- | --- | --- |
| AutoTrading button is off, or the EA shows a sad-face instead of a smiley in the chart corner | Live or automated trading is disabled | Click the global **AutoTrading** button so it is green, and tick **Allow live trading** in the EA’s Common tab. |
| Strategy backtests correctly but takes no live trades | StrategyQuant (SQX) custom indicators are missing from the platform’s Indicators folder | Copy the SQX custom indicator files into the `MQL5` or `MQL4` `Indicators` folder, then recompile. |
| Compile errors, or indicator-cannot-load messages | Custom indicators were not compiled, or were compiled after the EA | Recompile the custom indicators *first*, then recompile the EA so it links to them. |
| EA is running but skips signals it should take | Wrong symbol, timeframe, spread filter, or trading session | Attach the EA to the exact symbol and timeframe it was built on, and check spread and session filters against your broker. |
| Duplicate or conflicting trades across multiple EAs | Two or more EAs share the same magic number | Assign a **unique magic number** to every EA so each manages only its own positions. |
| EA fails to initialize, or the Journal shows a DLL-loading-not-allowed message | The EA imports DLL functions but DLL imports are disabled | Enable **Allow DLL imports** in Tools > Options (and confirm the per-EA prompt if MetaTrader shows one). |

If the EA, permissions and indicators all check out but trades still stop appearing, confirm the platform itself is actually running — a frozen terminal or a rebooted VPS looks identical to a broken EA. Our free [monitoring agent](https://quantmonitor.net/monitoring/) acts as a heartbeat check that alerts you when your MetaTrader terminal or VPS goes offline — [here’s how to set it up in a few minutes](https://quantmonitor.net/how-to-monitor-trading-vps-platform-uptime/).

## StrategyQuant to MetaTrader deployment FAQ

### How do I export a StrategyQuant strategy to MetaTrader?

In StrategyQuant X, open the strategy and export it as a MetaTrader Expert Advisor (choose the MT4 or MT5 target that matches your platform). This produces the EA source file plus any custom indicator files the strategy depends on, which you then copy into MetaTrader.

### Why is my StrategyQuant EA not taking trades?

The most common reasons are that AutoTrading or “Allow live trading” is disabled, or that the strategy’s custom indicators are missing from the MetaTrader Indicators folder. Enable both permissions and confirm the indicators are present and compiled before checking anything else.

### Where do StrategyQuant custom indicators go in MetaTrader?

Place the custom indicator files in the platform’s Indicators folder — under `MQL5` for MetaTrader 5 or `MQL4` for MetaTrader 4 — then recompile them in MetaEditor. The EA cannot resolve its signals if these indicators are absent, which is why it can backtest but fail to trade live.

### Do I need to enable DLL imports for a StrategyQuant EA?

Only if the exported EA actually imports DLL functions — many StrategyQuant EAs do not. When an EA does require a DLL and imports are disabled, MetaTrader logs a DLL-loading-not-allowed message and the EA cannot initialize, so tick “Allow DLL imports” in Tools > Options before running it.

### Why does my EA backtest but not trade live?

A strategy that backtests but does not trade live is almost always missing its custom indicators in the live Indicators folder, or has AutoTrading or live-trading turned off. Verify the indicators are copied and compiled and that both permission toggles are on.

### What magic number should I set for my EA?

Set a unique magic number for each EA you run — any integer works as long as no two EAs on the account share it. The magic number lets each EA identify and manage only its own trades, preventing duplicate or interfering orders.

*For more strategy-building and deployment guides, visit the [QuantMonitor blog](https://quantmonitor.net/blog/).*
