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.
| Signature | Returns |
|---|---|
| gex.supported() -> bool | Whether gamma is wired on this chart |
| gex.available() -> bool | Whether a publication landed inside this bar |
| gex.time() -> float | Publication timestamp, epoch milliseconds |
| gex.spot() -> float | Spot at publication, as a chart price |
| gex.zero_gamma() -> float | The zero gamma level |
| gex.major_pos_vol() -> float | Largest positive gamma level by volume |
| gex.major_neg_vol() -> float | Largest negative gamma level by volume |
| gex.major_pos_oi() -> float | Largest positive gamma level by open interest |
| gex.major_neg_oi() -> float | Largest negative gamma level by open interest |
| gex.net_vol() -> float | Net gamma by volume |
| gex.net_oi() -> float | Net gamma by open interest |
| gex.strike_count() -> int | How many strikes the publication carries, 0 without one |
| gex.strike_price(index: int) -> float | Price of a strike, ascending |
| gex.strike_vol(index: int) -> float | Its gamma by volume |
| gex.strike_oi(index: int) -> float | Its gamma by open interest |
| gex.strike_at(price: float) -> float | Price of the strike that owns this price |
| gex.vol_at(price: float) -> float | Its gamma by volume |
| gex.oi_at(price: float) -> float | Its 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")