Gann HiLo Swing
- インディケータ
- バージョン: 1.0
Gann HiLo Swing is a free indicator for MetaTrader 5 with two of W.D. Gann's tools: the HiLo Activator line and the 2-bar swing chart. It shows the trend side, the swings and an arrow with an alert when a new trend starts.
Everything comes from closed bars, so nothing on the chart changes after its bar has closed.
What you see on the chart
- HiLo Activator line: blue in an uptrend, red in a downtrend
- Swing line (dotted) through the confirmed swing highs and lows
- An arrow on the bar where a new trend starts
How it works
- HiLo Activator: the trend turns up when a bar closes above the average of the last 3 highs, and down when it closes below the average of the last 3 lows. The line is the lows' average in an uptrend and the highs' average in a downtrend.
- 2-bar swing chart: an upswing starts after two higher highs in a row, a downswing after two lower lows. When the swing turns, the extreme of the old swing becomes a pivot; it is drawn on its own bar and stays there.
- New trend: the activator and the swing agree on a new side. The swing condition can be switched off.
Who it is for
For traders who read the trend with Gann's simple tools on any symbol and timeframe. For Square of 9 levels, Gann fan angles, the Gann box and a multi-symbol HiLo table, see Gann Toolkit MT5. It places no orders.
Inputs
- HiLo activator period - 3 (Gann's own)
- A new trend needs the swing chart to agree - on
- Draw the swing line - on
- Closed bars to calculate - 3000; colours
- Alerts: pop-up (on), sound, push notification, e-mail
How often
Period 3 reacts fast, so read it as the trend state, not as a stream of entries. New trends per month per symbol on EURUSD, GBPUSD, USDJPY and XAUUSD, October 2023 to October 2026, closed bars (a code count, not a trading result):
| Timeframe | New trends per month |
| M15 | about 233 to 254 |
| H1 | about 56 to 63 |
| H4 | about 14 to 16 |
| D1 | about 2 to 3 |
A longer period gives fewer changes.
How it was checked
- Non-repainting: in the Strategy Tester on XAUUSD H1, every tick, January to October 2026 (91 million ticks, 4,406 bars), 506 arrows appeared and none changed after its bar closed or was drawn on the forming bar.
- Code check: the HiLo line, trend, every arrow and every swing pivot were compared bar by bar with an independent Python calculation on EURUSD, GBPJPY, XAUUSD and BTCUSD, M15, H1 and H4, with two settings: identical.
Alerts and Expert Advisors
One alert per new trend, on the bar that starts it: pop-up, sound, push notification and e-mail, each switched separately. Nothing is sent while history loads, never twice for the same bar, and not in the Strategy Tester.
Buffers: 0 new uptrend (price), 1 new downtrend, 2 HiLo line, 3 its colour (0 up, 1 down), 4 swing line.
Questions
- Does it repaint? No. It uses closed bars only. A swing pivot is drawn on its own bar once the swing has turned, and it never moves afterwards.
- Why so many trend changes on low timeframes? Gann's period of 3 follows price closely. Use a higher timeframe or a longer period for fewer changes.
- Does it work on gold and crypto? Yes, on any symbol with history.
Questions: use the comments on this page or send me a message on MQL5.
Trading involves risk. The indicator shows the trend by Gann's rules; it does not predict the market, and past signals do not guarantee future results.
