COT Commercial Hedger ExtremeIn commodities, the crowd and the smart money sit on opposite sides of the same report every week. The Commitment of Traders breaks open interest into commercials -- the producers, merchants and processors who hedge physical -- and large speculators, who are mostly trend-following money. The commercials are the ones who actually touch the barrel, the bushel, the bar. When they move to an extreme, it pays to listen.
The pattern that marks real commodity bottoms is simple to say and hard to wait for: commercial hedgers covering shorts en masse, from a multi-year net-short extreme, and curling back toward flat or net long. That is the producers deciding price has fallen far enough that they no longer need to hedge aggressively. It happened at the 2008 low, it happened into the 2018-19 lows, and I used this exact tell to call the September 2022 gold bottom near $1,640 in real time on TradingView. Gold peaked above $5,500 in January 2026, a move of more than 200% from that low.
This indicator puts that read on your chart.
The colored net line is the commercial position: red when they're at an extreme and still pressing shorts (no bottom), yellow when they start covering up off that extreme, green when they curl to flat or net long (the bottom tell). A triangle marks the first week they begin covering, a diamond marks the cross to net long. The blue line is large speculators for context -- they are usually heaviest long right as commercials are heaviest short, which is the whole point. Optional small-trader line too.
The dashboard shows commercial net, where it sits in its multi-year percentile, the spec and small-trader nets, and whether covering is underway. Alerts fire when hedgers start covering and when they flip toward net long.
Works on any futures with a CFTC code -- gold, silver, copper, oil, grains, even the index futures. Set the code in the settings to match the contract you're charting. Default is gold.
One read in isolation is a tell, not a trigger. I pair it with trend and price structure -- it tells you the tank is full of fuel, not that the match is lit. But when commercials cover their shorts, I want to know. مؤشر

Options Positioning OscillatorOptions Positioning Oscillator
What it does
The Options Positioning Oscillator is a single bounded line, scaled in standard-deviation (σ) units, that reads where derivatives positioning is leaning — risk-on (bullish) versus risk-off / hedged (bearish).
Most oscillators read price (RSI, Stochastic, MACD, etc.). This one deliberately does not. It reads the implied-volatility and futures-basis structure that sits underneath price, because hedging and positioning leave their footprint in the volatility surface and the cash-and-carry basis before they fully show up in price momentum. The output is one easy-to-read line with σ-banded extremes, so you can see at a glance whether positioning is neutral, leaning, or stretched.
Why these components are combined (mashup rationale)
This is not a bundle of unrelated indicators stacked for the sake of it. The three core legs are complementary, research-documented measurements of the same underlying quantity — the price of variance risk and the market's appetite for risk:
Implied-Volatility Rank — the level of implied vol within its own range (where fear sits historically).
Volatility Term-Structure — implied vol versus its own trend (the slope: calm/contango vs stressed/backwardation).
Futures Basis — the cash-and-carry premium or discount (demand and carry vs hedging pressure).
Each leg, on its own, is a noisy proxy for risk appetite. The academic literature shows each carries genuine information: implied volatility systematically exceeds subsequent realized volatility, producing a variance risk premium (Bakshi & Kapadia 2003; Carr & Wu 2009), and the shape/slope of the volatility term structure carries information about the price of variance risk that predicts volatility-asset returns incrementally to other proxies (Johnson 2017). Combining several noisy-but-informative proxies of one latent variable, on a common standardized scale, denoises any single proxy — a textbook signal-combination, which is exactly why the mashup is justified rather than arbitrary.
Two optional legs — Put-Call Ratio and Option Skew — extend the read for users who can supply that data as an external series. They are off by default because TradingView cannot natively pull live option-chain data; turning them on without a real source would feed price in their place, which would be wrong. The composite automatically re-balances around whatever legs are active.
How the components work together
Every leg is converted to a z-score on its native timeframe so they share one scale (the volatility legs are measured on a stable Daily timeframe by default, so "IV-rank" means the same thing whether you run a 5-minute or daily chart). The legs are sign-aligned so that up = bullish lean in every case:
high implied-vol level → bearish (subtracted)
steep/stressed term slope → bearish (subtracted)
premium futures basis → bullish (added)
They are then combined as a weighted average and lightly smoothed. The result is one line where positive = crowd leaning bullish/risk-on, negative = leaning bearish/hedged, and the dotted Extreme bands flag stretched positioning prone to mean-reversion.
How to use it
Read the level, not only the crosses. Above the +Lean band = bullish lean; below the −Lean band = bearish/hedged lean; beyond the dotted Extreme bands = stretched.
Turns out of an extreme (the triangles) are the actionable events — positioning unwinding from a stretched state.
Divergences (circles) warn when price and positioning disagree — e.g. price makes a higher high while positioning makes a lower high.
Read the EDGE row. The dashboard runs a live forward-return harness: for each turn it checks whether a favourable move (≥ k×ATR within the horizon) actually occurred, and compares that Hit % against the unconditional Base %. EDGE = Hit − Base is the only honest measure of whether the signal is doing anything on your instrument. If EDGE is near zero, the signal is not adding information on that market/timeframe — and the script tells you so.
Why it is original
It is not a re-skinned price oscillator. It is an options/volatility-native positioning gauge that (a) fuses the implied-vol level, term-structure slope, and futures basis into one standardized composite, (b) measures the volatility legs on a stable higher timeframe so the read is timeframe-consistent, and (c) ships with a built-in forward-return calibration harness that reports its own live edge instead of asking you to trust it. I am not aware of a published TradingView oscillator that combines these specific volatility-structure components with self-calibration.
Settings guide
01 · Data Sources — Cash, Futures and Implied-Vol-Index symbols (default NIFTY / NSE; change for any market), the timeframe for the volatility legs (default Daily), and a universal price source.
02 · Engine — IV-rank lookback, term mean length, normalization window, output smoothing.
03 · Component Weights — weight each leg; set a leg to 0 to drop it. Optional PCR / Skew legs (off by default; require external data).
04 · Calibration — horizon, favourable-move threshold (×ATR), base-rate window.
05 · Bands — Lean and Extreme σ bands; divergence pivot.
06 · Display & Theme — visual style (gradient area + glow / histogram / line), background regime tint, dashboard, colors.
Non-repaint
The volatility legs are requested with lookahead_off and settle on their bar's close — there is no future leak. Higher-timeframe values develop through the forming bar and confirm at its close, which is standard, intended behaviour.
Concept credit
Variance risk premium and its predictive content — Bakshi & Kapadia (2003); Carr & Wu (2009); Bollerslev, Tauchen & Zhou (2009).
Volatility term-structure slope and return predictability — Johnson, Risk Premia and the VIX Term Structure (2017).
Cash-and-carry futures basis — standard cost-of-carry theory.
Implied-volatility rank / percentile — established options-desk practice.
Disclaimer
For research and education only. This script is not financial advice, not a recommendation, and not a guarantee of future results. All statistics shown are in-sample, close-to-close, and exclude costs and slippage — a study aid, not a backtest. Do your own research and manage your own risk. مؤشر

