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 Wedge Convergence Breakout is a chart-pattern trading strategy that hunts for one of the most recognizable shapes in technical analysis — the wedge — and trades its resolution. A wedge is a converging price channel in which both boundary lines tilt the same direction while the distance between them narrows. This strategy fits two least-squares trendlines (a "line of best fit" through recent price points) — one to the recent bar highs and one to the recent bar lows — and then checks whether those lines are pinching together while sharing a common tilt. When price finally escapes the wedge against its own slope, the strategy signals an entry.
The logic rests on a well-documented idea in classical charting: a wedge represents an exhausting move. In a rising wedge, buyers keep pushing price higher, but each new leg gains less ground and the range compresses — a sign momentum is fading. Classical theory holds that such a pattern tends to resolve against its slope, so a rising wedge is treated as bearish and a falling wedge as bullish. This strategy encodes that convention directly: it goes short when a rising wedge breaks down through its support line, and long when a falling wedge breaks up through its resistance line.
As a learning tool, the Wedge Convergence Breakout is well suited to traders who want to study how objective, rule-based pattern recognition can replace subjective "eyeballing" of trendlines. It is designed for compressing, transitional markets rather than strong one-directional trends or dead-flat ranges. It was built with liquid instruments in mind — a forex major such as EURUSD or GBPUSD, or gold (XAUUSD) — on intraday-to-swing timeframes like M30 or H1. Treat it as a framework for understanding convergence, tilt, and breakout confirmation, not as a shortcut to guaranteed outcomes.
How It Works
The strategy evaluates the market only once per newly-closed bar and uses closed bars only, so its signals do not repaint (change after the fact). Here is what happens on each new bar:
- Measure the wedge. The strategy fits a least-squares trendline through the last
WedgeBarshighs and another through the lastWedgeBarslows. The slope of each line describes its tilt, and the values at the window's start and end describe how wide the channel was then versus now. - Convergence gate. The channel width now must be no more than
ConvergenceRatiotimes the width at the start of the window. This confirms the boundaries are genuinely pinching together (a real wedge) rather than widening into a broadening formation. - Tilt gate. Both trendline slopes must share the same sign (both up, or both down), and the average boundary must have travelled at least
MinSlopeAtrATRs across the window. ATR (Average True Range) is a volatility measure, so scaling the tilt in ATR units keeps the threshold meaningful across any symbol or timeframe. This is what separates a true wedge from a flat symmetric triangle, whose boundaries slope in opposite directions. - Entry — short. If a rising wedge is confirmed and the just-closed bar closes below the fitted support line, while the prior bar was still on or above it, the strategy signals a sell. This is the first decisive close that escapes the wedge against its upward tilt.
- Entry — long. If a falling wedge is confirmed and the just-closed bar closes above the fitted resistance line, while the prior bar was still on or below it, the strategy signals a buy — the first close escaping the wedge against its downward tilt.
- Stop-loss. Risk is defined by volatility. On a short, the stop is placed
SlAtrMultATRs above entry; on a long,SlAtrMultATRs below entry. Because the stop scales with ATR, it automatically widens in volatile conditions and tightens in quiet ones. - Take-profit. The target sits
TpAtrMultATRs in the direction of the trade. With the default multipliers (1.5 ATR stop, 2.5 ATR target), this creates a fixed reward-to-risk ratio of roughly 1.67 to 1. - One position at a time. The strategy holds only a single position per magic number. Once open, the trade is managed entirely by its ATR-based stop-loss and take-profit — there is no averaging in or pyramiding.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| WedgeBars | 24 | 12 | 60 | Number of closed bars used to fit the two boundary trendlines (the wedge window). Larger values track slower, wider wedges. |
| ConvergenceRatio | 0.70 | 0.40 | 0.95 | Channel width now must be at most this fraction of the width at the window's start. Lower values demand a tighter pinch. |
| MinSlopeAtr | 0.5 | 0.1 | 2.0 | The average boundary must travel at least this many ATRs across the window, ensuring a genuine shared tilt rather than a flat triangle. |
| AtrPeriod | 14 | 7 | 30 | Lookback period for the Average True Range used to normalize tilt and size the stop and target. |
| SlAtrMult | 1.5 | 0.5 | 4.0 | Stop-loss distance as a multiple of ATR. Larger values give the trade more room but risk more per position. |
| TpAtrMult | 2.5 | 1.0 | 6.0 | Take-profit distance as a multiple of ATR. Together with SlAtrMult this sets the reward-to-risk ratio. |
| Lots | 0.10 | 0.01 | 2.0 | Fixed order volume in lots. Should be adjusted to your account size and risk tolerance. |
| Magic | 44120 | 0 | 9,999,999 | Unique identifier so the EA manages only its own positions and does not interfere with other trades. |

