Blog / Strategy
Strategy

Piercing Cloud Reversal

Disclaimer: This article is for educational and informational purposes only. It does not constitute financial or investment advice. Trading forex and CFDs carries significant risk of loss. Past performance of any strategy — including backtests — does not guarantee future results. Never trade with money you cannot afford to lose.

What Is This Strategy?

The Piercing Cloud Reversal is a price-action reversal strategy built on two of the oldest and most widely studied Japanese candlestick patterns — the Piercing Line (a bullish two-candle reversal) and its mirror image, the Dark Cloud Cover (a bearish two-candle reversal). Rather than trading these patterns wherever they appear, the strategy layers a support/resistance liquidity-sweep filter and an Average True Range (ATR) volatility filter on top, so it only acts when the pattern forms at a meaningful level. ATR is a common volatility indicator that measures the average size of a candle's range over a set number of bars. The trading style here is short-term, single-timeframe swing/reversal trading: it waits patiently for a specific structure to appear, then enters once.

The core idea is about absorption and rejection. A strong "drive" candle pushes hard in one direction. The very next candle pokes past a recent swing high or low — appearing to break out and "grab liquidity" resting beyond that level — but then closes back through the midpoint of the drive candle's body. That partial recovery, deliberately not a full engulfing, is the classic signature of the Piercing/Dark-Cloud family. It suggests the breakout was rejected and the prior move may be losing steam.

This strategy is best suited as a learning tool for traders studying candlestick patterns, support and resistance, and liquidity concepts. It is a clean, rules-based way to see how a textbook reversal pattern can be made more selective by adding context. It is not a shortcut to results, and the sections below are framed as analysis of how the logic behaves — not as a promise of outcomes.

How It Works

The strategy evaluates its rules once per completed bar (it ignores the still-forming candle) and holds at most one position per symbol at a time. When a signal fires, here is what the logic checks and does.

Entry conditions — Bullish Piercing Line (long):

Entry conditions — Bearish Dark Cloud Cover (short):

Stop-loss logic:

Take-profit logic:

piercing cloud reversal MT5 EA
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
Lots 0.10 0.01 1.0 Fixed trade size in lots for each position the strategy opens.
AtrPeriod 14 7 28 Number of bars used to calculate the ATR volatility measure for stops and the body filter.
AtrStopMult 0.5 0.1 2.0 ATR multiple added beyond the signal candle's extreme to set the stop-loss buffer.
RewardRisk 1.6 0.5 4.0 Reward-to-risk ratio; the take-profit distance as a multiple of the stop distance.
LevelLookback 12 5 40 Number of bars scanned before the signal candle to define recent support and resistance.
MinBodyAtr 0.5 0.1 2.0 Minimum drive-candle body size, expressed as a multiple of ATR, to qualify as a strong drive.

The expert advisor also uses a fixed Magic number (default 7421) to identify and manage only its own positions, leaving any other trades on the account untouched.

piercing cloud reversal MT5 EA — MQL5 source code

Recommended Chart Settings

This strategy was designed as a single-timeframe system, meaning all of its signals come from the chart it is attached to. Candlestick reversal patterns like the Piercing Line and Dark Cloud Cover are most commonly studied on intraday-to-swing timeframes such as M30, H1, and H4, where individual candles carry enough structure for the sweep-and-reclaim logic to be meaningful. Major forex pairs (for example EUR/USD, GBP/USD, or USD/JPY) are a natural starting point for study because their liquidity tends to produce cleaner swing levels.

There is no universally "correct" symbol or timeframe. Behavior will vary considerably across instruments, sessions, and market conditions, so treat any chosen setting as a hypothesis to test rather than a fixed rule. Always study the strategy on a demo account across several market environments before drawing conclusions.

How to Install on MetaTrader 5

What to Consider Before Using This EA

Strengths of the approach. The Piercing Cloud Reversal is conceptually clear and selective. By requiring a liquidity sweep of a recent level and a strong drive candle and a partial-reclaim close, it filters out many of the random candlestick patterns that appear in noisy price action. The ATR-based stop adapts to volatility, and the fixed reward-to-risk target enforces a consistent, pre-defined exit plan — a discipline many discretionary traders struggle to maintain.

Known limitations. Candlestick reversal patterns are, by nature, probabilistic and context-dependent. The Piercing Line and Dark Cloud Cover do not reliably mark tops and bottoms; they simply describe a possible shift in short-term momentum that may or may not follow through. Because the strategy insists on a partial reclaim (≥50% but <100% of the drive body), it intentionally passes on full-engulfing reversals that some traders consider stronger. It also takes only one position at a time and enters at market on the next bar, so fast-moving markets can produce slippage between the signal and the fill.

Where it may underperform. Strong, persistent trends can repeatedly sweep levels and keep going, turning "reversal" signals into losses against the dominant move. Very quiet, range-bound conditions may rarely produce a drive candle large enough to pass the MinBodyAtr filter, leading to long stretches with no trades. As always, results will differ across symbols, timeframes, and broker conditions — the logic is a framework for study, not a finished system.

Risk Management Tips

Sound risk management matters more than any single entry signal. Consider these general, educational principles:

Risk Warning

Trading foreign exchange, CFDs, and other leveraged financial instruments involves substantial risk of loss and is not suitable for all investors. The strategies and tools discussed on this page are provided for educational purposes only and do not constitute financial advice, investment recommendations, or solicitation to trade. Always consult a qualified financial adviser before making trading decisions. Past backtest performance is not indicative of future results.

Downloads

← Back to Blog