COT Index Lite - by NightbricksThe COT Index shows Managed Money (Non-Commercial) net positioning as a normalised
0–100 value, auto-detected from your chart symbol across 60+ futures markets. No manual
CFTC code required for supported assets.
**What it measures**
Net positioning (longs minus shorts) from the CFTC Commitment of Traders report,
normalised against a 3-year (156-week) lookback window:
- **100** — net longs at a 3-year high. The crowd is maximally long.
- **0** — net shorts at a 3-year high. The crowd is maximally short.
- **50** — the midpoint of the 3-year range.
- **Above 80** — historically crowded-long zone (red background shading).
- **Below 20** — historically crowded-short zone (green background shading).
Updated every Friday after the CFTC 3:30 PM ET release. The script reads the last
*completed* weekly value, so the printed reading does not repaint intra-week.
**Why a 3-year window?**
Many COT Index tools use a 26–52 week lookback. Short windows produce unstable readings
that jump as old extremes age out of the window. A 156-week window spans a full market
cycle, so an "extreme" reading is extreme relative to years of behaviour — not just the
last few months.
**Supported markets — auto-detected**
- Equity indices: S&P 500, Nasdaq 100, Dow, Russell 2000, Nikkei, VIX
- FX: EUR, GBP, JPY, CHF, CAD, AUD, NZD, MXN
- Rates: 30Y, 10Y, 5Y, 2Y T-Notes, Fed Funds
- Crypto: Bitcoin, Ethereum
- Energy: WTI, Brent, Natural Gas, Heating Oil, Gasoline
- Metals: Gold, Silver, Copper, Platinum, Palladium
- Grains: Corn, Wheat, Soybeans, Soybean Meal/Oil, Oats, Rice
- Softs: Cotton, Sugar, Coffee, Cocoa, OJ
- Livestock: Live Cattle, Lean Hogs, Feeder Cattle
For any unlisted instrument, type its CFTC market code into the "CFTC Code override" input.
**How to use it**
- Add it to a **Weekly** chart — COT data is weekly; the script warns you on other timeframes.
- Treat readings above 80 and below 20 as *context*, not signals. A crowded-long market
can stay crowded; the index tells you how stretched positioning is, not when it turns.
- Combine with price structure and your own risk rules.
**What the COT Index does — and does not — tell you**
The COT Index answers one question: *where is positioning within its 3-year range?* By
design it does **not** measure how statistically extreme the reading is, whether
positioning is accelerating or unwinding, or whether price and positioning are diverging.
Those are separate calculations on the same underlying data — useful to understand as
their own concepts, but out of scope for a single 0–100 line.
Open-source. Read the code, fork it, learn from it. مؤشر

