Discussing the article: "Mapping Dealer Gamma Exposure (GEX) in MetaTrader 5: Walls, the Zero-Gamma Flip, and a Chart Overlay"

 

Check out the new article: Mapping Dealer Gamma Exposure (GEX) in MetaTrader 5: Walls, the Zero-Gamma Flip, and a Chart Overlay.

In this article we build a dealer gamma-exposure map in MQL5. From an option chain, the tool computes per-strike GEX, finds the call and put walls, and solves for the zero-gamma flip that separates a mean-reverting regime from a trending one, then draws it all on the chart. CSV and native-symbol data paths included.

Start with the party on the other side of your option trade. When you buy a call, a market maker sells it, and they do not want the directional risk. They hedge it away by holding delta of the underlying, and they keep re-hedging as price moves, because the option's delta changes as price moves. The rate at which delta changes is gamma. Gamma is what forces the dealer to trade the underlying continuously to stay hedged, and the direction of that forced trading is the whole story.

If the dealer is long gamma, their hedge is stabilising: as price rises their delta grows, so they sell the underlying into the rise; as price falls their delta shrinks, so they buy into the fall. They lean against the move. Concentrated across a whole book, long-gamma hedging suppresses volatility and manufactures the mean reversion you see when a market pins to a level. If the dealer is short gamma, everything inverts: they must buy as price rises and sell as it falls, chasing the move, adding fuel. Short-gamma hedging amplifies volatility and turns ordinary moves into trends and squeezes.

The convention this tool follows is the standard one used by every public GEX model. Customers are net long the options they buy, so dealers are net short calls and long puts against them. We treat a call's gamma as a positive contribution to dealer exposure and a put's as a negative one. It is an assumption, not a measured fact, and we say so plainly later. But it is the assumption that makes the numbers line up with observed behaviour, and it is what lets us turn a chain into a single signed profile.

Two things fall out of that profile and they are what a trader actually reads. The first is the pair of walls: the strike with the largest positive exposure (the call wall, which tends to act as a ceiling because dealer selling intensifies there) and the strike with the largest negative exposure (the put wall, a floor for the mirror reason). The second, and more important, level is the zero-gamma flip: the price at which the book's total gamma is exactly zero. Above the flip the aggregate dealer position is typically long gamma, so the regime is mean-reverting and moves get faded; below it the position flips short, so the regime is trending and moves get chased. Where spot sits relative to the flip is a one-glance read on which of those two worlds you are trading in.

How dealer hedging suppresses volatility above the flip and amplifies it below, illustrating the mean reversion to trend regime switch

Author: Muhammad Minhas Qamar