Build an MT5 EA Without Coding: No-Code Workflow + MQL5 Export

Create trading EAs with AlfaTactix Strategy Builder — optionally fill the form with Tactix Studio. Design strategies visually, export MQL5 — no programming required.

📖 11 min read

📝 2,083 words

🏷️ MQL5 and Expert Advisors

Share this article:

Short answer: yes. You can build a MetaTrader 5 Expert Advisor without writing MQL5: set your rules in a no-code builder, download the generated .mq5 file, compile it once in MetaEditor (F7), then test it in the Strategy Tester and on a demo account before any live money. "Without coding" means you never write the logic; it does not mean you skip MetaEditor or the tests. This guide builds one example strategy in the AlfaTactix Strategy Builder, step by step, and shows the header of the file you download.


Can I Build an MT5 EA Without Coding?

Yes, if your strategy can be said as rules: "buy when RSI(14) crosses above 30, with a stop and a target, risking 1 % per trade". Most indicator strategies can. What you still do yourself:

You doThe builder does
Decide the rules, the market and the riskWrites the MQL5: indicators, conditions, order handling
Compile the file once in MetaEditor (F7)Checks each step of the form before you go on
Test: backtest, Strategy Tester, demo accountNames its own version in the file header

What a no-code builder cannot do: invent an edge for you, or express logic outside its form (custom indicators, unusual order handling). For that, see the last section, when code is still the better choice. Which builder to pick, with each vendor's price and free tier, is a separate question: Best MT5 EA Builder for Beginners.


What You Need Before You Start

Four steps of the builder form: entry signal, market filter, risk, then the generated file.01020304Entry signalMarket filterRiskGenerated file.mq5 or .pineone platform per form
What the form turns into. Each platform has its own builder form, so one strategy produces that platform’s file — not both.
  • Your rule in one sentence. If you can't say it aloud, the form will not make it clearer.
  • MetaTrader 5 on a computer, for the one compile in MetaEditor [1] and the Strategy Tester. The builder itself runs in the browser.
  • A demo account at your broker, for the forward run before live money.
  • No MQL5. You will read a few lines of the file header below; you will not write any.

The example in this guide: EURUSD on M15; buy when RSI(14) crosses above 30, sell when it crosses below 70; stop loss 1 % and take profit 2 % of the price; risk 1 % of the account per trade. It is a teaching example, not a recommendation.


Watch: build a trading strategy with no code

A 4-minute walkthrough: Tactix Studio, the 7-step form, a backtest with the built-in sample run and the code for MetaTrader 5 (MQL5) or TradingView (Pine Script v6).

Narration: a synthetic version of the founder's voice

Trading involves substantial risk of loss. AlfaTactix generates code from the rules you define and does not provide financial advice. Past or backtested performance does not guarantee future results.

Chapters

  1. 0:00 What we build
  2. 0:15 RSI 30/70 example
  3. 0:47 Tactix Studio
  4. 1:39 Platform and timeframes
  5. 2:02 Entry rules
  6. 2:16 Filters
  7. 2:30 Exits
  8. 2:42 Risk
  9. 2:53 Review and save
  10. 3:14 BacktestHypothetical backtest on example data. Past or backtested performance does not guarantee future results. The backtest in the video uses the built-in sample run: made-up prices, not real market prices.
  11. 3:51 Get the code
  12. 4:13 Free plan

Read the transcript

Tactix Studio is part of the paid plans; the form works on every plan.

Step by Step in the Strategy Builder

The builder is a form in 7 steps. One set of rules, built for MQL5 or Pine Script v6: you choose the platform in Step 1, and each strategy is built for one platform. Open the demo and follow along; it needs no account.

StepWhat you set for the example
1. Information and platformName "EURUSD RSI 15m", MetaTrader 5 (MQL5), market: currency pairs
2. TimeframesM15 as the trading timeframe (up to two higher ones are optional)
3. Entry rulesBuy: RSI(14) crosses above its oversold level (30); switch on Sell mirrors Buy
4. FiltersNone for the example; up to 8 (sessions, time ranges, spread, your own conditions)
5. ExitsStop loss and Take profit as Percent of price: 1 % and 2 %
6. Risk and money managementRisk per trade: 1 % of equity (the default), one open position
7. Review and saveRead the summary, fix anything in the Check list, then save

If you would rather describe the idea in a sentence, Tactix Studio fills the same form: it never writes code, and you see every change and save it yourself.

Step 3: Write the Entry Rule

Pick the indicator, the comparison and the level; the summary above the rule says it back in plain words before any code exists. For the example: **RSI(14)** on M15, **crosses above**, **its oversold level** (30). Then switch on **Sell mirrors Buy**: the sell rule becomes "RSI(14) crosses below its overbought level (70)".

AlfaTactix Strategy Builder Step 3 Entry rules: a buy rule, RSI(14) crosses above its oversold level, with a plain-words summary above itAlfaTactix Strategy Builder Step 3 Entry rules: a buy rule, RSI(14) crosses above its oversold level, with a plain-words summary above it
Step 3, Entry rules: the summary in plain words and the buy rule, before the code is generated.