Open Interest Commitment Map [AGPro Series]Open Interest Commitment Map
🧠 Core Idea
Is open interest expansion actually committing with price, or is participation building without conviction?
📌 Overview / What it does
Open Interest Commitment Map is a crypto derivatives context tool designed to evaluate whether open interest expansion, contraction, price movement, volatility, and persistence are aligning into a meaningful market participation state.
The script attempts to read open interest data through configurable OI symbol builders, including Perp Contract OI, Chart Ticker + _OI, Dot-P + _OI, and Manual mode. When supported open interest data is available, it measures OI change, normalizes that change, compares it with price movement, and classifies the result into commitment states. If official open interest data is unavailable, it can fall back to a transparent Volume Proxy mode so the user knows exactly what data mode is being used.
It produces a projected commitment zone, state labels, right-side tags, alerts, and an AG Pro dashboard. It does not predict price direction, automate entries, or claim that open interest expansion must continue.
🎯 Purpose & Design Philosophy
This script was built because open interest is often discussed as if it has one simple meaning. In reality, rising open interest can support a trend, pressure a crowded side, reflect absorption, or become irrelevant without price confirmation.
The goal is to turn open interest into a readable commitment map rather than a raw number. The script asks whether participation is expanding, whether price is accepting that expansion, whether the behavior persists, and whether the current state deserves attention.
It is designed for crypto futures and perpetual traders who want to evaluate derivatives participation without relying on a simplistic “OI up equals bullish” or “OI down equals bearish” interpretation.
⚡ Why This Script Is Different
Most tools show open interest as a separate line or histogram.
This script does NOT treat open interest as a standalone signal, does NOT assume rising OI is automatically bullish, and does NOT hide data limitations when official OI is unavailable.
Instead, it maps OI behavior into structured states: Long Build, Short Build, OI Unwind, Absorption, Reset, or Data Missing. It combines OI change, normalized OI deviation, price movement in ATR units, trend acceptance, persistence, and volume rank into one visual commitment framework.
⚙️ Methodology
1. Context Detection
The script builds or reads the open interest source and checks whether official OI data is available.
2. Reference Mapping
Open interest change is measured over a configurable lookback and normalized against a longer historical window.
3. Reaction Evaluation
The model compares OI expansion or contraction with price movement, trend position, volatility, and persistence.
4. Visual Output
The final state is displayed through a projected commitment zone, state tags, event labels, and a compact AG Pro panel.
🗺️ How to Read the Chart
The commitment zone represents the active area where price and participation behavior are being monitored.
Labels mark key state transitions such as Long Build, Short Build, OI Unwind, and OI Absorption.
Colors communicate context:
• Teal = Long Build
• Pink = Short Build
• Yellow = OI Unwind
• Indigo = Absorption or neutral commitment context
• Light/neutral = Reset or Data Missing
The panel shows state, score, OI change, OI z-score, persistence, volume rank, direction, quality, data mode, OI source, and distance from the OI baseline.
🚦 Signals & States
• Long Build → open interest expands while price shows constructive acceptance
• Short Build → open interest expands while price shows bearish acceptance
• OI Unwind → open interest contracts meaningfully while price moves
• OI Absorption → open interest expands but price movement remains compressed
• Reset → no strong commitment state is active
• Data Missing → no usable open interest or proxy data is available
🔔 Alerts Logic
Alerts trigger when the script transitions into a selected commitment state.
Long Build alerts mark expanding participation with constructive price acceptance.
Short Build alerts mark expanding participation with bearish price acceptance.
OI Unwind alerts mark meaningful open interest contraction while price is moving.
OI Absorption alerts mark expanding open interest with limited price movement.
Alerts are attention markers, not trade instructions.
🧩 Confluence Logic
The strongest read appears when multiple conditions align:
Open interest change + OI z-score + price movement + trend acceptance + persistence + volume rank.
When expansion appears without price progress, the context can shift from directional commitment to absorption. When contraction appears with price movement, the context can shift toward unwind behavior.
📊 When to Use
• Crypto perpetual and futures markets
• Symbols where TradingView provides open interest data through `_OI`
• High-participation sessions where trader positioning may matter
• Breakout, breakdown, compression, and post-liquidation environments
• Situations where the user wants to distinguish commitment from noise
⚠️ When NOT to Use
• Symbols with no reliable open interest data when proxy mode is not desired
• Illiquid markets with unstable volume or fragmented data
• Very low timeframe noise without broader context
• Spot-only markets where open interest is not relevant
• Major news events where positioning can change faster than the model can stabilize
🎛️ Key Inputs
• OI Symbol Mode → controls whether the script uses Perp Contract OI, Chart Ticker + _OI, Dot-P + _OI, or Manual OI source selection
• Manual Open Interest Symbol → allows manual OI source selection if needed
• Allow Volume Proxy Fallback → uses transparent proxy mode when official OI is unavailable
• OI Baseline Length → controls the smoothing baseline for participation data
• OI Change Lookback → controls the change window for OI expansion or contraction
• OI Normalization Lookback → controls how unusual the OI change must be
• OI Commitment Z Threshold → defines the minimum normalized expansion required for commitment
• Visual Settings → control zone projection, event labels, right-side tags, and font sizes
🖥️ Interface & Visual Design
The interface is built around a clean commitment zone and a compact AG Pro panel.
The chart should feel active but not crowded. The projected zone gives the screenshot a visible story, right-side tags show the live state, and event labels highlight meaningful historical transitions.
The panel follows the AG Pro standard with a merged blue header row, adjustable location, adjustable theme, and adjustable font size.
🧪 Practical Usage Workflow
1. Apply the script to a crypto perpetual or futures chart.
2. Start with OI Symbol Mode set to Perp Contract OI.
3. Confirm the Data Mode row says Open Interest when official OI data is available.
4. If Data Mode says Volume Proxy, try Chart Ticker + _OI, Dot-P + _OI, or Manual mode before using the screenshot for publication.
5. Read the State and Score rows.
6. Inspect whether price and OI are building, unwinding, absorbing, or resetting.
7. Confirm the context with broader market structure, liquidity, volatility, and risk management.
🔍 Interpretation Guidelines
Rising open interest is not automatically bullish.
Falling open interest is not automatically bearish.
Open interest expansion becomes more meaningful when price movement and persistence support the same story.
Absorption can be important because participation is increasing without clean price progress.
Unwind can be important because positioning is contracting while price is moving.
🚫 What This Script Is NOT
This script is not a prediction engine.
This script is not financial advice.
This script is not an auto trading system.
This script is not a guaranteed signal engine.
This script does not guarantee official open interest data exists on every symbol.
This script does not claim that open interest expansion must continue or reverse.
⚠️ Limitations & Transparency
Official open interest availability depends on the symbol, exchange, and TradingView data support.
If official OI data is not available and proxy fallback is enabled, the panel clearly shows Volume Proxy mode.
Volume Proxy is not the same as official open interest. It can still help visualize participation pressure, but it should be interpreted more cautiously.
Different exchanges, contract types, timeframes, and liquidity conditions can produce different open interest behavior.
🧠 Market Context Notes
Open interest can help traders think about participation, but it needs context.
Expansion with price acceptance may indicate commitment.
Expansion without progress may indicate absorption.
Contraction with movement may indicate unwind.
No single state removes uncertainty.
🧾 Use Case Examples
When OI expands and price accepts higher while trend context supports the move, the script may classify Long Build.
When OI expands and price accepts lower while trend context supports the move, the script may classify Short Build.
When OI expands but price remains compressed, OI Absorption can warn that participation is building without clean directional progress.
When OI contracts while price moves, OI Unwind can help identify positioning reduction.
🧱 System Philosophy
Open Interest Commitment Map follows the AGProLabs design principle of building decision-support maps rather than prediction tools.
The script is designed to organize participation context into a readable workflow: read the panel, inspect the zone, check the state, evaluate reaction, and confirm with broader structure.
🔐 Non-Promise Statement
No open interest model can guarantee future price direction.
No commitment score creates certainty.
This tool helps structure interpretation; it does not replace judgment.
📉 Risk Disclosure
Trading involves risk.
Crypto derivatives can be highly volatile and may involve leverage, liquidation risk, exchange risk, and rapid market movement.
This script is for educational and analytical purposes only.
It does not provide financial advice or guaranteed trading outcomes.
Users remain responsible for their own decisions.
📚 Educational Note
Use the script as a learning layer for understanding how participation, price movement, volatility, persistence, and open interest behavior can combine into a more complete derivatives-context read.
مؤشر

