Gann Swing Blast Indicator: Pivots Filtered By ATR

Written by Dominic Walsh · Published · Last updated

The gann swing blast indicator draws a swing line, but it is fussy about what counts as a swing. A pivot needs `InpSwingDepth` bars on each side. It then has to sit at least `InpAtrMult` times ATR away from the previous swing before the line turns. Small wiggles get ignored.

This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD H1.

Platforms MT4 (.ex4) + MT5 (.ex5)
Chart window Main price chart
Plots 3: Gann Swing ZigZag, Swing Buy, Swing Sell
Alerts popup
Inputs 5

What the Gann swing blast Indicator draws on the chart

Gann Swing ZigZag is the dodger blue section line joining confirmed swings.

Swing Buy drops a lime arrow at a confirmed swing low.

Swing Sell puts a red arrow at a confirmed swing high.

Marks sit `InpArrowOffset` points from the bar, which defaults to `10`.

  • Gann Swing ZigZag: section, dodger blue, width 3
  • Swing Buy: arrow, lime, width 3, arrow code 233
  • Swing Sell: arrow, red, width 3, arrow code 234
Gann swing blast indicator on EURUSD H1 with ATR-filtered swing legs
Gann swing blast indicator on EURUSD H1 with ATR-filtered swing legs

How the Gann swing blast Indicator calculates its values

Confirming the pivot

is_pivot_high starts true and fails if any bar within `InpSwingDepth` `5` on either side reaches the same high or beats it. The low test mirrors it. Both sides must finish printing before a pivot counts.

Applying the ATR filter

thr takes `InpAtrMult` `2.0` times iATR at `InpAtrPeriod` `20`. rng_h measures the distance from the candidate high back to the last recorded swing price. A pivot that fails to clear thr never joins the line.

Extending the line

ZigBuf takes the pivot price and the section plot joins it to the previous one. Because only qualifying pivots reach the buffer, the line skips the small turns entirely. That is what separates it from a plain pivot tracer.

How to read the signals

Each leg of the blue line represents a move of at least two ATR.

The newest leg is provisional until `InpSwingDepth` newer bars have closed.

Long flat stretches mean nothing has cleared the threshold recently.

Raise `InpAtrMult` when the line still tracks moves you consider noise.

Alert channels in this build: popup, one message per closed bar.

`InpAlertOnSwing` ships on and raises a terminal popup when a new swing confirms. This build carries no push, email or sound channel. The guard permits one message per closed bar, so a single swing never repeats itself.

Every Gann swing blast Indicator input

Core settings

Setting What it does Default
InpSwingDepth Pivot lookback bars. Bars each side of a pivot, default `5`. 5
InpAtrPeriod ATR period. ATR length behind the size filter, default `20`. 20
InpAtrMult ATR multiple required for valid swing. ATR multiple a leg must clear, default `2.0`. Raise it for a coarser swing line. 2.0

Display settings

Setting What it does Default
InpArrowOffset Arrow offset in points. Swing mark distance from the bar in points, default `10`. 10

Alert settings

Setting What it does Default
InpAlertOnSwing Alert on new swing. Popup when a new swing confirms, default `true`. on
Gann swing blast indicator inputs: InpSwingDepth, InpAtrPeriod, InpAtrMult
Gann swing blast indicator inputs: InpSwingDepth, InpAtrPeriod, InpAtrMult

Settings that fit your chart

An ATR-filtered swing line rescales itself, so it travels between instruments without retuning. EURUSD H1 is the reference chart. On M5 the ATR threshold is small in absolute terms but still filters the smallest turns. On H4 each leg covers days and the line stays sparse.

When the Gann swing blast Indicator fails

A confirmed pivot arrives `InpSwingDepth` bars late, so the newest leg keeps changing.

The ATR filter measures size only. It cannot tell a meaningful swing from a news spike of the same size.

During a quiet stretch nothing clears the threshold and the line simply stops.

Copy the compiled Gann swing blast Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.

Background reading on the method behind the Gann swing blast Indicator: Swing Charting at StockCharts ChartSchool, Swing trading on Wikipedia.

Download the Gann swing blast Indicator for MT4 and MT5

The zip holds the compiled Gann swing blast Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. Enter your email below and the download link arrives in your inbox.

Download this indicator free

Enter your email and the file is yours. You also get the full MT4 and MT5 library.

  • 1,380+ indicators
  • MT4 and MT5 files
  • No spam, unsubscribe any time

FAQ

What does InpAtrMult at 2.0 filter out?

Every confirmed pivot whose distance from the last swing falls short of two ATR. On a chart where ATR reads 15 pips, a leg must cover 30 pips to count. Raise it to 3.0 for a much coarser line that shows only the larger structure.

How long does InpSwingDepth delay a pivot?

Five bars, since the test needs five newer bars that fail to beat the candidate. On H1 that is five hours. Until those bars close the freshest leg of the Gann Swing ZigZag line can still change, which is normal for any pivot method.

Why does InpAtrPeriod set the filter, not pips?

Because a fixed pip threshold suits one instrument and fails on the next. `InpAtrPeriod` `20` measures what a typical bar covers right now, so the same `InpAtrMult` setting behaves sensibly on gold, on an index and on a currency pair.

What does the Swing Buy arrow mark?

A confirmed swing low that also cleared the ATR threshold. It sits `InpArrowOffset` points below the bar. Pivots that confirm but fail the size test get no arrow at all, which is why the chart shows fewer marks than raw pivots would.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Gann swing blast Indicator as one input. Always backtest before trading live.

Category: this is part of our Signal and Forecast collection. Also, browse more Signal and Forecast for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.

External references

Dominic Walsh - Forex trader and MT4/MT5 developer

About the author

Written by Dominic Walsh, a Forex trader and MT4/MT5 indicator, Expert Advisor and script developer. Every tool on forexmt4systems.com is tested on live charts before release and ships with ready-to-use compiled MT4 (.ex4) and MT5 (.ex5) files. Learn more about the trader and developer behind this site.

How we build, test and correct every tool: Editorial & Testing Policy. Trading carries risk; see the disclaimer.

Leave a Comment