A cross is true only on the bar where it happens. If you want to accept a cross from the last few bars, add the time window **Happened within the last N bars**. Rules can be combined with **All of these** and **Any of these**, and each strategy can use up to 3 timeframes.

Step 5: Set the Stop and the Target

AlfaTactix Strategy Builder, Step 5 Exits: stop loss 1 % and take profit 2 % of the entry price, for buy trades and, turned around, for sell trades
AlfaTactix Strategy Builder, Step 5 Exits: stop loss 1 % and take profit 2 % of the entry price, for buy trades and, turned around, for sell trades

The summary reads the exits back as sentences: "Stop loss 1 % below the entry price", "Take profit 2 % above the entry price", and the same turned around for sells. Other exits (an ATR multiple, an R multiple, a trailing stop, a time exit) live on the same screen.

Step 7: Review and Save

AlfaTactix Strategy Builder, Step 7 Review and save: the whole strategy read back in plain words, from the name and platform to the entry rules
AlfaTactix Strategy Builder, Step 7 Review and save: the whole strategy read back in plain words, from the name and platform to the entry rules

Step 7 reads the whole strategy back in plain words, with a check list below it. Read it as if someone else wrote it: if a sentence is not what you meant, go back to that step. In the demo you can walk all 7 steps; saving, the backtest and the download need a free account. From the saved strategy, Backtest this strategy or Get the code.


What the Downloaded File Looks Like

