Skip to content
72lab

How to build an MT5 EA without coding: 7-step guide

Follow the steps in order and you'll have your first validated EA in about half an hour.

  1. 1

    Prepare data

    On the “Data” page, pick historical data provided by the site, or export a CSV with MT5's “Export Bars” or our export script and import it. The data is only used for backtesting in your browser.

  2. 2

    Build or generate a strategy

    In Strategy details, pick indicators and rules and adjust the settings, with up to 8 entry rules and 4 exit rules. Or set acceptance criteria in the generator and let it combine indicators to find strategies automatically.

  3. 3

    Read the report

    The backtest report lists about 25 statistics, including net profit, max drawdown, profit factor, Sharpe ratio and SQN, plus P&L by weekday and by hour and a monthly P&L table.

  4. 4

    Test robustness

    Use out-of-sample data, optimization, walk-forward analysis, Monte Carlo tests and multi-market tests to make sure the strategy doesn't just fit one stretch of past market conditions.

  5. 5

    Combine several strategies

    Put several weakly correlated strategies into a portfolio and look at the combined equity curve and drawdown; the whole portfolio can be exported as a single EA.

  6. 6

    Export and compile the EA

    Export the .mq5 or .mq4 file, put it in the Experts folder inside MetaTrader's data folder, open it in MetaEditor and press F7 to compile.

  7. 7

    Check it in the Strategy Tester and on a demo account

    Backtest in the MT5 Strategy Tester with the “1 minute OHLC” model and compare the result with the Workshop's report. Once they match, run the EA on a demo account first before considering live trading.

MT5 / MT4 data export scripts

Put the script in the Scripts folder inside MetaTrader's data folder and drag it onto a chart to run it. It exports a CSV with the spread and symbol properties that you can import straight into the EA Workshop.

How many candles you can export depends on three things: MetaTrader's "Max bars in chart" (Tools → Options → Charts; 100,000 by default, set it to Unlimited and restart), how much history your broker's server has, and the studio keeping at most the newest 200,000 candles per dataset. The MT5 script exports all seven timeframes from M1 to D1 in one run (one file per timeframe, import them together) with the broker's name in the file header. It first downloads older history from the broker and writes in the Experts log which of these limited each timeframe.

Risk warning: forex, CFDs, options, futures and crypto assets usually involve leverage or high volatility, and you can lose more than you put in. This lesson only teaches the concepts; all numbers are for illustration and are not investment advice.