Gann Toolkit MT5
- Индикаторы
-
Allan Aparece Ninal
Я разрабатываю индикаторы и советники (Expert Advisors) для MetaTrader 5.
Как я работаю:
- Каждый индикатор проверяется на перерисовку: сигналы определяются только на закрытых барах, а тест на каждом тике подтверждает, что они потом не меняются. - Версия: 1.1
- Обновлено: 3 ноября 2026
- Активации: 10
Gann Toolkit MT5 is an indicator for MetaTrader 5 that draws W.D. Gann's price and time tools from the swings it confirms: Square of 9 levels, fan angles and the Gann box. It also draws the HiLo line and swing line, with a trend table for many symbols and alerts. Everything comes from closed bars, so the drawings change only when a new swing is confirmed. Run the free demo in the Strategy Tester on your own symbol before you decide.
The levels, angles and box use confirmed swing pivots on closed bars. They change only when a new swing is confirmed. It draws and alerts; it does not trade.
Standalone: everything is built in. You do not need to buy or install any other product named on this page.
In plain words
Many traders place Gann's levels and angles by hand. The result changes with the person, the chart and the day. This indicator draws them by fixed rules, the same way on every symbol.
First it finds the swing highs and lows of price. A swing pivot is the extreme where price turned. Every drawing starts from one of these pivots.
The Square of 9 gives a ladder of price levels above and below the pivot, in steps of degrees. The fan draws sloping lines from the pivot, each at a different speed. The box splits the last swing into equal parts of price and time.
These are reference prices from Gann's method. Price may react near them or pass straight through.
What you see on the chart
- A swing turns and its pivot is confirmed on a closed bar.
- Gold Square of 9 levels appear above and below the pivot, each labelled in degrees.
- The fan runs from the pivot: up from a low, down from a high. It shows the angles 1x8, 1x4, 1x3, 1x2, 1x1, 2x1, 3x1, 4x1 and 8x1.
- The box covers the last swing high and low. It is divided in eighths and thirds in price, and in eighths in time.
- The HiLo line, the swing line and new-trend arrows run on the chart as in the free edition.
- A table in a corner lists symbols and timeframes. A cell shows UP or DOWN and the closed bars since the last new trend. Click a cell to open that chart.
Worked example
XAUUSD H4, default inputs, from the parity test of this indicator (terminal history, bar open times in server time). On 13 October 2026 at 04:00 a swing low of 4150.73 was confirmed. The swing high before it was 4217.20, on 12 October at 04:00, six bars earlier.
| Drawing | How it is built | Result |
|---|---|---|
| Square of 9, +45 degrees | (square root of 4150.73 + 45 / 180) squared | 4183.01 |
| Square of 9, -45 degrees | (square root of 4150.73 - 45 / 180) squared | 4118.58 |
| Fan, 1x1 angle | (4217.20 - 4150.73) / 6 bars | 11.08 price units per bar |
| Fan, 2x1 angle | 2 x the 1x1 speed, up from the low | 22.16 per bar |
| Box | from the low 4150.73 to the high 4217.20, one eighth of price | 8.31 |
The levels and the fan stay as they are until the next swing pivot is confirmed. Then the anchor changes and they are drawn again from the new pivot.
Key facts
| Type | Indicator on the price chart with a table panel, for MetaTrader 5. |
| Draws | Square of 9 levels, Gann fan, Gann box, HiLo line, swing line, new-trend arrows and a trend table. |
| When a drawing is final | Levels, fan and box are drawn from a pivot confirmed on a closed bar. They change only when a new pivot is confirmed. Arrows and table cells use closed bars only. |
| Reload and timeframe change | The indicator recalculates the last 3000 closed bars and draws everything again. It sends no alerts for old signals. |
| Alerts | Pop-up and push are on. Sound and e-mail are off. Alerts cover a new trend, a bar closing across a Square of 9 level and new trends in the table. Silent in the Strategy Tester. |
| Trades | No. It places no orders and gives no stop loss or target. |
| Other products needed | None. |
| Symbols and timeframes | Any symbol and any chart timeframe. The table: M15, H1, H4 and D1 by default. |
Quick start
- Attach the indicator to a chart. The HiLo line, swing line, Square of 9 levels, fan and box appear.
- Pick the Square of 9 anchor and step (default: latest swing pivot, 45 degrees). Choose "a price I enter" for a fixed anchor.
- Set the table symbols and timeframes (default: your list of five symbols, M15,H1,H4,D1). Click a cell to open that chart.
- The pop-up and push notification are on by default. Switch on sound or e-mail in the inputs.
Who it is for
For traders who use Gann's levels and angles and want them drawn the same way on every chart, without placing them by hand.
Not for you if you only need the HiLo trend line. The free edition, Gann HiLo Swing, is enough for that. It is also not a trading system.
How it works under the hood
Swings and the HiLo line
The HiLo Activator and the 2-bar swing chart are the engine of the free edition. A swing pivot is confirmed on the bar where the swing turns. The toolkit remembers the latest 8 pivots.
Square of 9
Level = (square root of the anchor + n x step / 180), squared. Here n runs from the negative to the positive number of levels, and the step is in degrees.
The price is first scaled to four digits: 1.1329 becomes 11329 and 4159.28 stays 4159.28. A 45-degree step is then close to 1% of the price on any symbol. A "price in points" scale is also available.
The anchor is the latest swing pivot, the latest swing low, the latest swing high, or a price you enter. The default is 6 levels above and 6 below.
Gann fan
The fan starts at the latest pivot. It runs up from a swing low and down from a swing high. The 1x1 angle moves at the speed of the last completed swing: its price change divided by its bars. You can set your own price per bar.
Other angles are multiples of the 1x1 speed: 1x8 is one eighth of it, 8x1 is eight times it. With "all angles" off, only 1x2, 1x1 and 2x1 are drawn.
Gann box
The box spans the last swing high and the last swing low. Price is divided in eighths, and optionally in thirds. Time is divided in eighths over twice the swing's length, so the box repeats the swing's time once. Two diagonals cross it.
Level spacing
This is the distance from the anchor to the first level above at a 45-degree step, at September 2026 prices. EURUSD is about 0.0169, GBPUSD about 0.0183, USDJPY about 1.99 and XAUUSD about 32. A 90 or 180-degree step gives wider levels.
HiLo trend table
Each cell runs the same engine on one symbol and timeframe, starting from 1,000 closed bars. After that it adds only the bars that closed. A cell is highlighted when its new trend is 3 closed bars old or less.
The table has up to 60 symbols, from your own list or from Market Watch. Symbols and timeframes that have not loaded yet show a count in the title.
Alerts
A bar closing across a Square of 9 level raises an alert. The test uses the levels drawn before that bar and compares its close with the close before it.
Inputs
| Input | Default | Description |
|---|---|---|
| HiLo period | 3 | New trend needs the swing chart to agree: on. Draw the line, arrows and swing line: on. |
| Square of 9 | on | Anchor: latest swing pivot (or latest low, latest high, a price I enter). Price scale: four digits. Step: 45 degrees. Levels above and below: 6. Alert when a bar closes across a level: on. |
| Gann fan | on | 1x1 scale: auto from the last swing (or my value). All angles: on. |
| Gann box | on | Also divide in thirds: on. |
| HiLo table | on | Symbols: my list (EURUSD, GBPUSD, USDJPY, XAUUSD, BTCUSD) or Market Watch. Timeframes: M15,H1,H4,D1. Fresh cell: 3 bars or less. Most symbols: 20. |
| Closed bars to calculate | 3000 | Colours and font size can be changed. |
| Pop-up, push, sound, e-mail | on, on, off, off | Push needs your MetaQuotes ID. |
| Debug log for bug reports | off | See Found a problem? |
Alerts and Expert Advisors
Alerts cover a new trend on the chart and a bar closing across a Square of 9 level. They also cover new trends in the table, sent as one message. Pop-up, sound, push notification and e-mail are switched separately. Nothing is sent while history loads or in the Strategy Tester.
Buffers: 0 new uptrend, 1 new downtrend, 2 HiLo line, 3 its colour, 4 swing line. Read them from the last closed bar (shift 1).
How it was checked
- Engine: the HiLo line, swings and new trends are the engine of the free edition, Gann HiLo Swing. That engine matched an independent Python calculation on every bar. It also passed a tick-by-tick repaint test in the Strategy Tester (XAUUSD H1, 91 million ticks, 0 changed signals).
- Drawings: the Square of 9, fan and box are redrawn only when a new swing pivot is confirmed on a closed bar. No separate numeric test of their prices was made.
Not tested: alerts on a live chart. No profit or accuracy test was made. This is a drawing and alert tool, not a strategy.
Limits
- The levels, angles and box are reference prices. They are not support and resistance by themselves, and price may pass through them.
- They move when a new swing pivot is confirmed, because the anchor changes. Use "a price I enter" for a fixed anchor.
- A pivot is confirmed only after the swing has turned, so it is never marked on the extreme as it forms.
- The fan needs two pivots to set its speed. Without them, enter your own 1x1 value.
- It gives no stop loss, target or lot size.
- The marks depend on your broker's bars. Alerts need the terminal running with the chart open.
FAQ
Are the levels support and resistance? They are reference prices from Gann's method. Price may react near them or pass through. The indicator does not predict which.
Why did the levels move? A new swing pivot was confirmed, so the anchor changed. Choose "a price I enter" to keep a fixed anchor.
Does it repaint? No. Everything comes from closed bars. The drawings change only when a new pivot is confirmed.
How is it different from Gann HiLo Swing? It uses the same trend engine. The toolkit adds the Square of 9, fan, box, the multi-symbol table and level alerts.
Can an Expert Advisor read it? Yes. Read the buffers listed under Alerts and Expert Advisors, from shift 1. The levels, fan and box are chart objects, not buffers.
Try it first
Run the free demo in the Strategy Tester on your own symbol before you decide. For the HiLo line and swings alone, the free edition, Gann HiLo Swing, uses the same engine.
Works well with
These are workflow suggestions. I have not found that any pair gives better trading results. You do not need any of them.
| Product | How to use them together | Why |
|---|---|---|
| Session Levels | Add it to the same chart. | It draws the Asia, London and New York sessions and killzones, the previous day and week levels and a time panel as context. It is not a signal. |
| Risk Position Tool | Pick the trade from the chart, then drag the entry and stop lines. The tool gives the lot for your risk. | It separates where you enter from how much you risk. The tool places no orders. |
Related products
- Gann Toolkit MT4: the same toolkit for MetaTrader 4.
- Gann HiLo Swing — free; the same HiLo line and swing engine, without the levels, fan, box and table.
- Range Filter Scanner MT5 - another scanner panel for many symbols and timeframes, for range filter signals.
- All my products on MQL5
Custom work
Want an EA that trades this indicator, a custom version of it, several of my indicators or EAs combined into one, an EA that trades another indicator you use (mine or another developer's), or a new indicator or EA of your own? Order it through MQL5 Freelance and choose me as the developer: order through Freelance. Send your requirements, rules and the flow or algorithm you want. The whole order, payment and delivery stay inside MQL5 Freelance.
Found a problem?
- In the inputs, set "Debug log for bug reports" to true.
- Repeat what went wrong.
- Open the Experts tab in the Toolbox. Copy the lines that start with "DBG" and paste them in a comment on this page, with the symbol and timeframe.
- Set the debug log back to false.
The debug lines never contain your account number, name, server, balance or equity.
If you find it useful, a short review on this page helps other traders find it.
Questions: use the comments on this page or send me a message on MQL5.
Trading involves risk. Gann's tools are a way of reading the chart. They do not predict the market, and past behaviour around a level does not show what price will do next.
