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
- Locate Indicator Files: Find the
.mq5files for the indicators you need to use. You can download these files here. - Open MetaTrader: Launch your MetaTrader platform (MT4 or MT5).
- Open Data Folder:
- In MetaTrader, go to
File>Open Data Folder.
- In MetaTrader, go to
- Navigate to Indicators Folder:
- In the Data Folder window, navigate to
MQL4(for MT4) orMQL5(for MT5), then open theIndicatorsfolder.
- In the Data Folder window, navigate to
- Copy Indicator Files:
- Copy the
.mq5indicator files to theIndicatorsfolder.
- Copy the

Step 2: Copy the Strategy to the MT5 Folder
- Locate EA Strategy Files: Find the
.mq5files for the EA strategy you want to use. - Open MetaTrader Data Folder:
- Follow the same steps as above to open the Data Folder.
- Navigate to Experts Folder:
- In the Data Folder window, go to
MQL4(for MT4) orMQL5(for MT5), then open theExpertsfolder.
- In the Data Folder window, go to
- Copy EA Files:
- Copy the
.mq5EA files to theExpertsfolder.
- Copy the

Step 3: Compile the Strategy and Indicators
- Open MetaEditor:
- In MetaTrader, go to
Tools>MetaQuotes Language Editoror simply pressF4.
- In MetaTrader, go to
- Compile Indicator Files:
- In MetaEditor, navigate to the
Indicatorsfolder, select all.mq5indicator files, and click theCompilebutton (or pressF7). Ensure there are no errors in the compilation.
- In MetaEditor, navigate to the

3. Compile EA Strategy File:
- Open the
.mq5file of your EA strategy and click theCompilebutton (or pressF7). Again, ensure there are no errors in the compilation.

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


Step 4: Refresh MetaTrader 5
- Refresh Navigator:
- Go back to MetaTrader 5.
- In the
Navigatorwindow, right-click and selectRefreshto update the list of available indicators and EAs.

Step 5: Enable Auto Trading
- Enable Auto Trading Globally:
- In MetaTrader, ensure that the
Auto Tradingbutton on the main toolbar is enabled. The button should be green. If it’s red, click it to enable auto trading.
- In MetaTrader, ensure that the
- Configure Auto Trading Settings:
- Go to
Tools>Options(or pressCtrl+O), and then navigate to theExpert Advisorstab. - Check the options
Allow automated tradingandAllow DLL imports. Make sure to configure any additional settings according to your preferences.
- Go to

Step 6: Insert the Strategy into the Chart
- Open the Desired Chart:
- Open a chart for the currency pair or financial instrument you want the EA to trade on.
- Add the EA to the Chart:
- In the
Navigatorwindow, underExpert Advisors, find your EA. - Drag and drop the EA onto the chart, or right-click on the EA and select
Attach to a chart.
- In the
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.

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 tradingoption is checked in theCommontab. - Don’t forget to set the lot size – trade volume based on your account size.

4. Confirm and Start:
- Click
OKto 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 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.
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.





