Blog / Strategy
Strategy

Directional Triangle Breakout

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 Directional Triangle Breakout is a price-action (chart-pattern) breakout strategy built around the classic ascending and descending triangle — two of the most widely taught converging-range formations in technical analysis. Unlike a symmetric "squeeze" or "coil" pattern, which gives no hint of which way price will resolve, a triangle carries an intrinsic directional bias. That bias is exactly what this strategy tries to read and then trade in a disciplined, rule-based way.

A triangle forms when one boundary of price stays roughly flat — acting as a firm "shelf" of supply or demand — while the other boundary steadily converges toward it. In an ascending triangle, the highs form a flat ceiling (resistance) while the lows keep rising, suggesting buyers are absorbing the fixed supply and pressure is building upward. In a descending triangle, the lows form a flat floor (support) while the highs keep falling, suggesting sellers are pressing into a fixed demand shelf and pressure is building downward. The strategy fits least-squares regression lines to both the highs and the lows, normalizes their slopes by the Average True Range (ATR) — a common volatility measure — so the thresholds are scale-free, and confirms that the range is genuinely narrowing before acting.

As a learning tool, this strategy is well suited to traders who want to study how discretionary chart patterns can be translated into precise, objective, mechanical rules. It demonstrates regression-based slope measurement, volatility normalization, convergence testing, and confirmed-breakout entry logic — all concepts that transfer to many other systems. It is best viewed as an analytical framework for understanding pattern-based breakouts, not as a shortcut to trading success.

How It Works

The strategy evaluates the market once per completed bar and measures the triangle geometry over a fixed window of bars preceding the potential breakout bar. Here is what happens, step by step:

directional triangle breakout MT5 EA
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
Lookback 20 10 60 Number of bars used to measure the triangle geometry (the shelf plus the converging side).
FlatSlopeMax 0.08 0.02 0.30 Maximum absolute slope of the flat side, in ATR per bar. Smaller values require a flatter, cleaner shelf.
RiseSlopeMin 0.06 0.01 0.30 Minimum absolute slope of the converging side, in ATR per bar. Larger values demand a clearer directional bias.
ConvergeRatio 0.75 0.40 1.00 Convergence gate: the recent-half range must be ≤ the earlier-half range × this value. Lower means tighter coiling is required.
BreakBuffer 0.10 0.00 0.60 Breakout confirmation buffer beyond the shelf, in ATR. Larger values demand a more decisive close through the shelf.
FailBackMult 0.50 0.10 1.50 Failed-breakout exit: a close back through the shelf by this × ATR flattens the trade early.
AtrPeriod 14 7 30 Averaging period for the ATR used in slope normalization, stop, and target.
AtrStopMult 1.5 1.0 4.0 ATR multiplier for the protective stop-loss distance.
AtrTargetMult 2.5 1.0 6.0 ATR multiplier for the take-profit target distance.
Lots 0.10 0.01 1.0 Order volume (position size) in lots.
directional triangle breakout MT5 EA — MQL5 source code

Recommended Chart Settings

This strategy is designed as a single-timeframe system: every calculation uses the symbol and timeframe of the chart it is attached to. It contains no hard-coded symbol assumptions, so it can be studied on major forex pairs, indices, or other liquid instruments where triangle patterns commonly appear.

A practical starting point for study is a liquid major such as EUR/USD on the H1 (1-hour) timeframe, which tends to produce enough bars for the regression and convergence tests to be meaningful while still generating a reasonable number of patterns. Higher timeframes (H4, D1) generally yield fewer but structurally cleaner triangles, whereas lower timeframes produce more signals along with more noise. Because breakout behavior varies substantially with volatility and liquidity, results will differ across symbols, sessions, and market conditions — always test any configuration on your own data before drawing conclusions.

How to Install on MetaTrader 5

What to Consider Before Using This EA

Like every mechanical system, the Directional Triangle Breakout has clear strengths and equally clear limitations that are worth understanding before you rely on it.

Strengths of this approach:

Known limitations:

This EA is best understood as an educational illustration of how a discretionary chart pattern can be encoded into precise rules — not as a finished, market-ready system. Any live use should follow extensive independent testing.

Risk Management Tips

Sound risk management matters far more than any single entry signal. Consider these general principles as you study this or any strategy:

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