Loading…

Gann Square Of Nine Levels

The Square of Nine arranges numbers in a spiral around a centre value such that each full 360-degree rotation lands one whole unit further out on the square root scale. Practically, that means every 45-degree step around the spiral adds a fixed 0.125 to the square root of the anchor price; squaring that running total back gives the next price level. This indicator walks that spiral outward from a chosen anchor for InpRings full rotations, drawing every 45-degree stop as a horizontal level labelled with its ring number and degree. The four cardinal stops - 0, 90, 180 and 270 degrees - are drawn heavier and in a different colour, since these are the levels Gann traders treat as the primary support/resistance candidates; the diagonal 45/135/225/315 degree stops are drawn lighter as secondary reference points. An alert fires once when a closed bar's close crosses a cardinal level, so a level does not need to be watched manually. The anchor can auto-track the highest high or lowest low of the last InpSwingLookback bars instead of a fixed manual price, which is what keeps the whole spiral relevant as new swing extremes form rather than going stale after the first anchor is set. Notes and limitations - Square of Nine levels are a geometric projection from a chosen anchor, not a statistical or statistically validated method - their usefulness depends entirely on the anchor being a price the market actually treats as significant. - Auto-tracking anchors move as new swing extremes form, which means the whole level set can shift; a chart reviewed later may show a different spiral than it did in the moment if the swing has since been broken. - Alerts only evaluate closed bars, so an intrabar touch that reverses before the bar closes does not alert.

Indicator · MT4 · v1.0 · Free

About Gann Square Of Nine Levels

Gann Square Of Nine Levels is an indicator for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 7 settings, such as Anchor mode, Manual anchor price and Swing lookback. MQL source code included.

Files in the download: GannSquareOfNineLevels.ex4, GannSquareOfNineLevels.mq4, GannSquareOfNineLevels.txt.

Settings

SettingDefaultWhat it does
Anchor modeANCHOR_SWING_LOWHow the anchor price is chosen
Manual anchor price0.0Anchor price used only when InpAnchorMode = Manual
Swing lookback100Bars scanned for the auto swing anchor
Rings4Concentric rings projected outward from the anchor
Cardinal colorclrGoldColour for the 0/90/180/270 degree levels
Diagonal colorclrSilverColour for the 45/135/225/315 degree levels
Alert on cardinal crosstrueAlert once when a closed bar crosses a cardinal level

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Indicators.
  3. Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
  4. Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: Alerts · MT4 Indicator · MQL4 Source Code

MetaTrader 4 & 5 indicators · PolyMaria