MetaTrader 5 · XAUUSD · Mean-reversion & reversal EAs

Keltner Channel Mean Reversion EA

GoldLab Keltner Reversion is a mean reversion EA for MT5. When gold is ranging (low ADX), it fades touches of the outer Keltner Channel once the RSI is stretched and the candle rejects the band, and targets the middle EMA.

GoldLab Keltner Reversion - mean reversion ea mt5
GoldLab Keltner Reversion logo
$99One-time purchase · no subscription · free demo on MQL5
Buy on MQL5 Market →

GoldLab Keltner Reversion is a mean-reversion Expert Advisor for ranging markets. It was designed for XAUUSD (Gold) and also runs on forex pairs and other CFDs. It deliberately stays out of strong trends. Every trade has a stop-loss.

How it trades

  • Regime filter: new trades only while ADX is below the threshold (default 25) - the market is ranging.
  • Setup: a closed bar pierces the outer Keltner band (EMA 20 +/- 1.5 x ATR) and closes back inside it.
  • Confirmation: RSI at an extreme (default below 35 for buys / above 65 for sells, on this bar or the previous one) and a rejection - the bar closes in the trade direction or leaves a long wick (default at least 30% of the bar).
  • Target: the middle EMA. With "track middle" on, the take-profit follows the middle line every bar. A trade is skipped if the middle line is too close compared with the stop.
  • Hard stop-loss: a fixed ATR multiple (default 1.5 x ATR) from entry.
  • Auto-off in trends: if ADX rises above the strong-trend level (default 35) open trades are closed, and no new trades are opened until ADX falls back below the range threshold. An optional time stop closes trades that do not reach the target within N bars.

Risk management

  • Risk % per trade (default 1% of equity) - the lot is calculated from the stop distance. A fixed lot can be used instead.
  • Daily loss limit (default 3% of the day-start equity).
  • Maximum spread filter and optional trading hours.
  • Free-margin check, broker volume limits and stop/freeze levels are respected before every order. One position at a time; works on hedging and netting accounts.

Inputs and default settings

GroupInputDefaultMeaning
StrategySignal timeframeH1Timeframe for the channel (chart timeframe can be anything)
StrategyMiddle EMA / ATR period / Band (x ATR)20 / 14 / 1.5Keltner channel
StrategyRSI period / low / high14 / 35 / 65Stretch confirmation
StrategyMin rejection wick %30Wick size as % of the bar range
RegimeADX period / Max ADX14 / 25Trade only in ranges
RegimeStrong trend ADX35Close open trades above this (0 = off)
StopsStop-loss (x ATR)1.5Hard stop
StopsTrack middle EMAtrueMove the target with the middle line
StopsMin reward/risk0.5Skip trades with too little room to the middle
StopsMax bars in trade48Time stop (0 = off)
Position sizeRisk % / Fixed lot / Max lot1.0 / 0 / 10Position sizing
SafetyDaily loss limit %3.00 = off
SafetyMax spread (points)502-digit gold scale: 100 = 1.00 USD
SafetyUse hours / Start / Endfalse / 1 / 22Optional server-time window
SafetyMagic number26100901Change it to run several copies on one symbol

Recommended setup

  • Symbol: XAUUSD (or your broker's gold symbol); also suits range-bound pairs such as EURCHF or AUDNZD. Signal timeframe: M15, M30 or H1.
  • Hedging or netting accounts; low-spread accounts preferred because targets are shorter than in trend systems.
  • Start on a demo account with the default 1% risk and test the settings in the Strategy Tester with your broker's data first. A VPS is recommended for 24/5 operation.

Honest notes

No martingale, no grid, no averaging - every position has a stop-loss. Mean reversion works in ranges and loses when a range breaks into a trend; the ADX filter reduces but cannot remove that risk. Trading gold, forex and CFDs is high risk and you can lose your capital. No trading system wins every trade, and past or backtested results do not guarantee future results. Only trade money you can afford to lose and always test on a demo account first.

How GoldLab Keltner Reversion trades - illustration
How it trades (illustration, not real trading results).
GoldLab Keltner Reversion risk management features
Built-in risk management.

Plan your risk before you run it

Similar mean-reversion & reversal eas: GoldLab RSI Divergence · VWAP Magnet Reversion · Pivot Sentinel · all 23 GoldLab EAs

FAQ

Why does a mean reversion EA need an ADX filter?

Fading the edge of a channel works in ranges but loses in strong trends. The low-ADX condition keeps the EA out of trending markets, where price can ride the outer band for a long time.

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.