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 do | The builder does |
|---|---|
| Decide the rules, the market and the risk | Writes 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 account | Names 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
- 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
- 0:00 What we build
- 0:15 RSI 30/70 example
- 0:47 Tactix Studio
- 1:39 Platform and timeframes
- 2:02 Entry rules
- 2:16 Filters
- 2:30 Exits
- 2:42 Risk
- 2:53 Review and save
- 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.
- 3:51 Get the code
- 4:13 Free plan
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.
| Step | What you set for the example |
|---|---|
| 1. Information and platform | Name "EURUSD RSI 15m", MetaTrader 5 (MQL5), market: currency pairs |
| 2. Timeframes | M15 as the trading timeframe (up to two higher ones are optional) |
| 3. Entry rules | Buy: RSI(14) crosses above its oversold level (30); switch on Sell mirrors Buy |
| 4. Filters | None for the example; up to 8 (sessions, time ranges, spread, your own conditions) |
| 5. Exits | Stop loss and Take profit as Percent of price: 1 % and 2 % |
| 6. Risk and money management | Risk per trade: 1 % of equity (the default), one open position |
| 7. Review and save | Read 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)".


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

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

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):
//+------------------------------------------------------------------+
//| 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
- Save the
.mq5file underMQL5/Experts(in MetaTrader 5: File → Open Data Folder). - 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.
- MetaTrader 5 now lists the
.ex5under 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:
| Criterion | Why it matters |
|---|---|
Compiles to .ex5 with 0 errors | Broken 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 strategy | No drift between what you designed and what runs |
| Passed the Strategy Tester and a demo run | The 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:
| Check | Pass? |
|---|---|
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:
| Item | Example |
|---|---|
| Base strategy | The RSI example, EURUSD M15 |
| Fixed settings | Symbol, timeframe, tester dates, tick mode and spread: identical for every run |
| Sweep A | RSI length 10 / 14 / 21 in Step 3 |
| Sweep B | On the best one or two from A: a session filter in Step 4, London only vs London and New York |
| Metrics | Two only, for example the net result and the maximum drawdown |
| Unseen dates | Keep 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
| Situation | Why code fits better |
|---|---|
| Custom indicators or exotic maths | The builder offers a fixed list of 47 indicator types |
| Unusual order handling | Grids of pending orders, partial fills by custom logic, broker-specific APIs |
| MetaTrader 4 | The builder generates MQL5 for MetaTrader 5 and Pine Script v6 for TradingView, not MQL4 |
| You want to learn MQL5 | Start with Build Your First EA and the MQL5 Programming Reference |
Next Steps
- Walk the 7 steps for your own rule in the demo, no account needed.
- Create a free account to save it, backtest it and download the
.mq5file. - 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.