Kelly Criterion CurveThe Kelly Criterion Curve indicator gives you the leverage/return tradeoff by displaying a bell curve with growth and leverage. This indicator shows where you are on the risk curve depending your allocation/leverage used and the optimal leverage to use in any asset.
What Does It Show?
The indicator plots the Kelly growth function:
g(f) = μ·f - 0.5·σ²·f²
Where:
g(f) = Expected growth rate at leverage f
μ = Annualized return
σ = Annualized volatility
f = Leverage multiplier
The curve peaks at the Optimal Kelly leverage (full Kelly) and then declines, showing that:
Too little leverage = underutilized capital
Too much leverage = volatility drag destroys returns
The curve is dynamically divided into zones based on your asset's return profile:
Underinvesting (Green) - Too conservative, underutilized capital
Optimal Sizing (Teal) - Sweet spot for position sizing
High Risk (Yellow) - Diminishing returns, high volatility drag
Never Logical (Red) - Risk outweighs reward
Suicidal (Black) - Negative expected returns
Position Markers
★ Kelly Optimal (Green/Red) - Maximum long-term log growth leverage
½ Kelly (Yellow) - Conservative sizing (recommended most times)
Settings for Kelly Calculation
Lookback Period - Historical data window for calculations (default: 252 = 1 year)
Annual Trading Days - For annualization (default: 252)
Use Log Returns - More accurate for compounding (recommended: ON)
Curve Smoothness (20-200) - Number of points on curve (default: 100)
Maximum Leverage Display (2-10x) - X-axis range
Show Short Positions - Display negative leverage for short strategies. Note the chart is not fully optimized for shorts.
Show Optimal Kelly Marker - Mark optimal leverage on curve
Show Half Kelly Marker - Mark conservative leverage
How to Use
Look at Optimal Kelly - This is the theoretical maximum for the period analyzed
Use Half Kelly for conservative sizing
Check which risk zone your position falls into
If your leverage is in the High Risk zone → Consider reducing
If you're in Never Logical or Suicidal → I wish you good luck because you will need a lot
If you're in Underinvesting → You may be too conservative
IMPORTANT
The indicator is based on past returns and volatility. It CANNOT predict:
Market crashes
Regime changes
Black swan events
If you use Optimal Kelly and suddenly there's a crash, you are toasted.
Full Kelly maximizes long-term growth but can experience large drawdowns
Most traders use ¼ to ½ Kelly for risk management
You should almost never use full Kelly, unless you are extremely confident
Remember leverage amplifies gains and losses
Notice how Max Growth isn't simply Ann. Return × Leverage
The formula accounts for volatility drag (the cost of using leverage)
Higher volatility = lower optimal leverage
The Kelly Criterion was developed by John L. Kelly Jr. in 1956 for information theory and later adapted for gambling (card counting for example, pioneered by Edward O. Thorp), and investing.
Optimal Leverage:
f* = μ / σ²
Expected Growth Function:
g(f) = μ·f - 0.5·σ²·f²
This is a quadratic function that forms the bell curve you see on the chart.
This indicator pairs perfectly with my other indicators:
Kelly Optimal Leverage Indicator
Jensen's Inequality + Kelly Leverage
Multi-Leverage VAR/VaG Indicator
For deeper insights on Kelly Criterion and optimal leverage:
Read my article: Unlock the Power of Monte Carlo
Read these papers:
Alpha Generation and Risk Smoothing using Managed
Volatility
Leverage for the Long Run - A Systematic Approach to Managing Risk and Magnifying Returns in Stocks
Trading with leverage involves substantial risk of loss.
The Kelly Criterion provides a theoretical framework - actual trading requires additional risk management, market analysis, and psychological discipline.
Some examples of using the Kelly Criterion Curve:
Russel 2000, last 500 days Kelly curve
Here's you can see that the optimal sizing over the last 500 days would have been around 1.7x leverage and that full Kelly is 3.4x leverage.
While Russel 2000 returned 16%, full Kelly would have returned 27.8%, and more that full Kelly (3.4x leverage) would lower the returns.
Berkshire Hathaway, last 1000 days Kelly curve
BRK stock optimal Kelly (full Kelly) is 2.5x for the last 1000 trading days. To reduce volatility, one could use 1/2 Kelly which is 1.25x leverage.
Bitcoin, last 2000 trading days Kelly curve
Very interestingly, the indicator tells us not to leverage Bitcoin. Even a 2x leverage can lead to ruin given its volatility, and in fact, in 2025 many traders got liquidated while leveraging Bitcoin by 2x.
Let me know if you have questions, suggestions and comments.
- Henrique Centieiro مؤشر

