Gann grids split price into equal steps from a reference point. The PAMA GannGrid indicator takes the midpoint between the latest 30-bar swing high and low, lays grid lines one average range apart, adds 1×1, 2×1 and 1×2 angle lines, and marks a close through a grid level.
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 | 2: Pama Buy, Pama Sell |
| Alerts | popup, push notification, email, sound |
| Inputs | 18 |
Everything the Pama Ganngrid Indicator draws
Grid lines, angle lines and two marks.
`GridUpColor` `clrDodgerBlue` draws grid levels above.
`GridDownColor` `clrOrange` draws levels below.
`AngleColor` `clrGold` draws the Gann angles.
`Pama Buy` prints lime with arrow 233.
`Pama Sell` prints red with arrow 234.
- Pama Buy: arrow, lime, width 2, arrow code 233
- Pama Sell: arrow, red, width 2, arrow code 234

How the Pama Ganngrid Indicator calculates its values
Anchor
`PivotLookback` `30` bars on each side confirm the swings. The midpoint between the latest high and low anchors the grid.
Grid
`GannStepATR` `1.0` times an `ATRPeriod` `14` range sets the step. `GridLevels` `8` lines are drawn each side.
Breaks
A close through the next grid level up prints a buy. `ConfirmBars` `1` sets the confirmation, and `CooldownBars` `6` spaces marks.
Reading day to day
Blue lines sit above the midpoint, orange below.
Gold angles show 1×1, 2×1 and 1×2 slopes.
A lime mark is a close up through a grid step.
A red mark is a close down through one.
The grid moves when a new swing confirms.
Swings confirm thirty bars late.
Alert channels in this build: popup, push notification, email and sound, one message per closed bar.
Grid breaks report once per closed bar. `EnableAlerts` is the master switch; the popup and the sound playing `SoundFile` start on, and the other routes do not.
Every Pama Ganngrid Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
PivotLookback |
bars left/right for swing pivot. Bars on each side of a swing, `30`. | 30 |
GridLevels |
Gann grid horizontal levels each side. Grid lines each side, `8`. | 8 |
GannStepATR |
grid spacing = ATR * this. Grid step in ranges, `1.0`. | 1.0 |
ATRPeriod |
ATR period for grid step. Range window, `14`. | 14 |
ConfirmBars |
breakout confirmation bars. Closes needed past the level, `1`. | 1 |
CooldownBars |
bars between same-side signals. Bars between same-side marks, `6`. | 6 |
Display settings
| Setting | What it does | Default |
|---|---|---|
ShowGrid |
draw Gann grid. Draw the grid, `true`. | on |
ShowAngles |
draw 1×1, 2×1, 1×2 angles. Draw the Gann angles, `true`. | on |
GridUpColor |
(see inputs panel) | dodger blue |
GridDownColor |
(see inputs panel) | orange |
AngleColor |
(see inputs panel) | gold |
ArrowOffsetPts |
arrow offset in points. Mark gap in points, `18`. | 18 |
Alert settings
| Setting | What it does | Default |
|---|---|---|
EnableAlerts |
(see inputs panel) | on |
EnablePopup |
(see inputs panel) | on |
EnablePushNotify |
(see inputs panel) | off |
EnableEmail |
(see inputs panel) | off |
EnableSound |
Sound, ships on, `true`. | on |
SoundFile |
(see inputs panel) | alert.wav |

Which pair, which timeframe
A 30-bar swing anchor suits hourly and four-hour charts. On the hourly EURUSD screenshot, grid breaks come a few times a week. On D1 the grid covers months of swings.
What it cannot do
Grid steps are arithmetic, not support.
Thirty-bar swings confirm very late.
Angle lines depend on chart scaling.
The sound route ships on.
Copy the compiled Pama Ganngrid 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.
Download the Pama Ganngrid Indicator for MT4 and MT5
The zip holds the compiled Pama Ganngrid 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.
FAQ
How does GannStepATR 1.0 set the grid?
Each grid line sits one average range further from the midpoint than the last. In volatile markets the lines spread out, and in quiet ones they tighten.
What anchors the grid when PivotLookback is 30?
The midpoint between the most recent confirmed swing high and swing low, each needing thirty bars on both sides. The grid shifts when a new swing confirms.
What do the ShowAngles lines represent?
Gann’s 1×1, 2×1 and 1×2 angles from the anchor: one step per bar, two steps per bar, and one step per two bars. They show the pace of a move.
When does a Pama Buy print?
When a close moves up through the next grid level above the midpoint after the previous close sat at or below it. `CooldownBars` then waits six bars.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Pama Ganngrid Indicator as one input. Always backtest before trading live.
Category: this is part of our Signal and Forecast collection. Browse more Signal and Forecast for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.
External references
- The core method is documented in Barnewall Two-way Model on Wikipedia.
- Additional market context is at Riskrewardratio at Investopedia.
