SuperTrend EA for MT5 — No Code
Quick Answer: SuperTrend EA Without Code
Quick answer: Add Supertrend on Step 3 — Signals in AlfaTactix Strategy Builder. On Buy, add condition Cross → Direction Up (timeframe M15 or H1, Confirmation 1–2). On Sell, Cross → Direction Down. Set indicator ATR Period 10, Multiplier 3, Source Close (product defaults). Add Stop Loss on Step 5, Save, export MQL5 from Code Generator, compile once in MetaEditor, backtest EURUSD M15 with Every tick in the Strategy Tester.
Disclosure: This is an educational build guide, not financial advice. Backtest and Demo results do not guarantee live profits.
Related guides: SuperTrend Indicator (academy) · Build EA Without Coding · MA Crossover EA — No Code · Backtest in Strategy Tester
What Is a SuperTrend EA?
A SuperTrend Expert Advisor automates a well-known trend-following rule:
| Signal | Rule (typical) |
|---|---|
| Buy (long) | Price flips above the Supertrend line — uptrend / Direction Up |
| Sell (short) | Price flips below the line — downtrend / Direction Down |
Supertrend uses ATR to place a dynamic band; the line switches between upper and lower bands when price closes through the band. In MQL5, execution still runs inside OnTick(); in Strategy Builder you define when entries fire — the export handles indicator handles and buffers.
Why traders search for this: Clear trend signals without coding ATR math. Most tutorials show Pine or MQL5 code. This guide maps the same idea to every parameter and condition Supertrend exposes in AlfaTactix.
Classic Settings and When It Works
| Setting | Starter value | Notes |
|---|---|---|
| ATR Period | 10 | Default in builder (range 1–100) |
| Multiplier | 3 | Default; higher = wider band, fewer flips |
| Source | Close | Also: High, Low, Typical, Median |
| Timeframe | M15 or H1 | M5 = more signals; H4 = slower |
| Symbol | EURUSD, GBPUSD | Lower spread helps trend systems |
| Confirmation | 1–2 bars | Reduces one-bar noise on Cross |
Works best: Clear trends, liquid sessions (London / New York overlap).
Struggles in: Tight ranges — repeated flips (whipsaw). Mitigate with Step 4 session or spread filters and Step 5 stop loss.
For indicator theory and limitations, see SuperTrend Indicator — Settings & Entries.
Supertrend Parameters in Strategy Builder
On Step 3 — Signals, add indicator Supertrend (Trend group). The Parameters panel shows:
| Parameter | Type | Range / options | Default | What it does |
|---|---|---|---|---|
| ATR Period | Number | 1 – 100 | 10 | Lookback for Average True Range |
| Multiplier | Number | > 0 (step 0.1) | 3 | Scales distance of bands from mid-price |
| Source | Select | Close, High, Low, Typical, Median | Close | Price input for calculations |
Tip: Keep exported parameters aligned with your Cross timeframe tab (e.g. tf0 = M15 on Buy/Sell rules).
Supertrend Condition Types Explained
Open Supertrend on Step 3 → Add condition. The product exposes six condition types:
1. Cross (recommended for flip EA)
| Field | Options | Default |
|---|---|---|
| Direction | Up · Down | Up |
| Timeframe | 1m … 1M (full list in UI) | 1d |
| Confirmation | 1 – 10 bars | 1 |
Use for this guide: Buy = Cross Up on your trading TF (e.g. M15). Sell = Cross Down on the same TF.
2. Trend Direction
| Field | Options | Default |
|---|---|---|
| Direction | Up · Down | Up |
| Timeframe | 1m … 1M | 1d |
Use case: “Only buy when Supertrend is already Up” — fewer entries than Cross; good as a filter combined with another signal (AND).
3. Breakout
| Field | Range | Default |
|---|---|---|
| Direction | Up · Down | Up |
| Threshold | Number (step 0.01) | 0.01 |
| Period | 1 – 100 | 10 |
| Confirmation | 1 – 10 | 1 |
Use case: Breakout-style distance from the line — advanced; test in Strategy Tester before live.
4. Pullback
| Field | Range | Default |
|---|---|---|
| Direction | Up · Down | Up |
| Threshold | step 0.01 | 0.01 |
| Confirmation | 1 – 10 | 1 |
Use case: Enter on pullback toward the line in an established trend.
5. Range Breakout
Same fields as Breakout (Direction, Threshold, Period, Confirmation).
6. Multi-Timeframe Confirm
| Field | Options | Default |
|---|---|---|
| Timeframes | Multiselect 1m … 1M | 1d |
| Confirmation | 1 – 10 | 1 |
Use case: Require Supertrend alignment on e.g. H1 and M15 before entry. See also Advanced EA MTF & Filters.
Trader-Reported Themes (Forums)
Educational summary — not quotes from individuals.
In public threads on r/algotrading and r/Forex, traders often report similar themes about trend-following tools such as Supertrend:
- Whipsaw in ranges — multiple small losses when price chops around the line
- Session matters — filtering to London / New York overlap is a common mitigation
- Backtest vs live — spread and slippage change results; validate on Demo (Strategy Tester vs Live)
- Not a holy grail — combination with risk limits and filters beats “set and forget”
We do not attribute profitability to any influencer “secret” strategy. Validate on your broker and symbol.
Build the SuperTrend EA Step by Step
Workflow: six steps in Strategy Builder demo.
Step 1 — Strategy information
- Name: e.g.
Supertrend M15 EURUSD - Description: optional
Step 2 — Timeframes
- Enable M15 (or H1) as the trading timeframe for Step 3 tabs.
Step 3 — Signals (core)
- Tab Buy → timeframe M15.
- Add indicator → Supertrend.
- Parameters: ATR Period 10, Multiplier 3, Source Close.
- Add condition → Cross → Direction Up, Timeframe M15, Confirmation 2.
- Tab Sell → same indicator settings.
- Add condition → Cross → Direction Down, Timeframe M15, Confirmation 2.
Optional: Add Trend Direction Up on Buy with AND if you want entries only when already in uptrend (stricter).
Step 4 — Filters (optional)
- Market Session → condition isActive → sessions London, New York (Advanced MTF & Filters)
- Liquidity Filters → hasSpread → maxSpread e.g. 0.01 (≈ 1 pip decimal for EURUSD — adjust per broker)
Step 5 — Risk management
| Setting | Suggestion |
|---|---|
| Lot / risk % | 0.01 Demo or 0.5–1% risk |
| Stop Loss | Fixed pips or ATR-based |
| Take Profit | Optional; many Supertrend EAs exit on opposite Cross |
| One position | Avoid overlapping entries |
See EA Risk Management.
Step 6 — Preview and Save
Review Buy/Sell rules → Save.
Export, Compile, and Backtest
- Code Generator → saved strategy → MQL5 → download
.mq5. - Copy to
MQL5/Experts, compile (F7) in MetaEditor. - Strategy Tester: Every tick, realistic spread, 6–12 months.
- Demo before live. Read Strategy Tester vs Live.
Error 10016: Invalid Stops.
Improvements: Filters and Risk
| Problem | Builder lever |
|---|---|
| Whipsaw in range | Confirmation 2–3; Step 4 session filter; higher Multiplier |
| Late entries | Lower Multiplier or shorter ATR Period (more noise) |
| Spread cost | Step 4 hasSpread / liquidity filter |
| Trend quality | Multi-Timeframe Confirm H1 + M15 |
Next Steps
- SuperTrend Indicator guide — settings and signal logic
- MA Crossover EA — No Code — another beginner trend template
- Scalping EA concepts · Scalping EA — No Code — faster timeframe build
- Build EA Without Coding — full six-step tour
- Production-Ready MQL5 Without MetaEditor
Try it: Strategy Builder demo — build the Supertrend Cross EA, export, and backtest in one session.
References: Investopedia — SuperTrend · TradingView SuperTrend · MetaTrader 5 Strategy Tester.