Multi-Timeframe EMA SMA HMA LR Proximity & Alerts [HYPR-run]DESCRIPTION:
Nine moving averages from Weekly down to chart timeframe on one chart.
Weekly 10 SMA, Daily 50/100/200 EMA/SMA, 4hr 200 SMA, plus chart-TF
10 EMA, 200 SMA, Hull MA, and Linear Regression. See where price sits
relative to every meaningful institutional level without switching
timeframes.
The proximity filter is the key feature. Enable all nine MAs, set a
threshold, and only lines near current price appear. The Daily 200 SMA
at 20% away? Hidden. When price drops toward it, the line shows up
automatically. Your chart stays clean and the levels that matter are
always visible.
DISCOVERING EDGE
We have found that managing risk in mature assets with the 50d, 100d,
200d, and 10w is highly effective, simple and a methodology shared
amongst experienced investors and traders. This indicator interprets
that positioning across 16 configurations with a 7-tier color gradient,
so you see structural health at a glance. "Oh, it's bouncing on the
50dma right now, there may be a set-up in play..."
POSITIONAL CONTEXT vs STATIC MA OVERLAY
Static overlays show every MA with no interpretation of what the
positioning means. This indicator color-codes 16 above/below
configurations weighted by MA significance (200d and 10w are
heavyweights), surfaces bounce/reject events ranked by importance,
and shows % distance to each curve so you know exactly how much of a
move is needed for price to converge.
- Events fire independently of display toggles; a hidden 200d SMA
that price just bounced off still shows "Bouncing 200d" in the
dashboard.
- 7-tier positioning gradient weighted by MA significance (200d and
10w are heavyweights) shows structural health in one glance.
- Webhook alerts on configurable MA cross (9 options from 10w to
linear regression) with full bar filter.
FEATURES
- 9 moving averages from Weekly down to chart timeframe
- Proximity filter: hides irrelevant MAs far from price
- Bounce/reject detection at each MA level
- Two alert systems: XO/XU cross + bounce/reject on selected MA
- Bounce/reject alerts fire when price wicks into selected MA (support/resistance hold)
- Dashboard: row 1 positioning context (above/below each MA), row 2 live events (bouncing, rejecting, XO, XU)
- Dashboard dark/light theme toggle for any chart background
- Polyline rendering (smooth lines, no staircase artifacts)
- End-of-line labels with % distance from price
- Toggle each MA independently
HOW IT WORKS
Higher timeframe MAs are pulled via request.security and rendered as
polylines for smooth display on any chart timeframe. The proximity check
runs on every bar: if the distance between price and a given MA exceeds
the threshold %, the polyline is not drawn. When price approaches, the
line appears. Alerts fire independently of display toggles.
DASHBOARD
Two-row dynamic dashboard that updates every bar.
- Row 1 (positioning): which MAs price is above or below, grouped with
"&" separators. The Weekly 10 SMA is separated as the anchor by a
pipe. 7-tier color gradient based on how many of the four key MAs
(50d, 100d, 200d, 10w) price is above, with heavyweight distinction
(200d and 10w carry more weight than 50d/100d): bright green (all
four), green (3/4 with both heavyweights), dark green (3/4 missing a
heavyweight), yellow (2/4), dark red (1/4 with a heavyweight), red
(1/4 only lightweight), bright red (none)
- Row 2 (events): up to 3 simultaneous events, most significant MA first
(w10 → d200 → d100 → d50 → 4h200). Bouncing (support holding),
rejecting (resistance holding), XO (crossover), XU (crossunder). Color
intensity uses a 2D significance matrix: MA weight x event type.
Brightgreen for a w10 bounce; yellow for a d200 cross; darkgreen for
idle above d50. Dark gray when idle
- Runs independently of display toggles; events fire for all MAs even if
the line is hidden by the proximity filter
DEFAULT CONFIGURATION
Weekly 10 SMA (white), Daily 50 EMA (yellow), and Daily 200 SMA (purple)
are on by default. Proximity filter on at 5%. These three levels are the
most commonly watched institutional reference points.
POSITIONING TABLE (row 1, all 16 configurations)
BADGE COLOR (header, positioning x event combination)
ALERTS
Two alert systems. XO/XU fires when price crosses the selected MA with a
full bar filter (body >= 66.6% of range, rejects doji/wick-heavy bars).
Bounce/Reject fires when price wicks into the selected MA from the correct
side and closes confirming support (bounce) or resistance (reject). Both
fire JSON payloads; works with any webhook receiver.
CREDITS
No external libraries or third-party code used. مؤشر

