Candle Pattern EA Gold M30
CandlePattern EA — Description
MetaTrader 5 · Expert Advisor · XAUUSD M30
Candle
PatternEA
Automated gold trading based on high-probability Japanese candlestick formations with adaptive risk management.
Overview
CandlePattern EA scans the Gold (XAUUSD) M30 chart for classic candlestick reversal and continuation signals, opens positions automatically, and actively manages them with a trailing stop — protecting gains as the trade moves in your favour.
Candlestick Patterns
The EA monitors five time-tested formations. Each pattern has its own dedicated Stop Loss and Take Profit distances, calibrated independently for gold's volatility profile.
↑↓
Hammer & Inverted Hammer
Long-shadow single-candle reversals. Hammer signals exhaustion of a down-move; Inverted Hammer signals a failed push lower.
Reversal ⊞
Engulfing
A candle that fully wraps the body of the previous one — a strong sign of momentum shift, common on gold after sharp impulse moves.
Reversal ✦
Morning & Evening Star
Three-candle formations capturing an indecisive pause between two directional candles. High-conviction turning points.
Reversal · 3-bar █
Marubozu
A full-bodied candle with virtually no shadows — a pure impulse move with one side in complete control. Traded with-trend for momentum continuation.
Continuation 十
Doji
Open and close nearly identical — the market couldn't decide. After a clear directional move, a Doji often marks the turning point.
Reversal —
3 Soldiers / 3 Crows
Disabled in this version. Too infrequent on M30 gold to contribute meaningful edge.
Disabled Stop Loss & Take Profit
Every pattern uses its own ATR-based SL/TP multipliers — no one-size-fits-all. The Average True Range of gold adapts the distances to current market volatility automatically.
| Pattern | Stop Loss (×ATR) | Take Profit (×ATR) | RR Approx. |
| Hammer / Inv. Hammer | 2.0 | 3.5 | 1 : 1.75 |
| Engulfing | 2.0 | 2.5 | 1 : 1.25 |
| Morning / Evening Star | 1.5 | 2.0 | 1 : 1.33 |
| Marubozu | 2.0 | 2.5 | 1 : 1.25 |
| Doji | 1.2 | 1.8 | 1 : 1.50 |
Protection & Filters
01
Trailing Stop
Once a trade moves into profit, the Stop Loss automatically follows the price tick by tick — locking in gains while letting winners run. The trailing distance and minimum step size are both configurable via ATR multipliers.
02
Trend Filter (MA)
Two moving averages define the current trend. The EA only takes signals aligned with the prevailing direction — no fighting the tape. A reversal mode is also available for counter-trend strategies.
03
Flat Market Protection
When price is ranging close to the slow MA, the EA steps aside. No signals are taken in low-momentum, sideways conditions — a common source of false pattern signals on gold.
04
Volatility Filter
Candles narrower than a defined ATR fraction are ignored. This prevents the EA from reacting to insignificant, low-range bars that carry no directional information.
05
Impulse / News Guard
After an abnormally large candle — typical of sudden news events — the EA pauses. Candlestick patterns forming immediately after a spike are statistically unreliable and are skipped automatically.
06
Market Structure Filter
Higher Highs / Higher Lows confirm an uptrend; Lower Lows / Lower Highs confirm a downtrend. Signals are only accepted when price structure supports the trade direction.
07
Spread Control
A configurable maximum spread threshold prevents entries during wide-spread periods — such as session opens or thin liquidity windows — when execution quality deteriorates.
08
Trading Hours
The EA operates only within a defined server-time window. Outside the configured hours, no new positions are opened — keeping activity within the most liquid parts of the trading day.
Specifications
Max open positions
Configurable (default 5)
Lot sizing
Fixed or % risk
Risk disclosure. Trading leveraged instruments such as gold carries substantial risk of loss and may not be suitable for all investors. Past performance of any strategy is not indicative of future results. Always test on a demo account before live deployment.
CandlePattern EA · v2.00 · XAUUSD M30 · MetaTrader 5 · For informational purposes only