Recommended Chart Settings
This strategy was designed with liquid instruments in mind — a forex major such as EURUSD or GBPUSD, or gold (XAUUSD) — on M30 to H1 timeframes, where wedges have room to form and resolve cleanly. That said, the timeframe is never hardcoded: the EA measures the wedge on whatever chart period it is attached to at run time, so you are free to experiment.
Because the tilt and risk are both scaled in ATR units, the same parameter thresholds remain meaningful across symbols and timeframes. Even so, results will vary considerably across different market conditions, instruments, and broker spreads. Always test any configuration on your own data before drawing conclusions.
How to Install on MetaTrader 5
- Download the .ex5 file from the link below
- Copy it to your MT5
MQL5\Expertsfolder - Restart MetaTrader 5 or refresh the Navigator panel
- Drag the EA onto a chart matching the recommended symbol and timeframe
- Configure the input parameters and enable Algo Trading
What to Consider Before Using This EA
Strengths of the approach. The Wedge Convergence Breakout turns a traditionally subjective pattern into a fully objective, repeatable rule set. Where two analysts might draw wedge trendlines differently, this strategy uses least-squares fitting so the boundaries are calculated the same way every time. The layered gates — convergence, shared tilt, and a decisive escaping close — are designed to filter out the aimless "pokes" that plague naive channel-breakout systems. Its non-repainting design and ATR-scaled risk are also sound engineering practices worth studying in their own right.
Known limitations. No pattern strategy fires on every bar, and wedges are relatively rare, so signals may be infrequent — this is a patient system, not a high-frequency one. Wedge theory itself is a heuristic, not a physical law: many wedges break in the "wrong" direction, and a linear trendline fit is a simplification of a curved or noisy boundary. Fixed-lot sizing does not adapt to changing account equity, and the fixed reward-to-risk target means the strategy will surrender trades that could have run further while also getting stopped out of moves that briefly go against it.
Where it may underperform. Strong, sustained trends can steamroll a wedge break and stop the trade in the opposite direction. Choppy, low-volatility ranges may produce false convergence signals with no follow-through, and news-driven volatility spikes can blow through ATR-based stops before the pattern's logic ever plays out. Widening spreads around market opens or major economic releases can also erode the edge. Understanding when a strategy struggles is as important as understanding when it works.
Risk Management Tips
Sound risk management matters more than any single entry signal. Consider these general principles as part of your education:
- Risk a small, fixed fraction per trade. Many educational sources suggest risking no more than 1–2% of account equity on any single position. Adjust the
Lotsvalue so the ATR-based stop distance corresponds to that fraction of your account. - Size positions deliberately. Larger lots amplify both gains and losses. Match your volume to your account size, not to your ambitions.
- Test on a demo account first. Run the strategy in a risk-free simulated environment until you understand its behavior, signal frequency, and drawdown character before considering any live capital.
- Understand drawdown. Every strategy endures losing streaks. Study the maximum peak-to-trough decline in your testing so you know what you might have to sit through emotionally and financially.
- Never over-leverage. Leverage magnifies outcomes in both directions. Keep it conservative, especially while learning.
- Keep a trading journal. Record why each trade was taken and how it resolved. Reviewing your own data is one of the most effective ways to learn.
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
- Expert Advisor: WedgeConvergenceBreakout.ex5 (6 downloads)
- Source Code: WedgeConvergenceBreakout.mq5 (7 downloads)
- Documentation: WedgeConvergenceBreakout.pdf (14 downloads)