Blog / Strategy
Strategy

Accumulative Swing Index 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 Accumulative Swing Index Breakout is a trend-breakout Expert Advisor built around J. Welles Wilder's Swing Index (SI) and its running total, the Accumulative Swing Index (ASI) — an indicator-driven approach to breakout trading rather than a raw price-level one. Wilder designed the Swing Index to score how much of each bar's movement represented genuine directional commitment, using the geometry of the open, close, prior close and true range. Summing every bar's Swing Index produces the ASI, a smoothed "true price" line that filters out the thin, gappy, small-bodied pokes that make ordinary price breakouts so noisy.

The core idea is straightforward: instead of asking "did price break a level?", the strategy asks "did the accumulated directional conviction break a level?" When the ASI climbs to a fresh multi-bar high while sitting above its own trend baseline, the strategy reads that as an established up-regime and signals a long. The mirror image — a fresh ASI low beneath its baseline — signals a short. This makes it a momentum/trend-following system designed for markets that are transitioning out of consolidation into a directional move.

As a learning tool, this EA is well suited to traders who want to study how a classic Wilder indicator can be repurposed as a breakout engine. It is a good example of applying a Donchian-channel breakout concept to a derived series (the ASI) rather than to price itself. It is best viewed as a strategy to analyze, backtest, and understand — not as a shortcut to returns.

How It Works

The strategy acts once per newly closed bar on a single primary timeframe. On each new bar it recalculates the Swing Index from the just-closed bar and the one before it, adds that value to the running ASI total, and then evaluates its breakout logic.

Entry conditions — the strategy signals a long when:

The strategy signals a short when:

Exit conditions:

Long entries are filled at the Ask price and short entries at the Bid, with both the stop and target normalized to the symbol's digit precision.

Accumulative Swing Index MT5 EA
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
BreakoutLookback 20 8 60 Lookback in bars for the ASI Donchian breakout. A fresh N-bar ASI extreme is the trigger. Larger values demand a more decisive break.
AsiTrendPeriod 10 3 40 EMA period applied to the ASI itself. The ASI must sit on the breakout side of this EMA, acting as a regime filter.
AtrPeriod 14 5 40 ATR period used to measure volatility for stop and target distances.
AtrStopMult 2.00 0.50 5.00 Stop-loss distance as a multiple of ATR from the entry price. Higher values give the trade more room.
RewardRisk 1.80 1.00 4.00 Take-profit distance expressed as a multiple of the stop distance (the reward-to-risk ratio).
Lots 0.10 0.01 1.00 Fixed position size in lots per trade.

There is also a Magic number input (default 1001) that tags the EA's orders so it can manage only its own positions.

Accumulative Swing Index MT5 EA — MQL5 source code

Recommended Chart Settings

This EA is designed to run on a single primary timeframe and evaluates one closed bar at a time. Because the Swing Index and ASI are built from open/close/high/low geometry, they behave most cleanly on liquid instruments with tight spreads — major forex pairs such as EUR/USD or GBP/USD are natural candidates for study, though the logic is symbol-agnostic.

A common starting point for breakout-style systems is the H1 (1-hour) or H4 (4-hour) timeframe, which balances signal frequency against noise. Lower timeframes generate more signals but also more false breakouts; higher timeframes produce fewer, slower signals. There is no universally "correct" setting — results will vary considerably across different symbols, timeframes, and market conditions, so treat any configuration as a hypothesis to be tested rather than a recommendation. Always backtest and forward-test on a demo account before drawing conclusions.

How to Install on MetaTrader 5

What to Consider Before Using This EA

Strengths of the approach. Filtering breakouts through the ASI is a genuinely elegant idea: because the Swing Index discounts wick-heavy, low-conviction bars, the ASI can smooth out the whipsaw pokes that trigger false signals on raw price channels. The dual-gate design — requiring both a fresh ASI extreme and agreement with the ASI's own EMA — adds a regime filter that historically helps avoid taking breakouts against the prevailing direction. ATR-based stops and the opposite-breakout exit give the system a coherent, volatility-aware risk framework.

Known limitations. Breakout systems of every kind tend to struggle in range-bound, choppy markets, where prices repeatedly break a level and then reverse. In such conditions the ASI can oscillate around its EMA and produce a string of small losing trades. The ASI is also a running cumulative series, so its absolute level drifts over long periods; the strategy sidesteps this by only ever comparing the ASI to its own recent history, but you should still expect behavior to depend on the chosen lookback. Because the EA acts only on closed bars, entries occur after a move has begun, which is the inherent trade-off of any confirmation-based breakout method.

Where it may underperform. Tight, low-volatility ranges, heavily news-driven spikes, and instruments with wide or unstable spreads can all degrade signal quality. The fixed lot size means position risk in currency terms changes as the ATR-based stop distance changes, so the actual money at risk per trade is not constant. Understand these behaviors thoroughly in testing before considering any live use.

Risk Management Tips

Sound risk management matters far more than any single entry rule. Consider these general principles as part of your education:

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