Builtins: options gamma

The gamma publication that landed inside the bar, with every price already on the chart price axis. A live chart keeps every publication it received since the script started running, each on the bar it landed in, up to the newest 2,000. A bar no publication landed in answers gex.available() false; nothing is carried forward for you, so keep the numbers in a var to draw them across the chart.

SignatureReturns
gex.supported() -> boolWhether gamma is wired on this chart
gex.available() -> boolWhether a publication landed inside this bar
gex.time() -> floatPublication timestamp, epoch milliseconds
gex.spot() -> floatSpot at publication, as a chart price
gex.zero_gamma() -> floatThe zero gamma level
gex.major_pos_vol() -> floatLargest positive gamma level by volume
gex.major_neg_vol() -> floatLargest negative gamma level by volume
gex.major_pos_oi() -> floatLargest positive gamma level by open interest
gex.major_neg_oi() -> floatLargest negative gamma level by open interest
gex.net_vol() -> floatNet gamma by volume
gex.net_oi() -> floatNet gamma by open interest
gex.strike_count() -> intHow many strikes the publication carries, 0 without one
gex.strike_price(index: int) -> floatPrice of a strike, ascending
gex.strike_vol(index: int) -> floatIts gamma by volume
gex.strike_oi(index: int) -> floatIts gamma by open interest
gex.strike_at(price: float) -> floatPrice of the strike that owns this price
gex.vol_at(price: float) -> floatIts gamma by volume
gex.oi_at(price: float) -> floatIts gamma by open interest
  • A strike owns the half open range from itself to the next strike, so nothing is rounded to a nearest strike.
  • Gamma comes from your own GEXBot key and what your GEXBot tier includes. The script opens it by itself; no gamma indicator needs to be on the chart.
  • Gamma is present time data with no recorded history, so gex.supported() is false in replay.
var zero_level: float = nan
zero_level := nz(zero_level[1], nan)
if gex.supported() && gex.available() {
  zero_level := gex.zero_gamma()
}
plot.hline(zero_level, "#F59E0B", 1, "dashed", "Zero gamma")

Every layer of the market, Orderflow to optionflow, on one chart.

Institutional grade Orderflow data with backtesting and journaling built in. Join the waitlist for early access.

Get Access