Updated

Options Decision Dashboard CPR, Expected Move & Day Type

2 127
Overview

An index option buyer loses to theta unless the day actually moves. So the first question isn't "which way?" — it's "will this session trend at all, and is implied volatility cheap enough to pay for the ride?"

This dashboard answers that in one panel, before the session gets going:


DAY TYPE — from the Central Pivot Range. Narrow CPR historically precedes trending days; wide CPR precedes rangebound ones.
DIRECTION — from where price sits against the CPR, plus the two-day pivot-range relationship.
THE PRICE OF THE BET — from the volatility index: the expected move it's charging you for.
TIME — days to expiry, and the theta context.


It then states a plain-language verdict — BUY CE / BUY PE / SELL PREMIUM / STAY OUT — with the CPR and floor-pivot levels drawn on price, targets and invalidation marked.

What makes it different

Every CPR script asserts that a narrow CPR means a trending day. None of them check.

This one forward-tests its own core claim. Each session's CPR type is logged at the open, and at the close the day is scored as trending or not (by directional efficiency: how much of the day's range price actually closed away from its open). The panel then reports the trend-day hit rate for narrow-CPR sessions against the unconditional base rate, with a Wilson 95% lower bound.

If narrow CPR carries no edge on your instrument, the dashboard says so — and you should discount its day-type logic accordingly. It is built to be able to tell you it doesn't work.

Why the four layers are ONE tool

An option-buying decision needs all four at once:


Day type without volatility pricing tells you to buy an option that may be too expensive.
Volatility pricing without day type tells you it's cheap without telling you whether it will move.
Either without the levels gives you no entry, target or invalidation.
All three without the calibration is just another confident indicator.


Remove one and the decision isn't decidable.

How it works


CPR — Pivot = (H+L+C)/3 · BC = (H+L)/2 · TC = 2·Pivot − BC, from the prior session. Width is normalised as a % of the pivot and rank-scored against its own recent history, so "narrow" means narrow for this instrument — not a hard-coded point value. (10 points is narrow on NIFTY and wide on a mid-cap.)
Two-day relationship — higher / lower / overlapping / inside / outside value: the classic Pivot-Boss classifications, used as the directional prior.
Expected move — EM = Spot × (IV/100) × √t, shown for the day and to expiry, and drawn as a band. If the session stays inside that band, an option buyer typically loses to theta — which is exactly the trap this tool exists to flag.
Verdict — combines day type, direction, IV percentile and days-to-expiry into one call. Expensive IV can veto a buy; expiry-day theta can veto it too.


How to use it

Read it top-down at the open. Day type tells you whether to buy options at all. Direction tells you which side. Expected move tells you whether the premium is worth it. The verdict is the summary; the levels are your entry, target and invalidation.

Then — before you trust any of it — read the calibration row. If narrow CPR has no proven edge on this symbol, the day-type logic isn't carrying its weight here.

This is decision support. It does not place trades and it is not advice.

Data & scope

Built for NSE:NIFTY / BANKNIFTY index futures on intraday timeframes (5m or 15m is the CPR norm). Needs a volatility index for the expected-move layer (NSE:INDIAVIX by default); without one, that layer switches off cleanly and the rest still works.

Strike step, expiry weekday and volatility symbol are all inputs — so it runs on any index-options market. Set the expiry weekday to match your contract: the exchange has changed the index expiry day before, and this script does not assume, it asks.

On a daily+ chart the panel tells you to switch to intraday rather than showing a confident verdict built on a meaningless CPR.

Non-repainting

Prior-session values are requested as [1] on the daily series, so they're settled before the session opens and never move. The calibration harness logs at the session open and resolves at the session close, on confirmed bars only — a session is graded on the first bar of the next session, from completed data. Intraday readings (price vs level, day-so-far range) update as the session forms; that's a live read, not a repaint.

Concept credits

Central Pivot Range and the two-day pivot-range relationships — Frank Ochoa (Secrets of a Pivot Boss). Floor pivots (R1–R3 / S1–S3) — long-standing public trading-floor practice. Expected move from implied volatility — standard option-pricing arithmetic (Black-Scholes-Merton lineage). Wilson score interval — Edwin B. Wilson. ATR — J. Welles Wilder.

The day-type calibration harness, the expected-move comparison and the verdict engine are the author's own. No third-party Pine code is reused.

Honest limits

The CPR day-type claim is folklore until measured — which is exactly why this script measures it. Calibration figures are in-sample, with no costs, and a proven in-sample edge is not a guarantee out-of-sample. The expected move is a one-standard-deviation estimate under a lognormal assumption; real index returns have fat tails and gaps. The verdict describes conditions — it is not a recommendation — and it says nothing about strike selection, position sizing or risk.

Options carry the risk of TOTAL loss of premium. Nothing here predicts price.

Disclaimer

