Export your strategy to MetaTrader 5 as an MQL5 Expert Advisor
Published 2 Jun 202615 minutesAndroid + PC13 steps
Build a trading strategy visually in Forex Strategy Studio on your Android phone. Export it as real MQL5 source code. Compile and run it as a live Expert Advisor in MetaTrader 5 - on any broker, any symbol. No coding required.
What you need
Forex Strategy StudioAndroid
MetaEditorPC - included with MT5
MetaTrader 5Any broker
Google DriveOr any file transfer
Part 1 of 2
On your phone - build and export
Steps 01 to 06 · Forex Strategy Studio on Android
01
Open Forex Strategy Studio
Launch the app on your Android device. If you haven’t built a strategy yet, start with the Strategy Builder - the visual canvas lets you wire indicator nodes together without writing a single line of code.
02
Open the menu
Tap the menu icon (top-left or hamburger) to open the main navigation drawer.
03
Open Strategy Builder
Tap Strategy Builder to open the visual strategy canvas.
04
Select a strategy to export
Open the strategy selector and choose the strategy you want to export to MetaTrader 5.
Before you export. The strategy must have exactly one Signal generator node (a node with a Signal output) and must not contain any infinite loops - otherwise the MQL5 export will not compile correctly.
05
Tap MQL + Share
Tap the MQL button in the Strategy Builder toolbar, then select Share. The app generates a real .mq5 source file from your strategy and opens the Android share sheet.
06
Upload via Google Drive
From the Android share sheet, choose Google Drive (or any service you can also access on your PC - email, Dropbox, OneDrive all work). Upload the .mq5 file.
Now switch to your PC
The .mq5 file is in Google Drive. Open Google Drive on your PC and download it - then follow the steps below to compile and run it in MetaTrader 5.
Part 2 of 2
On your PC - compile and run in MetaTrader 5
Steps 07 to 13 · MetaEditor and MetaTrader 5
07
Download the MQL5 file to your PC
Open Google Drive in your browser on your PC and download the .mq5 file you uploaded in Step 6.
08
Open the Experts folder in MetaEditor
Open MetaEditor (it installs automatically with MetaTrader 5). Select File → Open Data Folder, then navigate to MQL5 → Experts → Advisors. This is where MetaTrader 5 looks for Expert Advisor source files.
Folder path
MQL5/Experts/Advisors/
09
Copy the file into the Experts folder
Copy (or move) the downloaded file into the Experts/Advisors folder. Confirm the filename ends in .mq5 - not .mq5.txt or similar.
10
Compile in MetaEditor
Open the .mq5 file in MetaEditor and click Compile (or press F7). The Errors tab at the bottom should show 0 errors. Your Expert Advisor is ready.
11
Open Strategy Tester in MetaTrader 5
Switch to MetaTrader 5 and open the Strategy Tester via View → Strategy Tester (or Ctrl+R). This lets you run the Expert Advisor against historical data before going live.
12
Configure and start the backtest
In the Strategy Tester panel, select your Expert Advisor from the dropdown. Set your Symbol (e.g. EURUSD), Timeframe, and Date Range, then click Start.
13
Analyse the results
When the backtest completes, review the results across all tabs: Graph (equity curve), Report (full statistics), and Journal (trade log). If the results look good, the same EA can be attached to a live chart in MetaTrader 5 for live or demo trading.
Risk. Backtest results do not guarantee future results. Try a new Expert Advisor on a demo account before trading live.