GoldLab Supertrend Rider is a fully automated Expert Advisor for MetaTrader 5. It is designed for XAUUSD (gold) and also runs on other symbols such as EURUSD.
How it trades
- Supertrend calculated in code - the classic ATR-based Supertrend (default ATR 10, multiplier 3) is computed inside the EA on closed bars; no external indicator files are needed.
- Entry on a flip - when the Supertrend flips direction on a closed bar, the EA enters in the new direction only if the higher-timeframe Supertrend (default H4) points the same way.
- Alignment entry (optional) - if the higher timeframe turns to agree with an already established signal-timeframe trend, the EA can also enter then.
- Stop-loss just beyond the Supertrend line (kept between a minimum and maximum ATR distance). Optional fixed take-profit (default none - the trend is ridden).
- Partial close at 1R (optional, default 50%) and the stop moves to break-even.
- Trailing - on every new bar the stop follows the Supertrend line, and the trade is closed when the Supertrend flips against it.
Risk management (built in)
- Every trade is opened with a stop-loss. There is no martingale, no grid and no averaging down.
- Position size from risk % of balance (default 1%) or a fixed lot; lots are normalised to the broker's min / max / step and reduced if free margin is not enough.
- Daily loss limit: no new trades for the rest of the day once equity is down the set % from the day-start balance.
- Max spread filter, optional trading-hours filter, and no orders while the market is closed or trading on the symbol is disabled.
- Stop-loss / take-profit are always placed outside the broker's stops and freeze levels.
- Works on hedging and netting accounts (on netting accounts it opens only when the symbol has no position).
Inputs and default settings
| Input | Default | Description |
|---|---|---|
| Signal timeframe | Current | Timeframe of the main Supertrend |
| Supertrend ATR period / multiplier | 10 / 3.0 | Main Supertrend settings |
| Calculation bars | 300 | History used for the calculation |
| Use HTF filter / Higher timeframe | true / H4 | Require higher-timeframe agreement |
| HTF ATR period / multiplier | 10 / 3.0 | Higher-timeframe Supertrend settings |
| Enter when HTF aligns | true | Also enter when the HTF turns to agree |
| Stop buffer (x ATR) | 0.1 | Distance beyond the Supertrend line |
| Min / Max stop (x ATR) | 0.5 / 4.0 | Stop distance limits |
| Take-profit (R) | 0.0 | 0 = no fixed target |
| Partial close / trigger (R) / size (%) | true / 1.0 / 50 | Partial profit and break-even |
| Trail on Supertrend | true | Stop follows the Supertrend line |
| Exit on opposite flip | true | Close when the Supertrend flips against the trade |
| Risk per trade (%) | 1.0 | Risk as % of balance, used when Fixed lot = 0 |
| Fixed lot | 0.0 | Fixed lot size (0 = use Risk %) |
| Maximum lot | 10.0 | Upper cap per trade |
| Use minimum lot if risk lot is too small | true | On small accounts trade the broker minimum instead of skipping |
| Magic number | 20271005 | Change it to run several copies on one account |
| Daily loss limit (%) | 3.0 | Stop opening trades for the day at this loss (0 = off) |
| Max spread (points) | 60 | 2-digit gold / 4-digit FX scale (100 = 1.00 USD on gold); 0 = off |
| Restrict to trading hours | false | Optional start / end hour (server time) for new entries |
| Max slippage (points) | 30 | Same scale as spread |
| Show info panel | false | Optional status panel on the chart |
Recommended setup
- Symbol / timeframe: XAUUSD H1 with H4 filter (designed for gold); also FX majors. Use a higher timeframe above the chart timeframe (e.g. M15 + H1, H1 + H4).
- Account: any (hedging or netting), any deposit that allows the broker's minimum lot with a sensible risk %.
- VPS: recommended for uninterrupted operation.
Honest notes
- No trading system can guarantee profit. Past performance, in the tester or live, does not guarantee future results.
- Always test the EA in the MetaTrader 5 Strategy Tester and then on a demo account before using real money, with your broker's own data and spread.
- Session hours are in your broker's server time - check your broker's time zone and adjust the hour inputs if needed.
- Start with a low risk % and use money you can afford to lose.


Plan your risk before you run it
- Check the lot the EA will use for your balance and stop with the XAUUSD lot size calculator and the margin calculator.
- Compare targets and stops with the risk reward calculator.
- How to Set a Stop Loss on Gold (ATR Method)
- Best Timeframe for Gold Trading: Pros and Cons
- How to Backtest an EA in the MT5 Strategy Tester
- Martingale vs Grid vs Stop-Loss EA on Gold (XAUUSD)
- XAUUSD Leverage Explained: What It Really Changes on Gold
- Running Multiple EAs on One MT5 Account: Magic Numbers and Total Risk
FAQ
Why does the Supertrend EA use a higher timeframe?
A Supertrend flip on its own changes often in a sideways market. Requiring the higher timeframe Supertrend to point the same way filters out many of those flips and keeps trades with the larger trend.
Is this a Supertrend EA for XAUUSD (gold)?
Yes. Supertrend Rider is built for XAUUSD on MetaTrader 5, run on H1 with an H4 filter (or M15 with H1). Supertrend is calculated from ATR, so its distance from price widens and narrows with gold's volatility - see the guide on setting a gold stop loss with ATR.
Is there a free demo?
Yes. Every MQL5 Market product has a free demo that runs in the MetaTrader 5 Strategy Tester, so you can test it on your broker's own data before buying.
Does it use martingale, grid or averaging down?
No. Every position is opened with a stop-loss, the lot size comes from your risk % (or a fixed lot), and there is a daily loss limit.
Which broker and account do I need?
Any MetaTrader 5 broker that offers XAUUSD, on a hedging or netting account. A low-spread account and a VPS for 24/5 operation are recommended.
Can this EA guarantee profits?
No. No trading system wins every trade, and backtest or past results do not guarantee future results. Start on a demo account with the default risk.
Trading gold, forex and CFDs is high risk and you can lose your capital. This page is for information only and is not investment advice. Illustrations are not trading results.