The download is one readable .mq5 file. These are its first lines for the example strategy, copied unchanged (the file is EURUSD_RSI_15m-d77a9aab.mq5; // … marks skipped lines):

mql5
//+------------------------------------------------------------------+
//| AlfaTactix Strategy Builder v2 - MQL5 Expert Advisor
//| Strategy: EURUSD RSI 15m
//| doc_hash: d77a9aab9a17c05c6900ee403b45c53827ab5d1beb5255acc3eafe43be3c87a0
//| schema_version: 2.2
//| platform: mql5
//| generator version: 1.0.0
//| Generated from the strategy document: do not edit by hand; change the strategy and generate again.
//+------------------------------------------------------------------+
// …
input group "rsi_1 (rsi, 15m)"
input int i_rsi_1_length = 14; // rsi_1 length
// …
input group "Trading"
input bool InpAllowRealAccount = false; // false: no order is ever sent on a REAL account
input group "Broker server clock"
input double InpBrokerUtcOffset = 2.0; // broker server time = UTC + this many hours (winter)
input int InpBrokerDstRule = 1; // broker summer time: 0 none, 1 us, 2 eu

What the header tells you:

  • generator version 1.0.0: every generated file names the generator version in its header. The generators are fixed programs with no AI model inside: the same strategy document and the same generator release always produce the same file, byte for byte.
  • doc_hash identifies the saved strategy the file came from; the file name carries its first characters.
  • InpAllowRealAccount = false: as downloaded, the EA sends no order on a real account. It trades in the tester and on a demo; switching this input on is your decision.
  • InpBrokerUtcOffset and InpBrokerDstRule: set them to your broker's server clock, so time-based rules run at the right hour.
  • The code uses no platform indicator built-ins: every indicator is written out in the file, so you can read it.

Compile It Once in MetaEditor

  1. Save the .mq5 file under MQL5/Experts (in MetaTrader 5: File → Open Data Folder).
  2. Open it in MetaEditor and press F7. The Errors tab should show 0 errors: all 29 golden Expert Advisors compile in MetaEditor with 0 errors and 0 warnings.
  3. MetaTrader 5 now lists the .ex5 under Expert Advisors. Attach it to a chart only after the tests below, with Algo Trading on [2].

"Production-ready" means checked, not "skip testing". Before an EA goes near a live account, it should pass every row:

CriterionWhy it matters
Compiles to .ex5 with 0 errorsBroken code never reaches a chart
Uses the MQL5 trade functions correctly [3]Orders, stops and lot steps follow the documented API
Respects the broker's symbol properties [4]Stop level, minimum volume and volume step differ by broker
Matches your saved strategyNo drift between what you designed and what runs
Passed the Strategy Tester and a demo runThe tester and a live account fill orders differently

Test It: Backtest, Strategy Tester, Then Demo

1. Backtest on the site. From the saved strategy, the Backtest this strategy button runs the same rules in the AlfaTactix backtest, on data you upload, on any timeframe down to one minute; how many days one run covers depends on your plan (Pricing). You don't need MetaTrader 5 for this first test. How it compares with the MT5 tester, and its limits: Backtest engine.

2. The MetaTrader 5 Strategy Tester [5]. Pick the EA, EURUSD and M15, and the tick mode Every tick based on real ticks if your broker has the history [6]. Set the spread to what you see in the hours the EA trades, never zero. Full walk-through: Backtest an EA in the Strategy Tester.

3. A demo account, across several London and New York sessions. It shows real spreads and real fills, which no backtest has. Compare its trades with the tester's for the same days.

A backtest is hypothetical: it uses past prices and perfect rules. Past results don't predict future results.

Before live:

CheckPass?
The compiled .ex5 matches the latest download☐
The tester used real ticks and your broker's spread☐
A stretch of dates was kept unseen until the final check☐
The demo ran across several sessions☐
The Journal shows no repeated 10016 or other errors☐
Risk per trade fits the account size☐

Change the Strategy, Not the Code

To change the EA, change the form and download the file again. Patching the .mq5 by hand makes the code and the saved rules drift apart, and the header says so.

Testing variations, one change at a time. The slow part of a sweep is rebuilding the EA by hand. With a saved strategy, you copy it, change one value and download again. A one-page plan keeps the result honest:

ItemExample
Base strategyThe RSI example, EURUSD M15
Fixed settingsSymbol, timeframe, tester dates, tick mode and spread: identical for every run
Sweep ARSI length 10 / 14 / 21 in Step 3
Sweep BOn the best one or two from A: a session filter in Step 4, London only vs London and New York
MetricsTwo only, for example the net result and the maximum drawdown
Unseen datesKeep the last fifth of the dates unseen until the final pick

Vary one family at a time: if the length and the filter change together, you cannot tell which one moved the result. Name each copy by what changed (RSI_M15_L21, RSI_M15_L14_LDN), log every run in one sheet, and delete no "bad" run before all are logged. A strong backtest is a reason to run a demo, not a forecast.


When Code Is Still the Better Choice

SituationWhy code fits better
Custom indicators or exotic mathsThe builder offers a fixed list of 47 indicator types
Unusual order handlingGrids of pending orders, partial fills by custom logic, broker-specific APIs
MetaTrader 4The builder generates MQL5 for MetaTrader 5 and Pine Script v6 for TradingView, not MQL4
You want to learn MQL5Start with Build Your First EA and the MQL5 Programming Reference

Next Steps

  1. Walk the 7 steps for your own rule in the demo, no account needed.
  2. Create a free account to save it, backtest it and download the .mq5 file.
  3. Compile, then backtest in the Strategy Tester and run it on a demo account.

More on the product: MT5 EA builder. Strategy walk-throughs: MA Crossover EA, Scalping EA, Gold EA (XAUUSD), EA risk management. On TradingView instead: Build a Pine strategy without coding.

Frequently Asked Questions

Yes. In a no-code builder you set the rules (indicators, filters, exits and risk) and the builder writes the MQL5 file. You still compile it once in MetaEditor (F7) and test it in the Strategy Tester and on a demo account, but you never write the logic yourself.

Yes, for one step: MetaTrader 5 runs the compiled .ex5 file, so you open the downloaded .mq5 in MetaEditor and press F7. All 29 golden Expert Advisors of AlfaTactix compile in MetaEditor with 0 errors and 0 warnings. You do not write or edit any code.

Setting the 7 steps for a simple rule, like the RSI example in this guide, is a short session in the form. Testing takes longer and should: a backtest, the MT5 Strategy Tester on real ticks, and a demo run across several sessions before any live money.

You can, but the file header says why you shouldn’t: “do not edit by hand; change the strategy and generate again.” Edit the strategy in the builder and download the file again, so the saved rules and the code never drift apart. The same strategy and the same generator release always give the same file, byte for byte.

Yes. In AlfaTactix the backtest runs on the site, on data you upload, so you don’t need MetaTrader 5 for the first test. Then confirm it in the MT5 Strategy Tester: see Backtest an EA in the Strategy Tester.

It depends on how you think about your strategy: a guided form, blocks, a prompt or a strategy generator. The comparison, with each vendor’s price and free tier, is in Best MT5 EA Builder for Beginners.

Yes, from the same form: you choose the platform in Step 1, and each strategy is built for one platform, MQL5 for MetaTrader 5 or Pine Script v6 for TradingView. The TradingView walk-through: Build a Pine strategy without coding.

Yes: both are rule-based and fit the same 7 steps, with a session filter, a spread limit or an ATR filter in Step 4. See the Scalping EA guide and the Gold EA (XAUUSD) guide.

References

  1. MetaQuotes, MetaEditor Help. Welcome to algorithmic trading!. https://www.metatrader5.com/en/metaeditor/help
  2. MetaQuotes, MetaTrader 5 Help. How to Create an Expert Advisor or an Indicator. https://www.metatrader5.com/en/terminal/help/algotrading/autotrading
  3. MetaQuotes, MQL5 Reference. Trade Functions. https://www.mql5.com/en/docs/trading
  4. MetaQuotes, MQL5 Reference. Symbol Properties. https://www.mql5.com/en/docs/constants/environment_state/marketinfoconstants
  5. MetaQuotes. MetaTrader 5 Built-in Trading Strategy Tester. https://www.metatrader5.com/en/automated-trading/strategy-tester
  6. MetaQuotes, MetaTrader 5 Help. Real and Generated Ticks. https://www.metatrader5.com/en/terminal/help/algotrading/tick_generation