Research and educational tool only. Not financial advice, not a recommendation, no guarantee of results. Options trading carries a risk of total loss. Test out-of-sample and make your own decisions. The author accepts no liability.
Release Notes
Minor changes on Legends on Chart and bugs
Release Notes
Options Decision Dashboard v1.1 — expected-move alert fix

The expected-move breach alerts called crossover and crossunder behind a guard that varies with session state. Pine short-circuits, so the crossing test was skipped on those bars and the previous-bar comparison it depends on was corrupted — meaning these alerts could misfire or fail to fire at all.

Both crossings are now evaluated on every bar and masked afterwards. CPR, expected-move calculation and day-type classification are unchanged.
Release Notes
v1.1 — Correctness + option-buyer cost model

- Cost model (for an option buyer, the cost IS the premium — which is essentially the priced expected
move): the panel now shows "Move vs priced EM" — on the narrow-CPR sessions it flags as buy
candidates, did the realised move actually beat the priced expected move? Positive (green) = days
moved more than IV charged (buyer-favourable); negative (red) = IV was rich (selling favoured).
Exported as EXP_PremEdge. It is a conservative, direction-agnostic, in-sample read — not a
per-strike P&L.
- Correctness (already applied, now documented): the expected-move breach alerts called
ta.crossover / ta.crossunder from behind a session-state guard that could skip them and corrupt the
previous-bar comparison. They now run every bar and are masked afterwards.
- No change to the CPR engine, expected-move layer, day-type calibration, verdict or levels — everyday
behaviour is identical.

Decision-support tool, in-sample statistics, not investment advice.
Release Notes
This update fixes a real off-by-one, finally enforces the tool's own stated option-buyer rule, halves the data budget, and makes the directional bias read straight off the chart.

• The missing gate — now enforced. The description always said an option buyer should stand aside when "the priced move already exceeds the target." The verdict never actually checked it. It does now: a BUY is withheld when the first structural target (R1 / S1) is CLOSER than the priced expected move — you would be paying for more move than the setup offers to its first target, so it reads "SELL PREMIUM — priced move > target." New toggle "Require the target to cover the priced move (EM)" (default ON; turn OFF for the original day-type-only verdict). Needs a volatility index; with none it has no effect.

• Correctness — expiry-day suppression was off by one. With the default "0 = no suppression", the panel still refused to suggest buying on expiry day. The gate is now strict, so 0 never suppresses and 1 suppresses only the expiry day itself — matching what the input always promised.

• Leaner data budget. The four higher-timeframe requests were merged into two tuple calls (prior-session H/L/C + the CPR-width percentile in one daily request; VIX close + its percentile in another) — half the daily security dispatches, behaviour-identical. Over-allocated drawing and history buffers were trimmed (the deepest bar reference in the whole script is one bar back).

• Expected move, cleaned up. The expiry-horizon expected move is now floored at the one-day move — since the move through expiry contains today's session, "to expiry" can no longer read smaller than "today", removing a near-expiry display artefact.

• Trend-readable visuals. The CPR zone's outline stays orange (its identity), but the FILL now carries direction — green when price is above the CPR, red when below, orange when inside — while its opacity still encodes day type (denser on a trend day). One element, two reads: bias at a glance AND trend-vs-range. The active target pivot (R1 on a bullish day, S1 on a bearish one) brightens to full opacity, so the live target pops without you reading the panel.

