OPEN-SOURCE SCRIPT
ที่อัปเดต: Options Gamma Flip Zones [BackQuant]

Options Gamma Flip Zones [BackQuant]
A market-structure style “gamma flip” mapper that builds adaptive strike-like zones, scores how price interacts with them, then promotes the strongest candidates into confirmed flip zones. Designed to highlight pinning, failed breaks, and rotational behavior without needing live options chain data.
What this indicator does
This script identifies price levels that behave like “strike magnets” during conditions that resemble options pinning, then draws dynamic zones around those levels.
Instead of assuming every round number matters, it:
The output is a set of shaded boxes (zones) centered on strike-like levels, with text readouts that show the current state of each zone.
Key concept: “Gamma proxy”
A true gamma flip requires options positioning data. This indicator does not use options chain gamma.
Instead, it uses a proxy approach:
So this tool is best read as:
How zones are created
Zones only start forming when the script detects a pin-friendly regime.
1) Strike Ladder (level selection)
2) Band construction (zone thickness)
Each zone is a symmetric band around the level, using one of two modes:
This matters because “pin behavior” is not a single tick. It’s a region where price repeatedly probes and rejects.
Regime filter (when the script is allowed to believe in pinning)
A zone is only eligible to form and strengthen when Pin Regime is active. Pin Regime is a conjunction of:
1) IV proxy (ATR z-score)
2) Weak trend requirement
The script also requires price action to be non-trending:
Interpretation:
Flip confirmation logic (what upgrades a zone)
A zone is not “confirmed” just because price is near it once. The script builds conviction via evidence accumulation.
Evidence types:
Protections:
A zone becomes confirmed when:
That is important, it avoids promoting levels that only worked briefly in a trending tape.
Zone scoring and lifecycle
Each zone maintains a score that evolves over time. Think of score as “how much this level has recently behaved like a magnet.”
Score dynamics:
Invalidation:
This keeps the chart clean and ensures zones represent current market behavior, not ancient levels.
How to read the plot on chart
1) Zone fill and border
2) Bullish vs bearish coloring
This is not a trade signal by itself, it is a state cue for “which side is in control around the level.”
3) Failed escape highlighting
These are the moments where pin behavior is most visible:
4) Midline (optional)
5) Optional strike ladder overlay
This is a visualization aid for “where the algorithm is rounding,” not a prediction tool.
On-chart text readout (what the box text means)
Each box prints a compact state summary, designed for fast scanning:
Practical use cases
1) Pinning and range trading context
2) Breakout validation
3) Time your “do nothing” periods
Alerts
Standalone alertconditions are included:
Tuning guidelines
Sensitivity vs quality
Band width
Regime thresholds
Limitations
Disclaimer
A market-structure style “gamma flip” mapper that builds adaptive strike-like zones, scores how price interacts with them, then promotes the strongest candidates into confirmed flip zones. Designed to highlight pinning, failed breaks, and rotational behavior without needing live options chain data.
What this indicator does
This script identifies price levels that behave like “strike magnets” during conditions that resemble options pinning, then draws dynamic zones around those levels.
Instead of assuming every round number matters, it:
- Creates a strike ladder (auto or manual step).
- Applies a regime filter that looks for “pin-friendly” market conditions.
- Tracks and scores repeated interactions with the level.
- Upgrades a zone from candidate to confirmed when enough evidence accumulates.
- Invalidates zones when price achieves sustained acceptance away from them.
The output is a set of shaded boxes (zones) centered on strike-like levels, with text readouts that show the current state of each zone.
Key concept: “Gamma proxy”
A true gamma flip requires options positioning data. This indicator does not use options chain gamma.
Instead, it uses a proxy approach:
- When markets have elevated volatility relative to their recent baseline AND trend strength is weak, price often behaves “sticky” around key levels.
- In those conditions, repeated touches and failed escapes around a level behave similarly to pinning around strikes.
So this tool is best read as:
- “Where would a strike-like magnet likely exist right now, based on price behavior and regime conditions?”
How zones are created
Zones only start forming when the script detects a pin-friendly regime.
1) Strike Ladder (level selection)
- Auto Strike Step selects a step size based on current price magnitude (bigger price, bigger step).
- Manual Strike Step lets you force a fixed increment.
- The current “active level” is the nearest rounded level to price.
- Major Level Every optionally marks major ladder levels (multiples of step).
2) Band construction (zone thickness)
Each zone is a symmetric band around the level, using one of two modes:
- ATR mode scales thickness with volatility.
- Percent mode scales thickness as a fraction of price.
This matters because “pin behavior” is not a single tick. It’s a region where price repeatedly probes and rejects.
Regime filter (when the script is allowed to believe in pinning)
A zone is only eligible to form and strengthen when Pin Regime is active. Pin Regime is a conjunction of:
1) IV proxy (ATR z-score)
- Uses ATR as a volatility proxy.
- Converts ATR% into a z-score relative to a long lookback.
- IV Proxy Threshold controls how elevated volatility must be before the script considers pinning likely.
2) Weak trend requirement
The script also requires price action to be non-trending:
- EMA spread must be small (fast vs slow EMA not diverging strongly).
- ADX must be below a ceiling, confirming weak directional trend strength.
Interpretation:
- High “IV proxy” + weak trend is where pin-like behavior is most common.
- If trend is strong, zones are less meaningful because price is more likely to accept away from levels.
Flip confirmation logic (what upgrades a zone)
A zone is not “confirmed” just because price is near it once. The script builds conviction via evidence accumulation.
Evidence types:
- Touches: price comes close to the level within tolerance.
- Failed escapes: price pushes outside the band but closes back inside (rejection).
- Acceptance run: consecutive closes outside the band, suggesting price is accepting away from the zone.
Protections:
- Touch Cooldown prevents counting the same micro-chop as multiple touches.
- Acceptance Bars defines what “real acceptance” means, so the zone does not get invalidated by one noisy bar.
A zone becomes confirmed when:
- Touches meet the “evidence” requirement.
- Failed escapes meet the “rejection” requirement.
- The regime filter still says the market is pin-friendly.
That is important, it avoids promoting levels that only worked briefly in a trending tape.
Zone scoring and lifecycle
Each zone maintains a score that evolves over time. Think of score as “how much this level has recently behaved like a magnet.”
Score dynamics:
- Decay per bar: score fades over time if price stops respecting the zone.
- + per touch: repeated proximity increases score.
- + per failed escape: rejections add stronger reinforcement.
- - per acceptance bar: sustained trading outside reduces score.
- Min score to draw: prevents clutter from weak, low-confidence zones.
Invalidation:
- If the score becomes very weak AND price achieves sustained acceptance away from the zone, the zone is deleted.
This keeps the chart clean and ensures zones represent current market behavior, not ancient levels.
How to read the plot on chart
1) Zone fill and border
- Each zone is drawn as a box extended to the right.
- Fill opacity adapts to zone strength, strong zones are visually more prominent.
- Border color encodes the current directional context and special events.
2) Bullish vs bearish coloring
- A zone is colored bullish when price is currently trading above the zone’s mid-level.
- A zone is colored bearish when price is currently trading below it.
This is not a trade signal by itself, it is a state cue for “which side is in control around the level.”
3) Failed escape highlighting
- If price attempts to break above the band and fails, the border temporarily highlights as a failed up escape.
- If price attempts to break below the band and fails, the border temporarily highlights as a failed down escape.
These are the moments where pin behavior is most visible:
- Break attempt.
- Immediate rejection.
- Return to the band.
4) Midline (optional)
- The zone midline is the strike-like level itself.
- It is dotted to distinguish it from price structure lines.
5) Optional strike ladder overlay
- When enabled, the script draws major and minor ladder lines near current price.
- Major levels are thicker and less transparent.
This is a visualization aid for “where the algorithm is rounding,” not a prediction tool.
On-chart text readout (what the box text means)
Each box prints a compact state summary, designed for fast scanning:
- Γ CANDIDATE means the zone is being tracked but not yet validated.
- Γ FLIP (PROXY) means the zone has met confirmation requirements.
- BULL/BEAR indicates which side price is on relative to the mid-level.
- L prints the level value.
- T is touch count, repeated proximity events.
- F is fail count, rejected escape attempts.
- IVz is the volatility proxy z-score at the moment.
- ADX is the trend strength context.
Practical use cases
1) Pinning and range trading context
- Confirmed zones often act like gravity wells in sideways or rotational regimes.
- When price repeatedly fails to escape, fading outer edges can be reasonable context for mean reversion workflows.
2) Breakout validation
- If price achieves acceptance outside the band for multiple bars, that is stronger breakout context than a single wick.
- Zones that invalidate cleanly can mark transitions from pinning to directional move.
3) Time your “do nothing” periods
- When Pin Regime is active and a zone is confirmed, the tape often becomes sticky and inefficient for trend chasing.
- This helps avoid taking trend entries into a pin environment.
Alerts
Standalone alertconditions are included:
- Zone Confirmed: a candidate becomes confirmed.
- Zone Touch: price touches an active zone within tolerance.
- Zone Invalidated: the zone loses relevance and is removed.
Tuning guidelines
Sensitivity vs quality
- Lower Touches Needed and Failed Escapes Needed creates more zones faster, but with lower quality.
- Higher values create fewer zones, but the ones that remain are more behaviorally “proven.”
Band width
- ATR mode adapts to volatility and is typically safer across assets.
- Percent mode is consistent visually but can feel too tight in high vol or too wide in low vol if not tuned.
Regime thresholds
- If you want fewer zones, raise IV proxy threshold and tighten weak-trend filters.
- If you want more zones, lower IV proxy threshold and loosen weak-trend filters.
Limitations
- This is a proxy model, not live options gamma.
- In strong trends, pinning assumptions can break, the regime filter is there to reduce that risk, but not eliminate it.
- Auto strike step is designed for typical market ranges, manual step is recommended for niche tick sizes or custom markets.
Disclaimer
- Educational and informational only, not financial advice.
- Not a complete trading system.
- Always validate settings per asset and timeframe.
เอกสารเผยแพร่
Small changesเอกสารเผยแพร่
Name changeสคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
Check out whop.com/signals-suite for Access to Invite Only Scripts!
Or go to backquant.com/
Or go to backquant.com/
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
Check out whop.com/signals-suite for Access to Invite Only Scripts!
Or go to backquant.com/
Or go to backquant.com/
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน