Gann HiLo Swing
- Indicateurs
-
Allan Aparece Ninal
Je développe des indicateurs et des Expert Advisors pour MetaTrader 5.
Ma façon de travailler :
- Chaque indicateur est vérifié contre le repaint : les signaux sont décidés uniquement sur des barres clôturées, et un test sur chaque tick confirme qu'ils ne changent plus ensuite. - Version: 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 and the swings. An arrow and an alert mark the start of a new trend.
Everything comes from closed bars, so nothing on the chart changes after its bar has closed.
Quick start
- Attach the indicator to any chart. It draws on the price chart.
- Keep the HiLo period at 3 (Gann's own), or raise it for fewer trend changes.
- Read the line. Blue is an uptrend and red a downtrend. An arrow marks the bar where a new trend starts.
- For alerts, switch on sound, push notification or e-mail in the inputs. The pop-up is on by default.
Standalone: everything is built in. You do not need to buy or install any other product named on this page.
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. It turns down when a bar closes below the average of the last 3 lows. The line is the lows' average in an uptrend. In a downtrend it is the highs' average.
- 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. You can switch the swing condition off.
Who it is for
This indicator is for traders who read the trend with Gann's simple tools. It works on any symbol and timeframe. It places no orders.
Inputs
| Input | Default |
|---|---|
| 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. The table counts new trends per month per symbol. It covers EURUSD, GBPUSD, USDJPY and XAUUSD, October 2023 to October 2026, closed bars. It is 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: the test ran in the Strategy Tester on XAUUSD H1, every tick, January to October 2026 (91 million ticks, 4,406 bars). 506 arrows appeared. None changed after its bar closed, and none was drawn on the forming bar.
- Code check: an independent Python calculation was compared bar by bar with the HiLo line, the trend, every arrow and every swing pivot. It covered EURUSD, GBPJPY, XAUUSD and BTCUSD on M15, H1 and H4, with two settings. The results were identical.
Alerts and Expert Advisors
You get one alert per new trend, on the bar that starts it. Pop-up, sound, push notification and e-mail are switched separately. Nothing is sent while history loads or in the Strategy Tester. A bar never alerts twice.
Buffers: 0 new uptrend (price), 1 new downtrend, 2 HiLo line, 3 its colour (0 up, 1 down), 4 swing line.
Related products
- Gann Toolkit MT5 — a separate tool that adds Square of 9 levels, Gann fan, Gann box and a multi-symbol HiLo table.
- All my products on MQL5
Questions
- Does it repaint? No. It uses closed bars only. A swing pivot is drawn on its own bar once the swing has turned. 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. It works on any symbol with history.
If it helps your trading, 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. The indicator shows the trend by Gann's rules; it does not predict the market, and past signals do not show how future signals will perform.