• Market-neutral. The volatility-index input now ships BLANK (was NSE:INDIAVIX; it was already guarded, so the expected-move layer switches off cleanly until you set your market's index), and the home-market wording in the header was genericized. Strike step, expiry weekday and volatility symbol remain inputs, so it runs on any index/options market.

Non-repaint discipline (prior-session values requested as [1] on the daily series with lookahead_on; the calibration logs at the open and resolves at the close on confirmed bars), the CPR / floor-pivot / expected-move layers, the forward calibration and every export are otherwise unchanged. No default was changed except the two noted above (the blank volatility symbol and the EM-gate toggle, which is opt-out).

Research and educational tool only. NOT financial advice, NOT a recommendation, and NO guarantee of results. Options trading carries a risk of total loss. Test out-of-sample and make your own decisions.
Release Notes
UPDATE — v2.6 · Upgraded and renamed to "India Options Engine — IV, Premium, Expected Move, CPR & Day-Type"

This publication is upgraded from a CPR / expected-move / day-type dashboard into a single tool that reads BOTH axes an index-option trader needs — the STRUCTURE of the day and the PRICE of volatility — and reconciles them into one decision.

What the original did (kept and preserved):
— Central Pivot Range (daily / weekly, monthly optional), floor pivots R1-3 / S1-3 and Camarilla H3/H4 · L3/L4.
— A CPR width-percentile DAY-TYPE (narrow → trend lean, wide → range lean), ranked against the instrument's own history.
— A two-day CPR relationship (higher / lower / inside value) for directional context.
— The expected-move cone and a BUY CE / BUY PE / SELL PREMIUM / STAY OUT read.

What the upgrade adds:
— A full VOLATILITY axis: implied vol (India VIX with IV rank / percentile), realized vol (Yang-Zhang), and the IV−RV volatility-risk premium standardized to a robust z (RICH / fair / CHEAP).
— Expected-move 1σ / 2σ cones from IV × √(DTE/365) with an auto settlement-weekday engine per index, plus a Black-Scholes ATM model (theoretical straddle, greeks, theta/day, breakevens, terminal probabilities) for context.
— An EM-vs-target GATE: a directional buy is withheld when the priced 1σ move is LARGER than the distance to the first CPR target (R1 / S1) — the exact case where a right-direction option buy still fails to cover the premium.
— A rich-IV veto: when IV is dear, a BUY verdict is downgraded rather than paying up for the move.
— Two independent, on-chart forward tests, each with a Wilson lower bound and a base-rate comparison: (1) whether the "narrow CPR → trend day" claim has actually held on THIS instrument, and (2) whether selling rich premium has paid here (in-sample + out-of-sample, Net-R after cost), with a TAIL-RISK GUARD that disables the "edge confirmed" state when IV is in the top percentile or realized vol spikes.
— Optional real-tape reads (weekly ATM straddle IV proxy, volume PCR, pin, skew, term structure), optional manual OI walls / max-pain, an EXP_ export bus for linking to a master engine, a vol-environment chart tint, and auto-visuals that show only scale-appropriate levels near price.

The dashboard now leads with ONE headline decision (tail-guarded) plus a "why" line that cites both axes. Compact remains the default; switch Dashboard detail to Pro for the full stack.

Non-repaint by construction: IV, realized vol, the premium, the CPR / pivot levels and the calibration are built from confirmed daily / weekly / monthly values via request.security with lookahead off; the live bar is provisional.

Research and education only. Not financial advice, not a signal service, and not an option-trade or strike recommendation. Volatility selling carries severe, open-ended tail risk.
Release Notes
v2.7 — Two additive ml_india layers: an option-buyer risk guard and a spot-futures basis read. The IV / RV / VRP / expected-move / CPR / calibration engine and the buyer-decision verdict are unchanged, and the full v2.6 EXP_ bus is preserved.

1. Option-buyer risk guard (group 09c, default on) The buyer layer already tells you whether to buy CE / PE / sell premium / stay out. This adds the missing question — if you are buying, how safe is it to act right now? — by reading the specific ways a long option position bleeds:

Gap-shock IV crush — today's open gapped by a large fraction of the priced 1σ move, so much of the move may already be spent and the IV you'd pay for is about to deflate.
False-momentum trap — a directional-looking push on a range-type day, where the breakout tends to fail back into the range.
Theta into expiry — at/near expiry, decay accelerates and exit liquidity thins.

It reports a safe-to-buy gate (optionBuyOk) and a 0–1 quality multiplier that down-weights a BUY under adverse conditions. Crucially, it never changes the buyer verdict — it only annotates a BUY with how safe it is to act on. New "Buy safety" (Compact) and "Buy-safety guard" (Pro) dashboard rows, three exports (EXP_OptionBuyOk / EXP_OptionQuality / EXP_GapShock), and caution / clean-BUY-CE / clean-BUY-PE alerts.

2. Spot-futures basis (group 11, default on) The futures premium/discount the VIX/IV reads don't capture: (futures − spot) / spot, annualized by days-to-expiry, with a self-calibrating premium/discount regime (rich premium = risk-on carry; discount/backwardation = risk-off). Exposed as EXP_Basis / EXP_BasisAnn / EXP_BasisState and two alerts. It adds a single request.security for the cash index; the rest of the engine is untouched.

What is unchanged. The implied-vol source and fallback, Yang-Zhang realized vol, the robust-z volatility-risk premium, the expected-move cones and DTE engine, the Black-Scholes ATM model, the environment classifier, the Wilson-bounded honesty-stack forward calibration with its tail guard, the real-tape ATM ladder / skew / term structure, the CPR reference and the entire buyer-decision verdict are all byte-for-byte v2.6. Every EXP_ export a downstream engine actually consumes is retained; only 8 unused diagnostic exports were retired to make room under the 64-plot ceiling (see the compatibility note above), and the two new layers add six exports.

Still research/education only — NOT financial advice, NOT a signal service, and NOT an option-trade or strike recommendation. Volatility selling carries severe, open-ended tail risk; buying options bleeds theta. Non-repainting: IV, RV, the premium, CPR and the calibration are built from confirmed daily/weekly values with lookahead off. Concept credits unchanged (Whaley; Parkinson/Garman-Klass/Yang-Zhang; Black-Scholes/Merton; Bakshi-Kapadia-Madan & Carr-Wu; Bollerslev; López de Prado; Wilson).

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.