مؤشر

Gamma Exposure Levels [BackQuant]Gamma Exposure Levels
This indicator allows you to paste Gamma Exposure (GEX) level data directly into a text input on TradingView, automatically parsing the values and plotting them as labeled horizontal lines on your chart. It is designed for traders who use options-derived gamma exposure data as part of their technical analysis and want a fast, visual way to overlay those key price levels onto any chart and timeframe.
Rather than manually drawing lines for each level, this script reads a structured block of GEX output text, extracts every relevant dollar value, and draws color-coded, labeled levels across your chart. If two or more levels share the same price, their labels are automatically merged (for example, "Max Pain / Call Res $75,000") so the chart stays clean and readable.
What is Gamma Exposure (GEX)?
Gamma Exposure refers to the aggregate gamma held by options market makers (dealers) at each strike price. Gamma measures how much a dealer's delta (directional hedge) changes as the underlying price moves. When dealers hold large gamma positions, they must continuously hedge by buying or selling the underlying asset, which can either dampen or amplify price movement depending on the sign of that gamma.
When dealers are long gamma (positive GEX), they hedge against the prevailing trend: buying dips and selling rallies. This creates a stabilizing, mean-reverting effect around high-gamma strikes, making those levels act like magnets or support/resistance zones.
When dealers are short gamma (negative GEX), they hedge in the same direction as the move: selling into drops and buying into rallies. This amplifies volatility and can cause sharp, directional moves once a key gamma level breaks.
Understanding where these gamma levels sit gives traders a structural map of where options market makers are likely to add liquidity or accelerate a move.
How to Use This Indicator
Add the indicator to your chart.
Open the indicator settings and find the "Data Input" group at the top.
Paste your full GEX levels output into the text area. The indicator expects a structured text format (see the example format below).
The indicator will automatically parse all dollar values from the text and plot them as horizontal lines with labels.
Use the toggle checkboxes next to each level type to show or hide individual levels.
Customize colors, line style, line width, label size, label offset, and label position from the settings panel.
Expected Input Format
The indicator parses structured GEX output text. Below is an example of the expected format. Copy and paste a block like this directly into the text area input in the indicator settings:
GEX Levels - 04/03/2026, 12:17:19
All-Expiry Levels:
HVL: $72,000 +$1,841 (+2.62%)
Call Resistance: $75,000 +$4,841 (+6.90%)
Put Support: $60,000 $-10,159 (-14.48%)
0DTE Levels:
0DTE HVL: $68,000 $-2,159 (-3.08%)
0DTE Call: $71,000 +$841 (+1.20%)
0DTE Put: $66,000 $-4,159 (-5.93%)
Advanced:
Zero Gamma: $71,819 +$1,660 (+2.37%)
Max Pain: $74,000 +$3,841 (+5.47%)
Expected Move: $64,238 to $76,081
Flip Zones (All): $67,500
All-Expiry GEX Top 10 (by |gamma|):
1. $60,000 $-10,159 (-14.48%) | GEX: -20,711,741.86
2. $75,000 +$4,841 (+6.90%) | GEX: 18,876,578.2
3. $72,000 +$1,841 (+2.62%) | GEX: 17,530,960.01
4. $70,000 $-159 (-0.23%) | GEX: 17,494,795.02
5. $74,000 +$3,841 (+5.47%) | GEX: 13,573,146.08
6. $73,000 +$2,841 (+4.05%) | GEX: 10,380,107.7
7. $69,000 $-1,159 (-1.65%) | GEX: 10,341,883.98
8. $80,000 +$9,841 (+14.03%) | GEX: 8,636,674.83
9. $71,000 +$841 (+1.20%) | GEX: 7,962,084.65
10. $65,000 $-5,159 (-7.35%) | GEX: -7,257,124.01
0DTE GEX Top 10 (by |gamma|):
1. $69,500 $-659 (-0.94%) | GEX: 3,659,702.74
2. $70,500 +$341 (+0.49%) | GEX: 1,152,595.15
3. $69,000 $-1,159 (-1.65%) | GEX: 703,339.82
4. $72,000 +$1,841 (+2.62%) | GEX: 697,625.91
5. $73,000 +$2,841 (+4.05%) | GEX: 419,096.08
6. $68,000 $-2,159 (-3.08%) | GEX: 294,575.89
7. $74,000 +$3,841 (+5.47%) | GEX: 281,083.42
8. $75,000 +$4,841 (+6.90%) | GEX: 183,191.05
9. $66,000 $-4,159 (-5.93%) | GEX: -172,470.38
10. $68,500 $-1,659 (-2.37%) | GEX: 167,135.87
The indicator only extracts the dollar values from this text. The percentage changes, GEX magnitude values, and other metadata are informational context in the source data but are not plotted by this script.
Level Definitions
Below is a detailed explanation of every level this indicator can parse and plot. These are grouped the same way they appear in the indicator settings.
All-Expiry Levels
These levels are derived from gamma exposure aggregated across all option expiration dates.
HVL (High Volume Level) - The price with the highest total gamma exposure across all expirations. This is the strike where dealers hold the most aggregate gamma and therefore where hedging activity is most concentrated. Price tends to gravitate toward the HVL in positive gamma environments because dealer hedging creates a mean-reverting effect around this level. Think of it as the "center of gravity" for options-driven price action.
Call Resistance - The price level where call-side gamma creates overhead resistance. At this strike, the concentration of call gamma means that as price rises toward it, dealers who are long those calls must sell the underlying to stay delta-neutral. This selling pressure acts as a ceiling, making it harder for price to push through. Breaks above call resistance can signal a shift in positioning or the start of a gamma squeeze.
Put Support - The price level where put-side gamma creates downside support. At this strike, the concentration of put gamma means that as price falls toward it, dealers must buy the underlying to hedge. This buying pressure acts as a floor, cushioning the decline. A break below put support can accelerate selling as dealers flip from buying to selling, potentially triggering a sharp move lower.
0DTE Levels
These levels are derived exclusively from same-day (zero days to expiration) options. Because 0DTE options have extremely high gamma due to their proximity to expiration, they can dominate intraday price action even when their notional size is smaller than longer-dated positions.
0DTE HVL - The same-day high volume level. This is the intraday gamma center of gravity derived solely from options expiring today. It represents the strike where 0DTE dealer hedging is most concentrated and where intraday gamma polarity can flip. Particularly relevant for intraday traders, as 0DTE gamma effects intensify throughout the trading session and peak in the final hours before expiration.
0DTE Call - Same-day call resistance. The intraday ceiling created by 0DTE call gamma. Dealer hedging against these expiring calls creates selling pressure as price approaches this level. Because 0DTE gamma decays rapidly, this level can shift during the session and its strength increases as expiration approaches.
0DTE Put - Same-day put support. The intraday floor created by 0DTE put gamma. Dealer hedging against expiring puts creates buying pressure at this level. Like the 0DTE call level, its influence grows as the trading day progresses and gamma effects intensify near the close.
Advanced Levels
These levels provide additional structural context beyond the core support, resistance, and HVL framework.
Zero Gamma - The precise price where cumulative gamma across all strikes and expirations equals zero. This is one of the most important structural levels in gamma analysis. Above the Zero Gamma level, dealers are net long gamma and their hedging stabilizes price (buying dips, selling rallies). Below it, dealers are net short gamma and their hedging amplifies moves (selling into drops, buying into rallies). Crossing the Zero Gamma level often marks a regime change in how the market behaves, shifting from mean-reversion to trend-following dynamics.
Max Pain - The strike price at which the total value of all outstanding options (both calls and puts) would be minimized if the underlying expired at that price. In other words, it is the price where option holders collectively lose the most money. Max Pain theory suggests that there is a gravitational pull toward this level as expiration approaches, driven by dealers and market makers who benefit from options expiring worthless. It is most relevant in the final days before a major expiration.
Expected Move - The 1-sigma (one standard deviation) expected price range, plotted as two levels: Expected Move Upper and Expected Move Lower. This range represents the statistically expected boundaries of price movement based on current implied volatility. Roughly 68% of the time, price is expected to remain within this range. These levels help traders gauge whether the current price action is within normal bounds or represents an unusual move. A break beyond the expected move range can signal a volatility event or a shift in market regime.
Flip Zones - All price levels where gamma polarity changes sign. At these strikes, dealer hedging behavior transitions from stabilizing (long gamma) to destabilizing (short gamma) or vice versa. Flip zones act as transition boundaries. When price crosses a flip zone, the nature of dealer activity changes, which can lead to shifts in volatility, momentum, and the tendency for price to mean-revert or trend. Multiple flip zones in a narrow range can create a "no man's land" where positioning is mixed and price action becomes choppy.
GEX Top 10
The GEX Top 10 are the ten strike prices with the highest absolute gamma exposure, ranked by the magnitude of their gamma (|gamma|). These represent the strikes where dealer hedging activity is most significant, regardless of whether the gamma is positive (call-dominated, stabilizing) or negative (put-dominated, destabilizing).
The indicator provides a dropdown selector with five options for the GEX Top 10:
None - Do not plot any GEX Top 10 levels.
0DTE - Plot the Top 10 from same-day (0DTE) options only. Best for intraday analysis.
All Expiries - Plot the Top 10 from all expiration dates combined. Best for swing or multi-day analysis.
0DTE 1-5 - Plot only the top 5 from 0DTE options. Useful for reducing chart clutter while keeping the most significant intraday levels.
All Expiries 1-5 - Plot only the top 5 from all expiration dates. Useful for a cleaner multi-day view.
Each of the 10 GEX levels (GEX #1 through GEX #10) has its own individual toggle and color picker, so you can show or hide any specific rank and assign distinct colors to differentiate them.
Overlap Handling
It is common for multiple GEX levels to land on the same price. For example, Max Pain and Call Resistance might both be at $75,000, or a GEX Top 10 strike might coincide with the HVL. Rather than drawing overlapping lines and labels that clutter the chart, this indicator automatically detects when two or more levels share the same price (within a $0.50 tolerance). When a match is found, only one line is drawn at that price and the labels are merged with a "/" separator.
For example, if Max Pain is $75,000 and Call Resistance is also $75,000, the chart will show a single line labeled:
Max Pain / Call Res 75000
This keeps the chart clean and makes it immediately obvious when multiple structural levels converge at the same price, which often signals a particularly significant level.
Customization Options
The indicator provides extensive customization through its settings panel:
Per-Level Controls
Each level type has its own color picker and show/hide toggle on the same line.
GEX Top 10 levels (#1 through #10) each have individual color pickers and toggles.
A dropdown selector lets you choose which GEX Top 10 dataset to plot (0DTE, All Expiries, top 5 only, or none).
Line Style
Line Width: 1 to 4 pixels.
Line Style: Solid, Dashed, or Dotted.
Extend Lines: Both directions, Right only, Left only, or None.
Label Settings
Label Size: Tiny, Small, Normal, Large, or Huge.
Label Offset: Position the labels any number of bars to the right or left of the current bar (-200 to 500).
Label Side: Place labels on the Right or Left side of the chart.
Every toggle and input has a descriptive tooltip that appears on hover, explaining what the level represents and how it is used.
How the Parsing Works
The script uses Pine Script v6 string functions to scan the pasted text for known keywords (such as "HVL:", "Call Resistance:", "0DTE Call:", "Zero Gamma:", "Expected Move:", "Flip Zones:", etc.). For each keyword found, it locates the next "$" character and extracts the numeric value that follows, correctly handling both comma-separated thousands (e.g., $72,000) and decimal values (e.g., $71,819.50).
For the Expected Move, it parses both the lower and upper bounds from the "to" separator (e.g., "$64,238 to $76,081").
For Flip Zones, it scans for every "$" on the line and extracts each value, correctly distinguishing thousands-separator commas from delimiter commas between multiple zone values.
For the GEX Top 10 sections, it identifies the section header ("All-Expiry GEX Top 10" or "0DTE GEX Top 10") and parses the first dollar value from each numbered line, stopping when it hits a new section header or separator.
The indicator only draws on the last bar and uses a delete-and-redraw system to ensure that only one clean set of lines and labels exists at any time. Old drawings are removed before new ones are created on each update.
Important Notes
This indicator does not generate or calculate GEX data. It is a visualization tool that plots externally sourced gamma exposure levels onto your TradingView chart.
The indicator requires you to paste GEX data in the expected structured text format. If the text area is empty, nothing will be plotted.
GEX data is a snapshot in time. Options positioning changes throughout the trading day as new trades are opened and closed. Levels should be updated periodically for the most accurate representation of current dealer positioning.
GEX levels are not guaranteed support or resistance. They represent areas where dealer hedging activity is concentrated, which can influence price behavior but does not determine it. Always use GEX data as one component of a broader analysis framework.
مؤشر

Total Futures Volume & Open Interest (Aggregated Curve)Description
Most futures indicators only look at the front contract, but that often tells an incomplete — and sometimes misleading — story.
This indicator solves that problem by aggregating Volume and Open Interest across the entire futures curve, not just the nearest expiry.
Instead of focusing on a single contract, the script automatically scans up to 40 futures contracts ahead (roughly one year forward) for the same underlying root symbol and sums their data into a single, unified series.
🔍 Why this matters
Open Interest is about commitment, not just activity.
A drop in front-month OI can simply mean rolls, not liquidation
Rising total OI confirms new money entering the market, not just contract switching
Divergences between price and aggregated OI often signal positioning stress, exhaustion, or regime shifts
By looking at total participation across all maturities, you get a much cleaner view of:
Real capital inflows vs. mechanical rolls
Structural positioning changes
Whether volatility is driven by speculation or true exposure changes
This is especially useful during high-volatility phases, contract roll periods, and major macro moves, where front-month data alone can be deceptive.
⚙️ How it works
Automatically iterates through the last 40 futures contracts of the same root symbol starting from ~1 year ahead expiry.
Aggregates: Total Open Interest and Total Volume
Lets you choose what to display directly from the indicator settings
Fully dynamic — no manual symbol selection, no roll management
The result is a continuous, roll-agnostic view of futures participation.
🧠 How to use it
Confirm breakouts with rising aggregated OI
Detect false moves when price expands but total OI contracts
Analyze post-spike behavior to see whether moves were driven by forced liquidation or fresh positioning
Compare volatility spikes against true market engagement
مؤشر

Aggregated Open InterestAggregates Open Interest data across 10 major crypto exchanges: Binance, Bybit, Kraken, MEXC, Bitget, BingX, Coinbase, Deribit, HTX, and Crypto.com.
Displays total market OI with candlesticks on intraday timeframes and a step line on daily+ timeframes. Color-coded: teal for increasing OI, red for decreasing OI.
Toggle individual exchanges on/off in settings to customize your view.
With this indicator there is no need to be on the perpetual chart of the asset for the open interest to be displayed. مؤشر
