Gamma Exposure (GEX) Implemented in MQL5
查找文件
仓库文件(优先显示最新提交)
文件名 最新提交消息 最新提交日期
2026-08-14 00:09:42 +00:00
Files/GEX initial commit 2026-07-07 19:24:59 +00:00
Include/GEX initial commit 2026-07-07 19:24:01 +00:00
Indicators/GEX initial commit 2026-07-07 19:24:31 +00:00
README.md Add README 2026-08-14 00:09:42 +00:00

Gamma Exposure (GEX)

Dealer gamma exposure computed from an option chain and drawn on the chart in MQL5.

Companion code for the MQL5 article: https://www.mql5.com/en/articles/23410

What it does

Gamma exposure estimates how dealers have to hedge as spot moves. Where net gamma is positive, hedging leans against price and dampens it. Where it is negative, hedging pushes with price. The zero-gamma flip is the level between the two, and it is the number most of this is built to find.

The Black-Scholes core prices options, inverts price to implied volatility, and returns gamma. GexData aggregates the chain into a profile per strike, and GexMap.mq5 draws it beside the price axis.

The chain can come from a CSV or from native MetaTrader 5 options, so the tool works whether or not your broker carries the instruments.

Layout

Include/GEX/BlackScholes.mqh        pricing, IV inversion, greeks
Include/GEX/GexData.mqh             chain aggregation and the flip level
Include/GEX/GexProviderNative.mqh   native MT5 options feed
Indicators/GEX/GexMap.mq5           the chart map
Files/GEX/gex_chain_sample.csv      sample chain, for running without a feed

The sample CSV lets you run the indicator before wiring up a live chain.

Disclaimer

Educational code. Past behaviour of any model or dataset says nothing about future results. Test on your own data and broker conditions before drawing conclusions.