Gann SQ9 2 Indicator for MT4 and MT5

Written by Dominic Walsh · Published · Last updated

Gann’s square-of-nine idea was that price levels scale with the square root of price, not with fixed distances. The gann sq9 2 indicator applies that directly: it anchors on the previous day’s high and spaces eight levels around it using a square-root formula rather than flat steps.

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 9: GSQ9v2 +2.0, GSQ9v2 +1.5, GSQ9v2 +1.0, GSQ9v2 +0.5, Daily High Anchor, GSQ9v2 -0.5, GSQ9v2 -1.0, GSQ9v2 -1.5, GSQ9v2 -2.0
Alerts popup, push notification, email, sound
Inputs 11

Drawn output, plot by plot

Nine lines, all on the price chart.

`Daily High Anchor` traces aqua at width 2.

`GSQ9v2 +0.5` through `GSQ9v2 +2.0` climb in warm tints.

`GSQ9v2 -0.5` through `GSQ9v2 -2.0` fall in greens.

Tomato marks the furthest level up.

Lime green marks the furthest one down.

  • GSQ9v2 +2.0: line, tomato, width 1
  • GSQ9v2 +1.5: line, orange, width 1
  • GSQ9v2 +1.0: line, gold, width 1
  • GSQ9v2 +0.5: line, khaki, width 1
  • Daily High Anchor: line, aqua, width 2
  • GSQ9v2 -0.5: line, pale green, width 1
  • GSQ9v2 -1.0: line, light green, width 1
  • GSQ9v2 -1.5: line, medium sea green, width 1
  • GSQ9v2 -2.0: line, lime green, width 1
gann sq9 2 indicator: The full level grid around its anchor, EURUSD H1.
The full level grid around its anchor, EURUSD H1.

How the plots get their values

The anchor

`DailyShift` `1` picks the previous daily bar. Its high becomes the aqua line, and the distance between that high and the same day’s low becomes the unit everything else is measured in.

The square-root spacing

Each level takes the unit, multiplies by the step, and scales by the square root of the anchor price divided by that root plus the step. Higher prices therefore get proportionally tighter spacing.

Four steps, both ways

`LevelStep1` `0.5`, `LevelStep2` `1.0`, `LevelStep3` `1.5` and `LevelStep4` `2.0` each produce one line above the anchor and one below it.

How to use what it draws

The aqua line is yesterday’s high itself.

Level spacing widens as the steps grow.

So a large previous day spreads every level out.

A quiet one, by contrast, packs them close together.

Meanwhile the whole grid resets each session.

Warm tints sit above, greens below.

Alert channels in this build: popup, push notification, email and sound, one message per closed bar.

Price reaching one of the nine lines is what speaks. `EnableAlerts` decides whether it does and a window already opens in the terminal. The phone, the mail route and the desktop track named by `SoundFile` all begin closed.

Every Gann SQ9 2 Indicator input

Core settings

Setting What it does Default
DailyShift Which D1 bar to anchor on (1 = previous day). Which daily bar the anchor comes from, `1`. 1
LevelStep1 1st sqrt unit offset. Closest step either side, `0.5`. 0.5
LevelStep2 2nd sqrt unit offset. Second step, `1.0`. 1.0
LevelStep3 3rd sqrt unit offset. Third step, `1.5`. 1.5
LevelStep4 4th sqrt unit offset. Furthest step, `2.0`. 2.0

Alert settings

Setting What it does Default
EnableAlerts Whether a level touch speaks, `true`. on
EnablePopup A window opens in the terminal, `true`. on
EnablePushNotify A phone rings instead, `false`. off
EnableEmail A message leaves as mail, `false`. off
EnableSound (see inputs panel) off
SoundFile Track the desktop route uses, `”alert.wav”`. alert.wav
gann sq9 2 indicator: Inputs panel, the four steps under the anchor setting.
Inputs panel, the four steps under the anchor setting.

Best home for this one

A previous-day anchor needs a chart where a session spans several bars. EURUSD H1 is the reference chart, giving twenty-four bars between resets. On M15 the grid barely changes across a screen. On D1 the anchor moves every bar.

Limits worth knowing

A quiet previous day produces a tiny grid.

Square-root spacing is a convention, not a market law.

Nine lines on one chart is a crowded picture.

The whole grid jumps at each session boundary.

Copy the compiled Gann SQ9 2 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 SQ9 2 Indicator: Gann angles on Wikipedia, Gann Angles at Investopedia.

Download the Gann SQ9 2 Indicator for MT4 and MT5

The zip holds the compiled Gann SQ9 2 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 DailyShift 1 anchor to?

The previous daily bar’s high, which becomes the aqua reference line. Setting it to zero would anchor on the current day instead, and the whole grid would then move as that day’s high extended.

Why does LevelStep1 0.5 use a square root?

Because Gann held that level distances scale with the root of price rather than linearly. On a high-priced symbol the levels therefore sit proportionally closer than a flat multiple would place them.

What sets the unit LevelStep2 1.0 multiplies?

The previous day’s range, meaning its high less its low. A wide session therefore spreads every level out and a narrow one packs them together, which makes the grid adapt without a setting change.

Are the eight levels symmetric about the anchor?

In step numbers yes, in distance nearly. Each step produces one line above and one below, and because the root scaling is applied the same way on both sides the spacing is very close to even.

Are results guaranteed?

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

Category: this is part of our Signal and Forecast collection. Also, truly, 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