PRIMAEGISresearch
Indicators

Pine tooling & screener playbook.

Release notes for the TradingView indicators and the screening playbook that feeds the desk routines.

◆ Flagship · IN Analytics Pro 3
The composite engine →

Eleven technical sub-models weighted by market regime, layered with fundamental quality, a four-method fair value, and the macro backdrop — resolved into one score, four entry classes and a self-graded track record.

11 sub-modelsRegime-weightedPiotroski & Beneish4-method fair valueCampaign modeSelf-backtestDisplay masters (3.4)V++ bridge auto-fallback
Open the full site →
Access
Run these on your own charts

The composite engine and Valuations ++ are invite-only on TradingView. A handful of the smaller tools are published openly and need no invite.

Valuations ++
Fair value as a range →

Percentile bands rather than a single point, weights derived from each multiple’s own consistency, a stationarity gate that drops a multiple once its history stops being predictive — and, since v6.5, the scenario board’s filed-guidance levels and pace bar drawn on the chart with their source tier stated.

Field guide
Reading the indicators →

What each instrument measures, the order they are meant to be read in, and how to reconcile them when two point in opposite directions.

2 Aug
2026
02_valuations β€” Indicator

πŸ’° Valuations ++ v6.5 β€” Scenario Tiers (filed guidance on the chart)

_Built 02-Aug-2026. The website's own scenario levels reach the chart. The scenario table now states its source; covered names draw the filed-guidance levels and the guided-vs-filed pace bar in-pane. The data travels as a Pine library (umsibaba/PrimaegisScenarios/1) because Pine cannot fetch a URL β€” no HTTP in v5 or v6, and request.seed() reads only TradingView-onboarded repos._

πŸ›οΈ The tier system β€” stated, never silently substituted

TierSourceCostWhen
T1PrimaegisScenarios library β€” bear/base/bull from filed-transcript growth Γ— the company's own long-run exit band, delivery-calibrated haircuts. 192 NSE names, dated snapshot.zero request.*symbol covered
T2Street target low/avg/high via syminfo.target_price_* built-inszero request.*targets exist β€” thin on NSE mid-caps (screener-verified ~half of a 40-name sample, often 1 analyst), so the estimate count always shows
T3The V++ engine, unchangedas beforealways

The scenario-table header reads SCENARIOS πŸ“ / T1 Β· filed guidance Β· πŸ“Έ 2026-08-02 (or T2/T3). Request budget untouched: 37/40.

✨ What draws on a covered name

  • πŸ›οΈ Filed row in the scenario table β€” bear/base/bull at their target FY (cells self-label; tooltip says they do NOT belong to the 1/2/3-year grid), exit multiple, guided %/yr, composite score, PS.disclaimer().
  • 🎯 Street row β€” target low/avg/high + estimate count (6 est on MTAR, matching the screener).
  • Three level lines in the pane, house Levels-Style machinery, labels like πŸ›οΈ BASE 6562.31 Β· FY27 Β· 87.2x (+14.6%), x-offsets +25/+31/+37 continuing the stagger.
  • Pace gauge (own position input, default Bottom Center): 26-cell track spanning 0–130% of the guided rate so 100% lands at 77% of width; band colours; spectrum fill over 105% (over-delivery should look rare); 55% opacity while provisional; pace() na β‡’ nothing drawn. Caption carries guided β†’ filed (nq) Β· band Β· πŸ“Έ build date.
  • Validated on-chart 02-Aug: MTARTECH (T1, spectrum pace 80β†’129.9), KRISHANA (T3 stated, nothing fabricated).

πŸ–₯️ Display masters β€” the two-monitor workflow

New πŸ–₯️ Display group: Valuation level lines + labels, All tables, and Band plots, zones & extras as three independent master switches, plus a dedicated Under/overvalued shaded zones toggle. One pane fully dressed, the other stripped to the dashed level lines alone β€” the level lines are now independent of "Show Fair Value Bands". And because the level lines/labels are line.new/label.new drawings β€” which never surface in the Style tab β€” their appearance controls now live in πŸ“ Levels Style: per-level colour pickers (Low/Fair/High/EV1Y + the three πŸ›οΈ levels) and a Pointer / Plain text / None label-appearance selector. The zone fills keep their Style-tab entries (bottom of the list) and gain the input toggle.

πŸ› CE10295 on first compile

v6.4 was already near the main-body ceiling; the additions tipped it. Fix per the IN Analytics pattern (expression weight, not line count): f_scn_tier_rows(), f_fv_levels() (existing block), f_ps_levels(), f_pace_gauge() β€” functions get their own scope budget; guards inside, vars localized, no history offsets so the conditional-call trap does not apply.

πŸ“š The library itself

scripts/pine_scenarios.py generator fixes: switch cases must be single-line ("SYM" => … β€” the two-line form hits CE10001/CE10156, continuation may not sit at a multiple of 4), and get()/pace() now return the switch directly β€” the old Scenario s = na + bare switch discarded every branch and returned na for everything. Disclaimer emitted on one line (same continuation rule).

Refresh flow: make valuation β†’ python3 scripts/pine_scenarios.py β†’ paste-publish a new library version β†’ bump the import umsibaba/PrimaegisScenarios/N line in V++ and republish. The import pin means a library republish alone does NOT move the chart.

/2 (02-Aug afternoon): 197 levels + 71 paces. Two structural fixes: (1) pace decoupled from publishable β€” the guided-vs-filed comparison never touches the earnings base, so names whose levels are withheld (low-confidence bridge, stale base) still carry their pace card; (2) eps_history column-filter fix β€” a "Mar 2018 3m" stub or legacy Dec fiscal years no longer disqualify a whole annual table (KPIT was rejected over one stub label), which freshened 8 bases and promoted 5 names to full levels (SANOFI, SHREDIGCEM, SPLPETRO, SUPREMEIND, IRISDOREME). Names still on a December year-end (CRISIL) or under 4 clean March years (ACC, Ambuja post-migration) stay out honestly. The scenario board at primaegis.com shows the same 197.

---

πŸ’° Valuations ++ v6.4 β€” Evidence Scalers

_Built 01-Aug-2026, answering "won't track-record dampening miss turnarounds?" All four additions are realized-data; nothing price-derived ever touches the growth forecast._

✨ The guidance weight now sees the tape

ScalerTriggerEffect
CongruenceGuided growth at/below the realized run-rate (ratio = realized Γ· guided)Up to 2.2Γ— weight β€” a guide the tape already corroborates is trend extrapolation, not a cold promise. Guides far above the run-rate keep full backtested skepticism.
EPS-inflection reinforcementDelivered earnings accelerating (Q-Ξ” > +10pp) / deceleratingΓ—1.25 / Γ—0.85 on the congruence case only
Beat-record proxy credibilityGuided-pair ledger empty AND β‰₯3 tracked quarters vs streetBeat multiplier stands in for "unknown" credibility, capped 1.15; the real ledger takes over as pairs form
PE-ROC stationarity trust\6M re-rating\beyond Β±30% (blended mode)Cuts the PE method's vote up to βˆ’50% β€” price evidence reduces trust in stale multiple history; it never feeds the forecast. Other legs renormalise.

Combined evidence scaler capped at 2.5Γ—; the 0.45 guidance-weight cap still rules everything. Disclosure: the Fwd/source tooltip prints evidence Γ—2.03: congr 1.52 Β· infl 1.25 Β· beat-proxy 1.07; the weights tag adds [PE trust 74%]. MTAR walk-through: 8% β†’ ~17% blend weight (guided +143% vs realized TTM +125%, accelerating, 75% beat record) β€” the band's forward EPS moves from βˆ’3% to ~+11% growth, and the verdict still reads its own evidence.

πŸ› Fixes

  • Auto classifier unit bug: EARNINGS_PER_SHARE_BASIC_ONE_YEAR_GROWTH returns PERCENT but the class thresholds are ratios β€” ">0.40" read as ">0.4%", so essentially every profitable grower typed Hyper Growth since the Auto port. Normalised; thresholds now mean what they say. Auto/Blended-mode weights will visibly change on mis-typed names.
  • Earnings Quality row was misread by design: it showed FCF Γ· NI alone. MTAR: FCF/NI 0.09Γ— with CFO/NI ~2.0Γ— (screener-verified: FY26 CFO β‚Ή192cr vs PAT β‚Ή95cr) β€” a capacity build-out eating cash, NOT poor accrual quality. The row now shows both: 🟒 CFO 1.42x Β· FCF 0.09x, colored by CFO/NI (the accrual-quality verdict), with FCF/NI as capex context. One new request.financial (36 of 40).

---

πŸ’° Valuations ++ v6.2 β†’ v6.3 β€” AT A GLANCE (final, 01-Aug-2026)

_The finished shape of the release, consolidated. Detail in the entries below._

  • The guidance layer β€” management guidance from 850+ NSE earnings-call transcripts (mainboard + Emerge SME) built into the indicator: what was guided, what was delivered, a credibility score per management. Ships as two private Pine libraries (PrimaegisGuidance /6, PrimaegisGuidanceText /2).
  • Guidance in the FAIR-VALUE BANDS (default ON) β€” where usable guidance exists, the PE leg's forward EPS and the PS leg's revenue re-base on the evidence-weighted analystβŠ•guidance blend (backtested identity weight Γ— credibility Γ— call-date freshness, cap 0.45). Basis disclosed on the band tooltip, the 🎯 Fair label, and the estimates EPS row. Toggle OFF / no guidance / TTM-anchor = exact v5.2 basis.
  • Scenario engine β€” blend shifts the base case, disagreement widens the cone (capped +20pp), the bull leg extends toward credible aggressive guides.
  • Data-quality wave β€” forward-gate calendar-drift fix (results recaps can no longer wear the guidance label), revision supersession ("raising from 50% to 80%" reads 80), score-gated acceptance of large-but-explicit arithmetic, call-date age policy. 641 names usable at full fidelity.
  • πŸ”— Bridge export for IN Analytics β€” the composite fair value publishes as πŸ”— Fair Value (bridge export). In IN Analytics: Fundamental Factors β†’ External fair value (point at Valuations++) β†’ pick the πŸ”— Fair Value (bridge export) plot of Valuations ++ β†’ tick "Use external fair value". Manual, per chart layout β€” TradingView cannot auto-wire source inputs. Point at the πŸ”— plot, not 🎯.
  • v6.3: Valuation Preset β†’ Auto (Blended) (new default, published 01-Aug) β€” no manual judgment: the company-type classifier and the industry map are blended by classification confidence (how decisively the company's own data types it away from its sector, scaled by history depth; Lender/Loss-making are definitional), then the empirical CV weights fade in continuously with sample depth β€” up to 65% say at deep history. Disclosed live: Profile cell reads Hyper GrowthβŠ•Aerospace Ξ±78, weights tag reads [CV 43%]. Legacy presets (Industry Default, Auto (Company Type), the four fixed profiles) are byte-identical for saved charts.

---

πŸ’° Valuations ++ v6.2 (second wave) β€” Data-Quality Release (libraries /6 + Text/2)

_Shipped 01-Aug-2026, hours after the first v6.2 wave β€” the TradingView build keeps the single label v6.2, which covers both waves._ _Originally drafted as "v6.3"; consolidated per the published version. Started as "is 0.5 weight for last-FY guidance right?" and ended as a pollution cleanup: the forward gate had calendar drift._

πŸ› The forward-gate leak

\bFY2[6-9]\b was a FUTURE marker β€” written when FY26 was the future. Once FY26 closed, every "During FY26, EBITDA margin stood at 9.52% as compared to…" results recap auto-passed the guidance gate on its year token; "as compared to / against / registering / ended" weren't past markers at all. 83 delivered numbers were wearing the guidance label. Fixed: year tokens only count as forward evidence when STRICTLY ahead of the build date's FY (threaded through the extractors); the missing past markers added. Regression vs shipped: 665 names byte-identical, 22 recap-polluted names correctly dropped, 18 re-sourced to cleaner forward passages, 3 gained. All validation anchors held (MTAR +143%, INOXWIND +119%, TVS +10%, J&K +20.6% β€” J&K's period self-corrected FY26β†’FY27 with the cleaner passage selection).

βš–οΈ Age policy rebuilt (the original question β€” both instincts were right)

The old Pine-side buckets keyed age off the GUIDED YEAR: last-FY 0.50, no-year 0.70. Measured reality: 195 of 234 "last-FY" names were recent calls whose FY26 tag came from recap context, and undated guidance in a fresh call is forward-looking by construction. New policy, computed at library build time from the CALL DATE and folded into gd.weight:

  • Freshness: ≀200d β†’ 1.00 Β· ≀400d β†’ 0.75 Β· ≀730d β†’ 0.40 Β· older β†’ 0.
  • Period validity: guided FY current/forward β†’ Γ—1.0 Β· just-closed FY β†’ Γ—0.75 (rates persist; timelines slip β€” was 0.50) Β· closed 2+ FYs β†’ 0.
  • No fiscal year stated β†’ no penalty (was a flat 0.70); freshness alone governs.
  • Pine keeps only the terminal kill (guided year closed 2+ FYs at chart time), so a stale library degrades safely. Priors on the right variables β€” calibrate against realisation pairs at the quarterly refresh.

Net: 641 names usable at full fidelity, 45 age-zeroed at build. Undated-fresh names (e.g. TVSMOTOR) gained ~43% effective weight; genuinely stale statements lost.

πŸ“Ž For the quarterly refresh

Ordinary-sized numbers from weak passages (analyst-echo, hedged asides) still enter at low identity weight by the deliberate "rank, don't discard" design β€” consider score-weighting confidence once realisation pairs deepen (GPTHEALTH/BLS class).

---

πŸ’° Valuations ++ v6.2 β€” Guidance in the Bands

_Published 01-Aug-2026 (update to the private invite-only script). The fair-value band itself now runs on the guidance blend β€” not just the scenario engine._

⚠️ Behavior change

ChangeOldNewWhy it matters
Band forward EPS (PE leg)Analyst FY estimate (eps_estimate_fy), guidance never touched itWhere usable guidance exists: forward EPS re-based on the analystβŠ•guidance blend via the same identity the YoY calc uses (`est = ttm + \ttm\Β·g`), same weight chain as scenarios (backtested identity weight Γ— credibility Γ— age, cap 0.45). At weightβ†’0 the tilted figure equals the analyst estimate to the paisa.Covered names' low/median/high fair levels move by the disclosed guidance delta. SMEs with guidance but no analyst coverage get a real forward EPS in the band instead of trailing.
Band sales driver (PS leg)Trailing revenue per share, alwaysForward revenue per share (analyst sales growth βŠ• guided growth) β€” ONLY when guidance is usable; uncovered names keep the trailing basisPS-weighted covered names re-band on what management says the top line will do.
PB / EV legsEvidence-anchoredUnchanged β€” no clean guided BVPS/EBITDA identity; lenders still get guidance in scenarios via the ROA bridgeThe tilt never reaches a leg it can't ground in an accounting identity.
Band growth clampingn/ag_compress() softening only β€” NOT the industry corridor (that guards multi-year compounding; the band is a 1-year basis)An accepted analyst number is never suddenly corridor-clipped just because guidance showed up.

βš™οΈ New input

Guidance in fair-value bands (v6.2) β€” πŸ”­ Scenario Panel group, default ON. OFF, no-usable-guidance, or Anchor bands to TTM EPS (an explicit trailing choice outranks the tilt) all reproduce the v5.2 basis exactly.

πŸ› Data-engine fixes shipped with v6.2 (library β†’ /5)

  • Revision supersession (the MTAR bug): "raising our guidance for FY'27 from 50% revenue growth to 80% plus" parsed as +50% β€” the SUPERSEDED number β€” because first-mention-wins stored the FROM figure. The extractor now rewrites from-X%-to-Y% idioms to the TO figure, gated on a revision-verb + guidance-noun cue so historical "NIM expanded from 5.6% to 9.4%" statements and "maintain a margin from 4.5% to 5%" ranges can't trigger it. MTAR FY27 now reads rev +80%.
  • Score-gated oversize acceptance: the flat Β±100% implausibility cap threw away explicit guidance whose arithmetic is simply large β€” MTAR's 80% revenue Γ— 24% EBITDA margin off a 17.8% base IS +143%. The gate now accepts results up to Β±250% when the bridge is one of the two fully-explicit identities (PAT guided directly; revenue Γ— margin) AND every input's passage is strongly management-voiced (min score β‰₯ 6). Analyst-voiced numbers (TARSONS +135%, score 2) and weakly-attributed legs (ICEMAKE margin, score 0) stay gated; the unattributed path, which has no attribution, keeps the strict cap. Regression: exactly 2 of 1,353 names changed (MTARTECH +143% @ 0.08 weight, INOXWIND +119%), zero lost.

πŸ”Ž Disclosure (three places)

Band-column tooltip gains Basis: … (tilted @weight, EPS fwd %, Sales fwd % β€” or which fallback applied) Β· the 🎯 Fair level label carries the same on hover Β· estimates EPS-row tooltip gains a Bands: line. Internals: the analystβŠ•guidance blend block was hoisted above FAIR VALUES so the bands can consume it; scenario semantics unchanged.

---

πŸ’° Valuations ++ v6 β€” The Guidance Layer

_Published 31-Jul-2026 (invite-only, private). The first release where the panel knows what management PROMISED β€” not just what the price and the analysts did. Ships with two companion Pine libraries: PrimaegisGuidance v4 (data + accessors) and PrimaegisGuidanceText v1 (full statements), both private publications under umsibaba. Imports: /4 + Text/1._

⚠️ Behavior changes (read before trusting old readings)

ChangeOldNewWhy it matters
Scenario base growth (PE leg)Single analyst fwd-EPS number; hardcoded 10% when no coverageEvidence-weighted blend of analyst consensus and management guidance. Weight = backtested per-identity figure (0.08–0.45) Γ— credibility Γ— age; guidance-only when no analyst existsCovered names' base cases shift by the disclosed blend. SMEs with zero coverage now run on management's stated number instead of a placeholder constant.
Driver legs (PS/EV sales anchor, PB retentionΓ—ROE)Realised-data anchors only β€” guidance never reached themGuidance blended in at min(cap, w_raw) β€” never the guidance-only branch, since the realised anchor always existsPS/PB/EV-primary covered names move. Names whose driver source already saturates the sector corridor show no change (J&K: base pinned at the 30% bank ceiling pre- and post-blend).
Scenario spreadVol/sector derived+ up to 20pp widening when guided and analyst growth materially disagreeA 42.6pp guided-vs-street gap (J&K) now widens the cone to the 70% max instead of being averaged away. Disagreement IS the information.
Bull legCorridor-capped symmetric spreadExtends toward the guided rate (sanity cap +100%), proportional to weight β€” driver-awareBacktested: a >45% guide doubles the odds of a >45% outcome (34% vs 16% base rate). AKIKO bull 1Y +1.4% β†’ +56%, exact to the extension formula.
Reliability multiplierbeat_rate_mult aloneGeometric mean of beat_rate_mult and the credibility multiplier; credibility alone when there is no estimate coverageTwo reads on one question ("is this management reliable?") no longer double-count; uncovered names get a real signal instead of a hardcoded 1.0.
Guidance fiscal-year handlingn/a"FY 25-'26" spans read as FY26; multi-year passages take the forward year; closed years age out of the blend (1.0 / 0.5 / 0.0)Stale guidance decays instead of masquerading as current.

πŸ› Fixes (during the v6 rollout)

  • Library accessor off-by-one (v1/v2 of the data library): seek() strips the leading key but accessors read 1-based slots β€” direction returned the management code, credibility returned the EPS figure, weight read past the record. The blend silently never fired; a misread credibility (0.205) crushed J&K's reliability multiplier to 0.49Γ—. Caught from chart screenshots, not compile checks. Fixed in /3; accessors are now simulated against the generated blob before any publish.
  • pbcopy mojibake: clipboard transfers under the C locale corrupted every emoji and unicode dash β€” and cmp <(pbpaste) file cannot detect it (symmetric mis-decoding). All staging now uses LC_ALL=en_US.UTF-8 + independent osascript verification.
  • Pine compiler ceilings (library side): reserved text export name; 40,960-char string-value cap; global-array ban in exported functions; const-string inlining vs the function-body cap; the 100,256 compiled-token cap (data β‰ˆ 1 token/byte β†’ ~95KB max per library); continuation lines indented by multiples of 4. Final ABI: 8 padded part() exports + parameter-based accessors, record chain in the consumer.

✨ New features

🎯 Guidance row (estimates table) β€” direction vs previous call Β· fiscal year Β· management credibility label Β· bridged EPS growth. Hover: management's full statement (564 highest-weight names via the Text library; compact digest fallback), the bridge, the scenario blend actually applied, disagreement warnings, and the source class. Β· Inputs: Guidance Row (v6) (default ON).

Evidence tooltips everywhere β€” credibility cell shows n observations, median realisation so a 2-observation label can't masquerade as a 5-observation one; EPS row shows guided-vs-consensus with the gap in pp; insights Fwd-Growth row and the scenario header disclose the exact blend (blend 23% guidance / 77% analyst) and any driver-leg blending.

⚠/❗ conflict flags β€” an upgrade from a "Hype man" management, or a downgrade from an "Overdelivers"/"Consistent" one, is flagged on the row. The combination a chart cannot otherwise show.

βš™οΈ Changed defaults

InputOldNew
Label size (πŸ“ Levels Style)AutoNormal
Line thickness (πŸ“ Levels Style)12
Blend management guidance into growth (v6)n/aON
Max guidance weight vs analyst estn/a0.45 (backtest cap β€” median bridged error ~20pp)
Widen scenario cone when guidance and street disagreen/aON

πŸ§ͺ Validation (performed 31-Jul-2026, on-chart)

SymbolCheckResult
TVSMOTORblend 13% = 0.19 Γ— 1.0 cred Γ— 0.7 undated-age; base +3.5% β†’ +8.5%βœ… exact
AKIKObull ext: 0.05 + 0.95 Γ— (0.24/0.45) = +56% printedβœ… exact
J&K BANKblend 23% = 0.40 Γ— 1.15 Γ— 0.5 (FY26); cone 50β†’70% on 42.6pp gap; targets unchanged = corridor saturation, verified via scn tooltipβœ…
CESCno coverage β€” bit-identical to v5.x behaviourβœ… control

Known nits (queued for the quarterly guidance-refresh): scn_tip prints "cone +0%" where the spread math proves +20 (render truncation suspected); AKIKO base pinned at the corridor floor via stale roe_used on freshly-listed names.

πŸ“‹ Data provenance & refresh

Guidance layer: 854 companies (684 NSE mainboard + 170 Emerge SME), built exclusively from earnings-call transcripts filed with NSE under SEBI LODR. 705 carry a bridged EPS growth; weights fitted on 713 closed-fiscal-year observations; credibility labels earned from guided-vs-delivered history across ≀4 consecutive calls. Refresh cadence: each results season via the guidance-refresh repo skill (sweep β†’ extract β†’ RE-FIT β†’ regenerate β†’ republish both libraries β†’ bump imports).

---

πŸ’° Valuations ++ v5.3 β€” Valuations ++ Dev

_A correctness release: no-analyst-coverage names stop being punished, the EV leg stops being stale, the fair-value bands stop collapsing into one line, and the level lines/labels are finally yours to style._

⚠️ Behavior changes (read before trusting old readings)

ChangeOldNewWhy it matters
Fair-value band samplingExtreme multiples were dropped by hard cutoffs (PE < 500 etc.), so bands froze at the cutoffSamples are winsorized in, clamped to an expandable envelope (rolling 1st/99th percentile Γ·/Γ— 1.25); only 10Γ— sanity ceilings drop data (PE 5000, PS 1000, PB 500, EV 1000)Low/Med/High bands, z-scores and CV weights move on high-multiple and crash-history names. Bands now widen with a genuine re-rating instead of freezing. Min/Max band mode shifts most.
EV/EBITDA history legQuarterly-stepped from reported FQ enterprise valueMarked daily as close Γ— shares out + net debtEV's variability was structurally understated, so the inverse-CV blend systematically overweighted the stalest leg. hist-EV bands, the EV fair-value leg and the composite bands all shift as the new history accumulates.
Displayed EV/EBITDA, its z-score and EV exit multiplesReported FQ enterprise valueSame live-price construction as the history legThe printed ratio jumps versus the old quarterly-step reading on any symbol with a stale FQ EV.
Beat/miss tracking with zero analyst coverageCounted as a miss every quarter β†’ ~30% growth haircut, βˆ’10 momentum points, red Track Record cellsNeutral: 1.0Γ— growth multiplier, 0 beat bonus, βšͺ icons, neutral cellUncovered names (most NSE SMEs) had their scenario targets, momentum and composite score dragged down for having no data. Those readings rise.
Interest-coverage quality pointReported-zero interest (debt-free, the best case) scored 0/2, while missing interest scored 2/2Zero interest scores 2.0; interest present with missing EBITDA is treated as missing (neutral)Debt-free companies gain quality score; the inversion is gone.
Quality score with missing inputsMissing ROE/D-E/Current-Ratio/FCF/OpMargin = 0/2 penalty, working capital = 1/2, interest = 2/2 bonusEvery missing factor reads neutral and is excluded; the score is renormalised over the factors actually presentQuality β€” and the composite score and scenario probabilities built on it β€” moves toward neutral for sparsely covered names instead of arbitrary.
Scenario growth driversPS, PB and EV legs all grew on EPS-derived growthPS and EV grow on sales growth (EV grows EBITDA sales-linked); PB grows on sustainable growth = ROE Γ— (1 βˆ’ payout)Scenario price targets shift for any symbol whose primary multiple is PS, PB or EV. Margin-expansion stories come down; high-retention compounders' PB targets move. PE-primary symbols are unchanged.
Quality ROE sourceFY ROEFQ ROE β†’ FY ROE β†’ computed NI(TTM) / total equity (FQ)Quality moves wherever the fresh quarterly ROE differs from the annual figure.

πŸ› Fixes

  • Fair-value bands collapsed to a single line on any re-rated stock. The new winsorizer was a one-way ratchet β€” it could only shrink the sample range, never extend it β€” so a 5-year window degenerated toward a constant and Low = Fair = High. Fixed with an expandable envelope; a simulated 18β†’55 PE re-rating goes from 0.0% band width back to the correct ~57%.
  • The band labels looked "missing". They were never dropped from the code β€” all three sat at the same price and the same bar and rendered as one. The label x-offsets are now staggered so co-located levels can't stack.
  • A collapsed band leg hijacked the blend. Because its variability read as ~zero, the inverse-CV weighting handed the degenerate leg near-total weight and dragged the composite with it. Fixed by the same envelope change.
  • Zero analyst coverage was scored as "missed every quarter". Tracked quarters were counted from actuals alone while beats required an estimate, so the numerator and denominator disagreed. Both now require an actual and a standing estimate.
  • Debt-free companies were penalised for having no interest expense β€” reported-zero interest scored worse than missing data.
  • The EV leg was the stalest input yet carried the most weight, because a quarterly plateau looks less variable than a daily-marked series.
  • Missing quality inputs were scored inconsistently β€” some as a zero penalty, one as a full bonus.
  • Track Record showed red for quarters that simply had no estimate β€” those now show βšͺ.
  • The legacy quality row failed debt-free names on the same interest-coverage test.

✨ New features

Anchor bands to TTM EPS β€” puts the PE fair-value bands on a consistent trailingΓ—trailing basis (trailing-PE percentiles Γ— trailing EPS) instead of the default forward tilt, which biases bands high for growers. Falls back to the forward basis if TTM EPS is unusable. Graham number and reverse-DCF are unaffected. Β· Inputs: Anchor bands to TTM EPS (default OFF, 🎨 Valuation Bands) Β· What you'll see: the main-table PE fair-value tooltip names the basis in use.

πŸ“ Levels Style β€” one uniform style, width and label size for all four level lines (Low, Fair, High, EV 1Y). Β· Inputs: Label size (default Auto β€” Fair normal, minors small), Line style (default Dashed), Line thickness (default 1, range 1–4) Β· What you'll see: the four dashed level lines redraw at the chosen style/width immediately; picking an explicit label size forces it on all four labels.

Compact bands β€” hides the minor overlays when the band area gets crowded: the MoS βˆ’10/βˆ’20/βˆ’30 ladder, the Norm-PE fair-value plot, the dotted Low/High lines and labels, and the EV 1Y line and label. Band plots, zone fills and the Fair line + label stay. Β· Inputs: Compact bands (default OFF, 🎨 Valuation Bands) Β· What you'll see: the overlay drops to the Fair line plus the shaded bands.

Partial-history badge β€” warns when the band percentiles were computed from fewer bars than the lookback asks for (the intraday 20k-bar cap can cut ~1260 samples to ~80 without any prior warning). Β· What you'll see: a ⚠️ with an "n/N samples" tooltip on the main-table Bands header, and a matching lowest-priority warning row in the scenario table.

"No est. coverage" badge β€” the Track Record cell now says so explicitly instead of showing a red 0% beat rate. Β· What you'll see: neutral background, " (no est. coverage)" text, and a tooltip explaining that βšͺ marks an uncovered quarter.

Driver-aware scenario tooltips β€” bear/base/bull tooltips now report the effective growth rate actually applied to the selected primary multiple, and name the driver behind it (EPS, sales, or ROE Γ— retention).

Fresher quality inputs β€” quarterly ROE and total equity are now requested, so the quality ROE factor and the new BVPS growth driver no longer run on annual data.

βš™οΈ Changed defaults

InputOldNewEffect
Line thickness (πŸ“ Levels Style)not an input β€” all four level lines hard-coded to width 21Thinner level lines. Set to 2 to restore the old weight.
Line style (πŸ“ Levels Style)not an input β€” hard-coded dashedDashedNo visual change at the default; now switchable to Dotted or Solid.
Label size (πŸ“ Levels Style)all four labels rendered at normal sizeAutoFair stays normal; Low, High and EV 1Y labels shrink to small so the staggered row reads cleanly.
Anchor bands to TTM EPSn/a (new)OFFThe existing forward-EPS band basis is preserved exactly until you turn it on.
Compact bandsn/a (new)OFFAll overlay lines keep drawing as before.

Existing chart instances keep whatever values you already saved β€” the new defaults only apply when you add a fresh copy of the indicator or reset settings to defaults.

πŸ§ͺ Test plan (before publishing)

  1. Bands must be three separate lines on a re-rated stock. Pick a name whose multiple has trended one way across the 5-year lookback (confirm it on the chart's own PE history before using it as the test case). Pass: the Low, Fair and High dashed lines sit at visibly different prices, the zone fills have real height, and the main-table Low/Fair/High figures differ. Fail: any two of the three print the same number β€” that is the ratchet regression.
  2. Range-bound control. Repeat on a symbol whose multiple has oscillated in a band. Pass: band width is essentially unchanged from the previous build (this case was never affected by the bug, so a large move here means something else shifted).
  3. Labels visible and staggered. Pass: four distinct labels β€” Fair, Low, High, EV 1Y β€” at increasing horizontal offsets (+1, +7, +13, +19 bars), each showing its name, price and signed % versus price. Fail: fewer than four labels, or two overlapping.
  4. πŸ“ Levels Style, one control at a time. Set Line thickness 1 β†’ 4: pass if all four lines visibly thicken. Set Line style Dashed β†’ Dotted β†’ Solid: pass if all four change together (the style is uniform by design β€” Fair should not stay solid while the others go dotted). Set Label size Auto β†’ Large β†’ Tiny: pass if all four labels resize, including Fair.
  5. Compact bands. Tick it. Pass: the MoS ladder, Norm-PE plot, Low/High lines + labels and the EV 1Y line + label disappear while the shaded bands and the Fair line + label remain. Untick and confirm everything returns.
  6. Zero-coverage name reads neutral. Load an NSE SME or any recently listed name with no analyst estimates. Pass: Track Record shows βšͺ icons and the "(no est. coverage)" text on a neutral background β€” not red; the scenario table shows no beat-history growth haircut and momentum carries no βˆ’10 beat penalty. Fail: a 0% beat rate on a red background.
  7. EV band behaviour after daily marking. On a symbol with a visibly stale reported enterprise value, note the displayed EV/EBITDA and its z-score, then re-check after a day with a meaningful price move. Pass: the printed EV/EBITDA moves with price rather than sitting flat until the next quarterly report; the EV fair-value leg and its weight in the Bands tooltip are populated. Pass (degradation): on a symbol with no net-debt data the EV leg simply drops out of the blend rather than producing debt-blind bands.
  8. Partial-history badge fires where it should. Load the indicator on an intraday timeframe where the 20k-bar cap bites. Pass: the ⚠️ appears on the Bands header with an "n/N samples" tooltip, and the scenario table carries the matching warning row (it should yield to stale/trough/poor-beat warnings when those apply).
  9. TTM anchor toggle. On a high-growth name, note the PE fair-value figures, then tick Anchor bands to TTM EPS. Pass: the PE bands drop (trailing EPS < forward EPS) and the tooltip names the TTM basis; the Graham number and reverse-DCF values are unchanged.
  10. Scenario drivers on a non-PE-primary name. Load a symbol whose primary method is PS, PB or EV. Pass: the bear/base/bull tooltips name sales growth (PS/EV) or ROE Γ— retention (PB) as the driver and report an effective growth rate that differs from the EPS growth rate. On a PE-primary symbol, pass if the scenario targets are unchanged from the previous build.
  11. Debt-free name quality check. Load a company with no debt. Pass: the interest-coverage factor contributes its full 2.0 and the quality score is at least as high as before.
  12. Compile and budget. Pass: the script compiles and loads; request budget stays at 35 of 40.

πŸ“‹ Publishing blurb (paste into TradingView release notes)

Fixed: fair-value bands could collapse into a single line on stocks whose multiple had re-rated β€” Low, Fair and High now separate correctly again.

Fixed: the three band labels are no longer stacked on top of each other; they're staggered and readable.

Fixed: stocks with no analyst coverage were being scored as if they had missed every quarter. They now read neutral β€” no growth haircut, no momentum penalty, βšͺ icons and a "no est. coverage" badge.

Fixed: debt-free companies were penalised on interest coverage. Zero debt now scores as the best case, not the worst.

Fixed: EV/EBITDA was quarterly-stepped while every other multiple re-marked daily, which quietly gave the stalest input the most weight. EV is now marked daily β€” expect band and z-score values to shift.

Improved: missing quality inputs now count as neutral and the score renormalises over what's actually available, instead of penalising sparse coverage.

Improved: PS and EV scenarios grow on sales, PB grows on ROE Γ— retention. Targets shift for non-PE-primary names.

Improved: extreme historical multiples are now clamped into the sample instead of thrown away, so bands track genuine re-ratings.

New: πŸ“ Levels Style β€” set the line style, thickness and label size of the four level lines.

New: "Compact bands" to hide the minor overlay lines when the chart gets busy.

New: "Anchor bands to TTM EPS" (off by default) for a consistent trailing basis.

New: a ⚠️ "n/N samples" badge when the bands were built from less history than you asked for.

---

Valuations + Pocket Pivot Screener v4 β€” πŸ’° Valuations Screener πŸ’°

_Stops no-data stocks from ranking as "fairly valued", tightens what counts as a certified fair value, and spends the freed output slots on four columns that were computed but never shown._

⚠️ Behavior changes (read before trusting old readings)

ChangeOldNewWhy it matters
β‘’ Valuation Zone for names with no fundamental data0.0 β€” reads as "at fair value"blank (na)Zone-only screens and zone sorts now exclude these names instead of ranking them mid-pack, above genuinely overvalued stocks.
Data-quality certificationData Quality >= 3 (good) / >= 2 (minimum) β€” a raw count of available metricsAlso requires covered weight β‰₯ 0.75 / β‰₯ 0.50 of the sector profile's intended weightingA bank missing book value could pass "DQ β‰₯ 3" on a composite that was 100% P/E with 65% of the intended weight absent. Screens and alerts gated on these β€” value opportunity, deep value, πŸ”₯ Strong Conviction, πŸš€ Accumulation, πŸ”Ό Value Trend Turn, πŸ”₯ Pattern Conviction β€” are now stricter, and some previously flagged low-coverage names drop off.
Minimum history for fair-value bands6 valid fundamental samples (~2 weeks of listed history)60 (new input)Composite fair value, the β‘  score, β‘‘ upside, β‘’ zone, Margin of Safety and every signal built on them stay na until 60 samples exist β€” recently listed names drop out of the valuation columns for roughly three months. The ⑀–⑨ percentile columns keep the lighter 6-sample floor.
Bottom-fishing pivot (type 2)A gap-up finishing well above the 50MA still printed a pivotRejected when close is more than Max % Extended Above Fast MA above the 50MAWith the uptrend filter ON, everything downstream of the pivot can now flip false on those bars: tech score, πŸš€ Accumulation, πŸ’₯ Value Breakout, πŸ”₯ Strong Conviction, the conviction score's technical component, the "+ PP" pattern flags, πŸ”„ 30% Fall Reversal, and the related alerts.
Pivot classification with "Require Price in Uptrend" OFFType 2 was unreachable β€” the filter sat inside the type-2 condition50MA-reclaim days now print type 2Classification only. Any-pivot screens (>= 1) see no change; with the filter ON, classification is bit-identical to the previous build.
🟩 Pocket Pivot column values1 or 21 / 1.5 / 2 / 2.5 β€” the +0.5 marks a pivot whose volume was at least 2Γ— the largest down-day volume it beatExisting >= 1 and >= 2 filters keep working; an exact = 2 filter now misses the strongest bottom-fish pivots. Use >= 2.
Band-cross alerts (πŸ“ Dropped Below Low Band, πŸ“ Reclaimed Fair Value, πŸ“ Lost Fair Value)Crossed the raw compositeCross a 5-period EMA of the composite fair value and low bandFar fewer whipsaw alerts around estimate revisions; a single clean cross shifts by at most the EMA lag (~2 bars). The two val-score threshold alerts (πŸ“ Became Under/Overvalued) are timing-identical.
Chart-mode visualsZone background tint, pocket-pivot triangle, accumulation diamond, always-on price lineBackgrounds and both shapes removed; the price line is behind a "Screener Build" toggle (ON by default = blank)Hidden outputs still consume their slot toward the 64-output cap, so gating them was not enough β€” they had to go. Their information survives as columns (β‘’ Valuation Zone, 🟩 Pocket Pivot, πŸš€ Accumulation Signal). On a chart, untick "Screener Build" to get the price line back.

πŸ› Fixes

  • Stocks with no fundamental data printed as "at fair value" in the β‘’ Valuation Zone column and ranked ahead of genuinely overvalued names in zone sorts. They now go blank and fall out of those screens.
  • "Good data" could certify a single-metric fair value. The quality flags counted raw metric availability without checking whether those metrics carried any weight in the sector profile; they now also require 75% / 50% of the intended weight to be covered.
  • Fair value could be defined by two weeks of listed history β€” the percentile bands accepted as few as 6 samples.
  • A gap-up straight through the 50MA counted as a bottom-fishing pivot, with no extension backstop of the kind standard pivots already applied to the 10MA.
  • Unticking "Require Price in Uptrend" silently made the bottom-fishing pivot unreachable rather than just relaxing the uptrend requirement.
  • A ta.crossover call sat inside a short-circuited or chain, so it could be skipped on some bars β€” an inconsistent-execution and repaint hazard. It is now evaluated at global scope.

✨ New features

Four promoted columns β€” metrics that were computed since v3 but never output. Β· What you'll see: Upside to High % (distance to the top band), Margin of Safety %, Coverage % (the covered fraction of the sector profile's intended weight β€” the honest companion to Data Quality, and the same quantity the new quality guards threshold at 75/50), and Vol / MaxDownVol (the natural pocket-pivot ranking key β€” how forcefully the pivot beat the down-day volume it had to clear). All four are sortable screener columns.

Minimum-samples control for the bands Β· Inputs: Min Samples for Fair-Value Bands (default 60, range 6–500) Β· What you'll see: valuation columns stay blank on young listings until the history exists. Set it to 6 to restore the old behaviour exactly.

Screener Build toggle Β· Inputs: Screener Build (blank the Price plot) (default ON) Β· What you'll see: ON, the Price plot reads na so it doesn't duplicate the screener's native Price column. OFF, close is drawn against the fair-value bands for chart use.

Pocket-pivot quality tiering β€” the 🟩 column adds 0.5 when the pivot's volume was at least twice the largest down-day volume in the lookback window, so you can sort pivots by force. Degenerate windows (no valid down-day volume) stay at their base tier.

Smoothed band-cross alerts β€” the three band-transition alerts now cross 5-period EMAs of the fair value and low band, cutting the estimate-revision whipsaw.

Guide update β€” the usage guide gained a worked screen: Margin of Safety % > 20 AND Coverage % >= 75, and the note that pocket-pivot filters should use >= 2 rather than = 2.

βš™οΈ Changed defaults

InputOldNewEffect
Min Samples for Fair-Value Bandsnot an input β€” hard-coded floor of 660Fair value, the β‘ /β‘‘/β‘’ columns and every derived signal stay blank on names with under ~3 months of fundamental history. Set to 6 for the previous behaviour.
Screener Build (blank the Price plot)n/a (new)ONThe Price plot is blank by default. Untick for chart use.
Require Price in Uptrend for Pocket PivotONON (value unchanged)Same default, new meaning: it no longer gates the bottom-fishing pivot, which is now controlled solely by "Allow Bottom-Fishing Pivot".

Existing chart instances keep whatever values you already saved β€” the new defaults only apply to a fresh copy of the indicator or a reset to defaults.

πŸ§ͺ Test plan (before publishing)

  1. Output count β€” do this first. The script errors outright above 64 outputs. Add the indicator to a chart and confirm it loads. Pass: it compiles and renders β€” the build is 42 plots + 21 alert conditions = 63/64, with one slot spare. Fail: any "too many outputs" error, which means an output was added somewhere without removing one.
  2. Compile check. This script has never been run through the TradingView compiler. Run a /pine-check pass before publishing. Pass: zero compile errors.
  3. The four new columns exist and sort. Open the Pine Screener column list. Pass: Upside to High %, Margin of Safety %, Coverage % and Vol / MaxDownVol all appear, populate with numbers on a well-covered large cap, and sort ascending/descending.
  4. No-data names drop out rather than ranking mid-pack. Screen a list containing NSE SME or recently listed names, sort by β‘’ Valuation Zone. Pass: names without fundamental data show a blank β‘’ and blank β‘  score, and do not appear between the undervalued and overvalued groups. Fail: any row showing exactly 0.00 in β‘’.
  5. Coverage guard bites where it should. Find a bank or NBFC where book value is missing. Pass: Coverage % reads below 75 and the name no longer flags πŸ”₯ Strong Conviction or a value opportunity, even though Data Quality still reads 3+. Data Quality itself is unchanged β€” it remains an honest raw count.
  6. Screener Build toggle on a chart pane. Add the indicator to a chart (it draws in its own pane) with the toggle ON. Pass: no price line, just the fair-value bands. Untick "Screener Build". Pass: the price line returns and can be compared against the bands. Also confirm the zone background tint and the two signal shapes are gone in both states β€” that is intended, not a regression.
  7. Minimum-samples behaviour. Load a name listed within the last two months. Pass: β‘ , β‘‘, β‘’ and Margin of Safety are blank. Set Min Samples for Fair-Value Bands to 6. Pass: the columns populate again, confirming the input is the only gate. Check the ⑀–⑨ percentile columns stayed populated throughout.
  8. Pivot classification truth table. With Require Price in Uptrend for Pocket Pivot ON, compare the 🟩 column against the previous build on a handful of names. Pass: identical classification. Untick it. Pass: 50MA-reclaim days now print 2 or 2.5 instead of 1, and a screen on 🟩 >= 1 returns the same set in both states.
  9. Pivot quality tier. Sort by 🟩 descending. Pass: values of 1.5 and 2.5 appear, and every one of them shows Vol / MaxDownVol >= 2.
  10. Extension guard on bottom-fish pivots. Find a name that gapped up hard through its 50MA. Pass: no pivot is printed on that bar (with the uptrend filter ON), where the previous build printed a 2.
  11. Smoothed alerts. Set an alert on πŸ“ Reclaimed Fair Value on a name with a recent estimate revision. Pass: the alert fires within a couple of bars of the raw cross and does not fire repeatedly on a single revision step. Confirm πŸ“ Became Undervalued / Overvalued fire at exactly the same bar as before.
  12. Worked screen end to end. Run Margin of Safety % > 20 AND Coverage % >= 75. Pass: the result set is non-empty and every row has a populated β‘  score.

πŸ“‹ Publishing blurb (paste into TradingView release notes)

Fixed: stocks with no fundamental data were printing "0.0" in the β‘’ Valuation Zone column β€” reading as "at fair value" and ranking above genuinely overvalued names. That column is now blank for them, so they drop out of zone screens.

Fixed: "good data" could certify a fair value built from a single metric. Quality now also requires that 75% (or 50% for the looser gate) of the sector profile's intended weight is actually covered. Some low-coverage names will fall off the conviction screens.

Fixed: fair-value bands could be defined by as little as two weeks of listed history. New "Min Samples for Fair-Value Bands" input, default 60 β€” set it to 6 for the old behaviour.

Fixed: a gap-up straight through the 50MA counted as a bottom-fishing pocket pivot. It now fails the same extension check standard pivots use.

Fixed: unticking "Require Price in Uptrend" made the bottom-fishing pivot unreachable instead of just relaxing the filter.

New columns: Upside to High %, Margin of Safety %, Coverage %, and Vol / MaxDownVol β€” all computed for a while, now sortable.

New: pocket pivots are tiered β€” add 0.5 when the pivot's volume was 2Γ— the down-day volume it beat. Filter with >= 2, not = 2.

New: the three band-cross alerts now use a 5-bar EMA of the bands, which kills most of the estimate-revision whipsaw.

Chart users: the zone background tint and the two signal shapes have been removed to fund the new columns (TradingView charges an output slot even for hidden plots). Untick "Screener Build" to bring the price line back.

---

EOD Screener β€” EOD Screener

_The bull-flag setup was mathematically incapable of firing and the BUY gate was tautological β€” both are fixed, plus five new diagnostic columns and a Weinstein-correct extension measure._

⚠️ Behavior changes (read before trusting old readings)

ChangeOldNewWhy it matters
Bull-flag setup (SetupCode 2)Never fired. The breakout level included the current bar's own high, so close could never cross itLevel is taken from the prior bar, exactly like the Stage-2 ignition blockEvery bull-flag breakout was being silently missed. Expect new BUY/ARM rows and "Setup triggered" alerts that never appeared before. The flag's range % now correctly excludes the breakout bar.
BUY gateIncluded TP1(R) >= Min R:R β€” a comparison of two inputs, constant for the whole runRemoved; the gate is now "position size > 0 and stop is not a fallback"At the shipped defaults (TP1 2.0, Min R:R 2.0) nothing changes. If Min R:R was ever set above TP1(R), the screener silently returned zero BUYs across the entire universe. It can now return BUYs.
Extension measure (Ext_%)Measured against the 10-EMA, despite the input being labelled "above support MA"Measured against the 30-period stage-timeframe MA β€” the Weinstein convention the label describesExt_% values are larger now, so at the same 12% default more names flag over-extended and drop out of BUY. If the BUY list thins too much, loosen Max extension above support MA %. The 10-EMA is untouched everywhere else (pullback setup, "Below Key MA" stop).
Relative-strength gateRS > RS-MA and RS > previous RSRS > RS-MA onlyA single flat or soft RS day no longer demotes BUY to ARM. BUY lists widen on choppy-RS names. IPOs are now blocked only by the missing-RS-MA guard, which is visible in the new DataOK column.
Volume policy when volume history is missingBreakout hard-failed; ignition and bull-flag triggers auto-passed; the double-bottom trigger had no volume condition at allAll hard-fail on missing volume; the double-bottom neckline break now requires the same surge multiple as the breakout it shares its crossover withExpect fewer double-bottom signals β€” every surviving one is volume-confirmed. Symbols with under ~50 bars of volume history now fail closed instead of passing by default; DataOK tells you why.
Stage for short-history symbols (IPOs)Reported as Stage 1Reported as na (unknown)The Stage column no longer asserts a stage it cannot know. Open item: the "Entered Stage 2" alert will not fire on a na→2 transition, where the old 1→2 transition did. If first-Stage-2 alerts on young listings matter to you, this needs a decision.
"Require a triggered setup for BUY" set OFFSilently killed the ignition path in the live-Stage-2 test and deadened the Stage-2 ignition alertBoth workOnly visible with the toggle OFF: BUY rows can now include ignition-driven names and the ignition alert fires. Default (ON) behaviour is identical to before. SetupCode and "Setup triggered" remain inert when OFF, by design.

πŸ› Fixes

  • The bull-flag breakout could never trigger. The consolidation high was computed over a window that included the current bar, so a close could not exceed a range containing its own high. Every bull flag in the history of this script was missed.
  • The BUY decision line contained a tautology comparing two inputs β€” harmless at defaults, but a silent zero-BUY failure for anyone who raised Min R:R above TP1(R).
  • IPOs and short-history symbols were labelled Stage 1 because a missing moving average fell through to the "not above the MA" branch.
  • The extension input said one thing and the code measured another β€” "above support MA" against a 10-EMA.
  • Missing-volume handling was inconsistent across setups β€” two triggers hard-failed, two auto-passed, one had no volume test at all.
  • Turning off "Require a triggered setup for BUY" broke more than it relaxed, killing the ignition path and two alerts.
  • A structural stop wider than the max stop distance was silently converted to a percent stop with no indication β€” now flagged by a column.
  • Three separate higher-timeframe data requests where two suffice; the stage-timeframe trail is now returned by the same request as the stage data (numerically identical values, same timeframe, same no-lookahead setting).

✨ New features

EOD confirm only β€” this screener is designed for post-close runs; running it intraday means every trigger evaluates on a developing bar and can repaint. This toggle ANDs a confirmed-bar requirement into all six setup triggers (breakout, Fibonacci hold, ignition, bull flag, double bottom, pullback), and the BUY/ARM/setup/ignition/breakout alerts inherit it. Β· Inputs: EOD confirm only (default OFF β€” shipped behaviour unchanged) Β· What you'll see: with it ON, no trigger fires until the bar closes.

MansRS_% β€” Mansfield-style relative strength as a sortable number, (RS / RS-MA βˆ’ 1) Γ— 100, alongside the existing binary RS_out column. Β· What you'll see: rank the BUY list by relative strength instead of just filtering on it.

StageWeeks β€” how long the symbol has been in Stage 2, counted in stage-timeframe bars, computed inside the stage-timeframe context. The single highest-value Weinstein addition: it separates fresh Stage-2 breakouts from late-stage ones. Β· What you'll see: a number on Stage-2 rows only. Reads na for a symbol that has been Stage 2 across its entire loaded history.

SlClamped β€” 0/1 flag next to Stop_%, marking rows where the structural or method stop was wider than the max stop distance and was silently replaced by the percent stop. Β· What you'll see: a 1 tells you the stop on that row is not the one your stop method chose.

DataOK β€” 0/1 flag confirming that the stage MA, RS MA and volume ratio all had real data. Pairs with the na-stage fix: the new hard-fail volume policy makes short-history rows fail closed, and this column says why. Β· What you'll see: a 0 means the gates ran on missing data β€” treat the whole row as unreliable.

Turnover β€” average rupees traded per bar (close Γ— average volume), beside Vol_x. Slippage is the dominant unmodeled risk with full-capital sizing and 1–3% stops. Β· What you'll see: a liquidity figure you can set a floor on before sizing a position.

βš™οΈ Changed defaults

InputOldNewEffect
Max extension above support MA %12.0, measured against the 10-EMA12.0, measured against the 30-period stage-timeframe MAValue unchanged, meaning corrected. Ext_% readings are larger, so the same 12% rejects more names. This is the retune knob if the BUY list thins too much.
EOD confirm onlyn/a (new)OFFShipped behaviour is unchanged; turn it on if you ever run the screener intraday.

Everything else β€” capital, risk %, stop method, TP1, Min R:R, setup lengths, surge multiple, RS settings β€” keeps its previous default. Existing chart instances keep whatever values you already saved; the new input only appears with its default on a fresh copy or a reset to defaults.

πŸ§ͺ Test plan (before publishing)

  1. Bull flags actually appear. Screen a broad NSE list on the daily and sort by SetupCode. Pass: at least some rows show SetupCode 2 β€” this value was unreachable in every previous build, so zero 2s across a large universe is a fail. Spot-check one on a chart: a pole of at least 18%, a consolidation range under 10%, and a close above the prior bars' consolidation high.
  2. Bull-flag alert path. Set a "Setup triggered" alert on a name currently in a flag. Pass: it fires on the breakout bar with a SetupCode of 2.
  3. BUY gate is no longer tautological. Set Min R:R (TP1) to 3.0 while leaving TP1 (R) at 2.0. Pass: the screener still returns BUY rows. Fail: zero BUYs universe-wide, which was the old behaviour.
  4. Extension retune check β€” do this before publishing. Record the BUY count at Max extension above support MA % = 12.0, then compare against the previous build's BUY count on the same list and date. Pass: the list is thinner but not empty, and the dropped names are visibly extended above their 30-period stage MA. If it is too thin, raise the input (try 15–18) and note the value you settled on in the published description.
  5. New columns present and populated. Open the screener column list. Pass: StageWeeks, MansRS_%, Turnover, SlClamped and DataOK all appear and sort. Spot-check: StageWeeks is blank on non-Stage-2 rows; MansRS_% is positive on names beating the benchmark; Turnover scales with price Γ— volume.
  6. DataOK does its job. Screen a list containing a recent IPO. Pass: DataOK reads 0 on it and no BUY/ARM is issued; the Stage column is blank rather than showing 1.
  7. "Entered Stage 2" gap — decide before publishing. On a young listing that has just crossed into Stage 2, check whether the alert fires. Expected: it does not, because the transition is na→2. Decide whether to accept this or add a follow-up fix, and document whichever you choose.
  8. Double-bottom triggers thinned but confirmed. Compare double-bottom (SetupCode 3) counts against the previous build. Pass: fewer rows, and every surviving one shows Vol_x at or above the breakout surge multiple (1.5 default).
  9. SlClamped catches the wide-stop case. Find a double-bottom row whose structural stop sits below the neckline low by more than the max stop distance. Pass: SlClamped reads 1 and Stop_% equals Max stop distance %.
  10. useSetups OFF path. Untick Require a triggered setup for BUY. Pass: BUY rows now include ignition-driven names and a "Stage-2 ignition" alert fires; SetupCode stays 0. Re-tick it. Pass: results are identical to the previous build.
  11. EOD confirm toggle. During market hours, tick EOD confirm only. Pass: no setup trigger fires on the developing bar; after the close, the same names trigger as with the toggle off.
  12. RS gate widening. Compare BUY counts with Require RS outperformance for BUY ON against the previous build. Pass: more names pass, and the ones that newly qualify have a positive MansRS_% but had a flat or down RS on the most recent bar.
  13. Budget and compile. Pass: the script compiles and loads with 27 plots + 8 alert conditions = 35/64 outputs and 2 higher-timeframe requests (was 3). Confirm the 20-EMA trail values are unchanged from the previous build β€” the request merge should be numerically identical.

πŸ“‹ Publishing blurb (paste into TradingView release notes)

Fixed: the bull-flag setup (SetupCode 2) could never fire β€” the breakout level was computed over a window that included the current bar's own high. Every bull flag was being missed. Expect new setups to show up.

Fixed: the BUY gate contained a comparison between two inputs. Harmless at defaults, but if you raised Min R:R above TP1(R) the screener silently returned zero BUYs.

Fixed: IPOs and short-history symbols were reported as Stage 1. The Stage column now reads blank when there isn't enough history to know.

Fixed: the "Max extension above support MA %" input measured against the 10-EMA, not the support MA. It now measures against the 30-period stage-timeframe MA as labelled β€” extension readings are larger, so the same 12% setting rejects more names. Loosen it if your BUY list gets too thin.

Fixed: missing-volume handling was inconsistent β€” two setups auto-passed and the double-bottom had no volume test at all. All setups now fail closed on missing volume, and double-bottom neckline breaks need the same volume surge as any other breakout. Expect fewer double-bottom signals, all of them confirmed.

Fixed: turning off "Require a triggered setup for BUY" used to kill the Stage-2 ignition path and two alerts.

Improved: the RS gate no longer demotes a stock for one flat day β€” it just needs RS above its own moving average.

New columns: StageWeeks (how fresh the Stage 2 is), MansRS_% (sortable Mansfield relative strength), Turnover (liquidity), SlClamped (your stop got clamped to the max), DataOK (this row's gates ran on missing data).

New: "EOD confirm only" toggle, off by default β€” turn it on if you ever run this intraday, so nothing evaluates on a developing bar.

Under the hood: three higher-timeframe data requests merged into two, with identical values.

INDICATOR
2 Aug
2026
01_analytics β€” Indicator

IN Analytics Pro v3.4 β€” The Valuations ++ Bridge, Wired by Default + Display Masters

_Built 02-Aug-2026. Everything defaults ON with layout Full, so updating changes nothing until a switch is touched. No input titles renamed β€” every saved chart keeps its settings._

πŸ”— The flagship: the Valuations ++ fair-value bridge now ships ON

With Valuations ++ on the same chart, one pick in the source input (Fundamental Factors β†’ External fair value β†’ the πŸ”— Fair Value (bridge export) plot β€” the πŸ”— plot, not 🎯) hands the engine V++'s composite fair value β€” percentile bands, consistency-weighted method mix, stationarity gate and the filed-guidance layer behind it β€” driving the valuation leg of the score, the rating and the projected ROI. Safe auto-fallback: an unwired, missing or na source silently reverts to the internal four-method composite, so ON costs nothing on any chart. The Composite Value row shows πŸ”— with its source in the tooltip while the bridge is live. Wire once, save an Indicator Template β€” TradingView carries source links inside templates, so every future chart opens pre-wired. (Pine cannot auto-detect other indicators; the source picker is the only cross-indicator channel β€” the bridge is designed so that single click is all there is.)

πŸ–₯️ The Display group

MasterWhat it gates
Signal & campaign markersBuy/sell/trend/cap/cheat shapes, campaign P1/P2/S1/S2 + trims, exhaustion βœ•, S/R break tags, bull-snort dot, sell-risk ⛔️, IPO diamonds β€” and the invisible signal hover-tooltip anchors that ride on them
Moving averages & level overlaysThe three EMAs, HTF MA pair + trend fill, support/resistance level plots, D/W/M high-low lines
Candle & background paintBull-snort purple / high-volume blue bar colouring, trending/breaking background tint
All tablesSignal & technicals, risk management, economic/fundamental, market regime
Screen layoutSingle screen (compact) forces the Market Regime table into its compact form and hides the 22-row Economic & Fundamental table β€” the shared-screen answer to tables overflowing across panes when IN runs alongside Valuations ++ (which gained the mirror-image preset in its v6.5). A preset, not auto-detection: Pine cannot measure panes.

Masters AND-gate on top of every individual toggle β€” nothing was removed, and the individual switches still work while a master is ON.

Source: ~/IN_Analytics_Pro3_02Aug.pine. US ANALYTICS parity pending β€” the same patch must be ported before the next US publish.

---

IN Analytics β€” IN Analytics Pro v2.3

_A signal-engine rebuild: one-in-one-out discipline, three entry classes, two structural exits, pyramiding Campaign Mode on by default β€” plus the scoring bugs that were quietly dragging every composite down._

⚠️ Behavior changes (read before trusting old signals)

ChangeOld behaviorNew behaviorWhy it matters
Strict signal alternationSame-side signals could repeat and cluster β€” dozens of SELLs through one advanceExactly one entry and one exit per cycle: no BUY without an intervening SELL, and vice versaMarker counts on historical charts drop sharply; alerts and Dhan webhooks go back to at-most-one signal per side per cycle
Campaign Mode (default ON)One-in, one-out: full position on the entry, full exit on the sellStaged position: entry = tranche 1, P1/P2 adds, S1/S2 partial trims, final SELL closes the campaignThe self-backtest books one blended trade per campaign, not one per marker; position sizing is now tiered
Two new sell triggers (both ON)Exits came only from the score modelBlow-off extension and climax-volume bars also force an exitPositions exit at parabolic tops instead of riding the round trip down; more exits than the old build
Two new entry classes (both ON)Only the valuation-gated score BUYTREND BUY (stage-2 breakout) and CAP BUY (capitulation reclaim) fire independently of the scoreRe-rating rallies and post-flush reversals that the score model structurally could not buy now produce entries
Inverse-asset detection tightenedA mildly negative beta was enough β€” ordinary smallcaps got the "Defensive/Inverse Asset" banner and inverted buy/sell thresholdsAutomatic detection needs genuinely negative correlation and negative betaOrdinary equities stop generating inverted SELL pressure through uptrends; real inverse assets are unaffected
Elliott wave moduleCould never confirm a valid retracement and had no way out of a stuck state β€” a permanent bearish drag on the compositeCorrect retracement band and math, plus a 100-bar timeout back to neutralComposite and combined scores shift upward on trending charts versus historical readings
Missing fundamental dataAbsent cash-flow data scored as "terrible cash conversion" and could trip the fraud penalty; the valuation weight always diluted the denominatorMissing data is treated as missing on both countsFundamental scores rise for data-poor names; the quality table shows "N/A" instead of "NaN%"
Self-backtest pricingBooked at the signal bar's open β€” unknowable when a close-based signal firesBooked at the close, with an optional slippage haircutWin rate and average PnL are honestly lower than the old numbers
Backtest win rateInteger division truncated it to 0% or 100%Real percentagesThe "Model Backtest" cell was effectively meaningless before
TD Sequential contributionLatched for weeks after the setup endedDecays after ~10 bars, clears when counts reset, and shows its ageStale Β±3-weighted TD values no longer sit in the composite
Exchange-rate legThresholds were 100Γ— too small β€” the signal flipped on FX noise and carried half the monetary scoreCorrect percent-scale thresholdsThe exchange signal sits neutral far more often; monetary score shifts toward neutral vs history
Macro windows on weekly/monthly chartsA fixed 60-bar lookback meant 60 weeks (~14 months) on a weekly chartWindow scales with the chart timeframe (~60 calendar days)Economic score and the regime label genuinely differ on weekly passes; daily charts are unchanged
Higher-timeframe moving averagesAveraged chart bars of a stepped HTF seriesTrue EMAs computed inside the higher-timeframe contextHTF alignment and signal confidence read differently
Macro inputs slimmedUS CPI and US GDP fed small legs into the India macro scoreThose two legs removed; the India legs keep their weightsBorderline regime classifications can flip
Webhook JSONFired only on score BUY/SELLFires on all eight events and carries type, confidence, plus fraction and (on sells) entry_class while Campaign Mode is onAny consumer keying only off action is unaffected, but it must be idempotent about the new event types

πŸ› Fixes

  • Elliott wave engine β€” the wave check compared a percentage retracement against a 0.1 threshold (so it only "passed" when the pivot sat above the wave high) and the state machine had no exit β†’ correct 23.6–78.6 retracement band, absolute-value denominators on both impulse and corrective legs, and a 100-bar timeout that resets the state to neutral.
  • Inverse-asset misfire β€” a smallcap's high volatility could push its beta below the trigger even with near-zero correlation, flagging it as an inverse asset and inverting every threshold β†’ automatic detection now requires real negative correlation and negative beta.
  • Missing cash-flow data penalised β€” an absent CFO/net-income figure was scored as a terrible cash-conversion reading and could trigger the fraud penalty β†’ missing is now genuinely missing, and the table cell shows "N/A" instead of "NaN%".
  • Fair-value weighting always diluted β€” the valuation leg entered the denominator even when no method produced a fair value β†’ it now counts only when at least one method worked.
  • Backtest win rate stuck at 0% or 100% β€” integer division β†’ real percentages.
  • Backtest priced at the wrong bar β€” entries and exits were booked at the signal bar's open β†’ now at the close, matching the alert payload.
  • Stale TD Sequential readings β€” the TD signal was set but never reset, holding weeks-old values β†’ decays after ~10 bars and clears when the counts are zero.
  • Exchange-rate thresholds 100Γ— too small β€” percent-scale deviations were compared against 0.02/0.01 β†’ 2.0/1.0.
  • Fraud filter toggle ignored β€” operator precedence let the first branch fire even with the filter switched off β†’ the toggle now gates both branches.
  • Inverse-asset detection self-cancelling β€” the sector test overwrote the manual override and keyword detection β†’ the tests now combine, and the banner names which one fired.
  • Gold keyword over-matched β€” any ticker containing "GOLD" was caught, including ordinary jewellery equities β†’ gold ETFs and futures still match, equities no longer do.
  • Higher-timeframe MAs weren't β€” the 8/21 EMAs averaged chart bars of a stepped weekly series β†’ computed inside the higher-timeframe context.
  • Weekly/monthly macro windows β€” a hardcoded 60-bar lookback became 60 weeks on a weekly chart β†’ the window now scales with the timeframe and is capped so it can't outrun the history buffer.
  • Gold weekly feed drifted intra-week β€” now reads the confirmed prior week; historical values are identical, only live drift is gone.
  • "Stable Value" for companies with no earnings data β€” a missing EPS estimate was read as zero earnings volatility β†’ those names now classify as Undefined and get default valuation weights.
  • Normalization lookback could exceed the script's history buffer β€” now clamped, with the clamp documented in the input tooltip.
  • Stale entry prices β€” a blocked or repeated signal could re-stamp the entry anchor and corrupt the next trade's PnL β†’ every stamp is gated by the position state.

✨ New features

TREND BUY (stage-2 breakout) β€” a valuation-blind structural entry for re-rating rallies the score model can't buy, because a run above stale fair value lifts its own threshold out of reach.

Β· Inputs: TREND BUY (stage-2 breakout) (ON) β€” master toggle Β· Breakout base lookback (bars) (50) β€” the base high the close must clear Β· Breakout volume multiple (Γ— 20-bar avg) (1.5) β€” minimum volume expansion on the breakout bar. Also requires price above a rising long-term MA, positive Mansfield relative strength vs your chosen benchmark, and no active blow-off extension.

Β· What you'll see: a lime "TREND BUY" triangle below the breakout bar.

CAP BUY (capitulation reclaim) β€” buys the reversal after a flush, never the flush itself.

Β· Inputs: Capitulation BUY (ON) Β· ATR flush multiple (4.5) β€” the climax bar's low must be this many ATRs below the reference EMA Β· Volume spike multiple (Γ— 20-bar avg) (3.0) Β· Reclaim window (bars) (3) β€” bars allowed for the reclaim after the climax Β· Aggressive mode (OFF) β€” when off, no capitulation buys while price is under a falling long-term MA.

Β· What you'll see: a teal "CAP BUY" triangle 1–3 bars after the flush bar, on the bar that closes back above the flush bar's midpoint.

ATR Extension Sell (sell factor A) β€” exits parabolic blow-offs.

Β· Inputs: ATR Extension Sell (factor A) (ON) Β· ATR extension multiple (5.0, typical 4–7, up to 10 for high-momentum names) Β· Extension reference MA length (EMA) (21).

Β· What you'll see: a SELL when the close stretches more than 5 ATRs above the 21 EMA β€” and, while flat, the info table reads "Sell" so a fresh buy can't chase the same parabola.

Volume Stop Sell (sell factor B) β€” classic stopping-volume / distribution exit.

Β· Inputs: Volume Stop Sell (factor B) (ON) Β· Volume spike multiple (Γ— 20-bar avg) (3.0).

Β· What you'll see: a SELL on a huge-volume bar that closes in the lower half of its range after an advance, or on a spike-and-fail reversal bar.

Campaign Mode (pyramiding tiers) β€” position-level pyramiding per the house doctrine: adds are half the initial size, earned at roughly +1R, maximum two adds, never below entry.

Β· Inputs: Enable Campaign Mode (ON) Β· Tranche 1 % (initial BUY / CAP BUY) (50) Β· Tranche 2 % (P1 add) (25) Β· Tranche 3 % (P2 add) (25) Β· Earn-the-add: min open gain (ATRs) (1.5) β€” an add needs this much open gain above the last tranche's entry.

Β· What you'll see: small green "P1"/"P2" triangles on adds; small orange "S1" (extension trim) and "S2" (volume-stop trim) triangles on partial exits; the final SELL closes the campaign, and the Model Backtest row counts the whole campaign as one blended trade.

Entry-class exit labels β€” the exit now tells you which entry it is closing.

Β· What you'll see: red "SELL" for score entries, orange-red "TREND SELL" for a campaign opened by TREND BUY, deep-red "CAP SELL" for one opened by CAP BUY. Exactly one label per exit.

Alert and webhook upgrades β€” eight alert conditions: BUY, TREND BUY, CAP BUY, SELL, and campaign P1 ADD / P2 ADD / S1 TRIM / S2 TRIM.

Β· What you'll see: the webhook JSON now carries type on every emission (buy/trend_buy/cap_buy/sell/p1/p2/s1/s2), confidence, plus fraction (the tranche % involved) and entry_class on sells whenever Campaign Mode is on.

Backtest slippage β€” Backtest slippage (bps per side) (0.0). Applies an adverse fill to every tracked entry and exit; at the default of 0 nothing changes.

Reset signal state β€” Reset signal state (OFF). Tick once to force the alternation machine back to flat after a manual exit, then untick.

Inverse-asset reason β€” the orange banner now reads "Defensive/Inverse Asset Detected (…)" naming what triggered it: manual override, ticker keyword, defensive sector, negative correlation, or negative beta.

TD age tag β€” the TD Seq row appends "Β· n bars ago" whenever the reading isn't from the current bar.

βš™οΈ Changed defaults

InputOldNewEffect
Enable Campaign Moden/a β€” new (built OFF, shipped ON)ONP1/P2 adds and S1/S2 partial trims are live out of the box; the backtest books one blended trade per campaign
TREND BUY (stage-2 breakout)n/a β€” newONlime breakout entries fire independently of valuation
Capitulation BUYn/a β€” newONteal reclaim entries fire after flushes
Aggressive mode (CAP BUY)n/a β€” newOFFno capitulation buys under a falling long-term MA
ATR Extension Sell (factor A)n/a β€” newONadds blow-off exits
Volume Stop Sell (factor B)n/a β€” newONadds climax-volume exits
Earn-the-add: min open gain (ATRs)n/a β€” new1.5adds must show ~1R of open gain
Backtest slippage (bps per side)n/a β€” new0.0stats unchanged until you raise it
Reset signal staten/a β€” newOFFinert until ticked

Saved chart instances: TradingView keys saved inputs by title, so every chart copy you already have keeps its stored values for inputs whose titles existed before β€” Enable Probable Fraud filter, Confirm signals on bar close, Use Normalized Scoring (v4), RS / Correlation Benchmark and the rest are untouched. Every input in the table above is new, so no saved instance has a stored value for it: old and new chart copies alike pick up these defaults, including Campaign Mode ON. No existing input was renamed, precisely so nothing silently resets.

Internal thresholds also changed (not user inputs): the Elliott retracement band (0.1 β†’ 23.6–78.6), the exchange-rate signal thresholds (0.02/0.01 β†’ 2.0/1.0), and the macro change window (fixed 60 bars β†’ timeframe-scaled).

πŸ§ͺ Test plan (before publishing)

Reference symbol: NSE:INDSWFTLAB, daily β€” a +130% re-rating with a 2025 capitulation, and the chart that surfaced the hotfix wave.

  1. Alternation. Scan the full visible history on INDSWFTLAB. Pass: every entry marker (BUY / TREND BUY / CAP BUY) is followed by exactly one exit label before the next entry of any class β€” zero instances of two entries or two exits in a row anywhere on the chart.
  2. TREND BUY fires where expected. During the β‚Ή124β†’237 advance. Pass: at least one lime "TREND BUY" triangle sits on a bar whose close crosses above the highest high of the prior 50 bars, on volume β‰₯ 1.5Γ— the 20-bar average, with price above a rising long-term MA.
  3. CAP BUY fires where expected. At the 2025 capitulation. Pass: a teal "CAP BUY" triangle appears within 3 bars after a bar whose low is β‰₯ 4.5 ATRs below the 21 EMA on β‰₯ 3Γ— average volume β€” and never on the flush bar itself.
  4. CAP BUY stage guard. Leave Aggressive mode OFF. Pass: no CAP BUY prints while price is below a falling long-term MA. Tick it on: at least one extra CAP BUY appears in a Stage-4 stretch. Untick to restore.
  5. Sell factor A. Find a bar where close exceeds the 21 EMA by more than 5 ATRs while a position is open. Pass: a SELL prints there. Untick ATR Extension Sell (factor A): Pass: that SELL disappears and the position runs on to the next model exit.
  6. Sell factor B. Find a bar with volume β‰₯ 3Γ— the 20-bar average closing in the lower half of its range after an advance. Pass: a SELL prints. Untick Volume Stop Sell (factor B): Pass: it disappears.
  7. Partial-exit labels. With Campaign Mode ON and at least two tranches open, re-run the factor-A/B conditions. Pass: a small orange "S1" (extension) or "S2" (volume stop) triangle prints instead of a full SELL, at most one per bar, and a multi-bar extension trims only once β€” the last remaining tranche always exits via a full SELL, never a trim.
  8. Adds are earned. Pass: every green "P1"/"P2" triangle sits above the previous tranche's entry price, above the 21 EMA, and at least 1.5 ATRs above that entry. Set Earn-the-add to 0 β†’ more P1/P2 markers appear; set it back to 1.5 β†’ they revert exactly.
  9. Campaign accounting. Read the "Model Backtest" cell. Pass: the trade count n equals the number of completed BUY→SELL campaigns visible, not the number of entry markers — a campaign with two adds and one trim still counts as one trade, and the win rate is some value other than 0% or 100%.
  10. Exit labels by entry class. Pass: a campaign opened by TREND BUY closes with an orange-red "TREND SELL"; one opened by CAP BUY closes with a deep-red "CAP SELL"; a score entry closes with the standard red "SELL". Exactly one sell label per exit bar.
  11. Inverse-asset banner absent on ordinary stocks. Pass: no orange "Defensive/Inverse Asset Detected" banner on INDSWFTLAB, on a large-cap such as NSE:RELIANCE, or on NSE:GOLDIAM (a jewellery equity, previously caught by the GOLD keyword). Pass: the banner does still appear, with a reason in brackets, on NSE:GOLDBEES and on MCX gold futures.
  12. Campaign Mode off restores classic behavior. Untick Enable Campaign Mode. Pass: all P1/P2/S1/S2 markers vanish, every exit renders as the plain red "SELL", and each cycle is exactly one entry and one exit.
  13. Each new entry class off restores prior behavior. Untick TREND BUY, then Capitulation BUY. Pass: the lime and teal triangles disappear respectively and no other marker moves.
  14. Alerts and webhook payload. Create all eight alert conditions and let one fire. Pass: the JSON contains a type field matching the event, a confidence value, a fraction field while Campaign Mode is on, and β€” on a sell β€” an entry_class naming the class that opened the campaign.
  15. Reset hatch. Tick Reset signal state for one bar, then untick. Pass: the machine returns to flat and the next entry of any class can fire immediately.
  16. TD age tag. Pass: the TD Seq row shows "Β· n bars ago" when the reading is stale, and shows no tag on a bar where a TD label prints on the chart.

πŸ“‹ Publishing blurb (paste into TradingView release notes)

Signals now alternate strictly: one entry, one exit, no clusters.

Two new entry classes β€” TREND BUY catches stage-2 breakouts that the valuation-gated model used to miss, and CAP BUY buys the reclaim after a capitulation flush (never the flush itself).

Two new structural exits β€” an ATR-extension sell for parabolic blow-offs and a stopping-volume sell for climax distribution bars.

Campaign Mode is now on by default: the entry opens tranche 1, P1/P2 adds are earned with ~1R of open gain, and S1/S2 trim partial tranches instead of dumping the whole position.

Exits are labelled by the entry that opened them: SELL, TREND SELL or CAP SELL.

Eight alert conditions, and the webhook payload now carries the event type, confidence, tranche fraction and entry class.

Fixed: the Elliott wave module was stuck in a permanent bearish state and dragging every composite score down.

Fixed: companies with missing cash-flow or earnings data were being scored as if the data were bad rather than absent.

Fixed: ordinary stocks were sometimes flagged as inverse/defensive assets, which silently inverted their buy and sell thresholds.

Fixed: the backtest booked trades at the wrong price and its win rate could only ever read 0% or 100%.

Fixed: TD Sequential readings latched for weeks, exchange-rate signals flipped on noise, and macro windows on weekly charts covered 14 months instead of two.

Recommended: re-validate any alert thresholds against replay before comparing new readings with old ones.

---

US Analytics β€” US ANALYTICS

_The India-sibling fix set finally ported, a valuation engine that stops fighting itself, and the same one-in-one-out signal machine with three entry classes, two structural exits and Campaign Mode._

⚠️ Behavior changes (read before trusting old signals)

ChangeOld behaviorNew behaviorWhy it matters
Strict signal alternationThe old latch allowed a first-signal SELL and repeated same-side printsStarts flat: the first print is always a BUY, and every SELL requires an open BUYHistorical marker counts fall and backtest trades are segmented into complete round trips
Campaign Mode (default ON)One-in, one-outEntry = tranche 1, P1/P2 adds, S1/S2 partial trims, final SELL closes the campaignThe backtest books one blended trade per campaign; position sizing is tiered
Two new sell triggers (both ON)Exits came only from the score modelBlow-off extension and climax-volume bars also force an exitExits at parabolic tops instead of round trips; more exits than before
Two new entry classes (both ON)Only the valuation-gated score BUYTREND BUY (stage-2 breakout) and CAP BUY (capitulation reclaim) fire independently of the scoreStage-2 rallies and post-crash reversals now produce entries
Fair value recalculatedThe EBITDA estimate subtracted interest and tax instead of adding them back, and the P/S leg was circular β€” it collapsed to roughly the current priceSign corrected; the circular P/S leg is disabled and the remaining legs renormalizeComposite fair value, projected ROI, valuation rating and long-term valuation impulses all move materially on most symbols
Quality gate is live for the first timeThe easing/penalty tests compared against strings the engine never emitted, so quality never adjusted thresholdsStrings alignedHigh-quality names get eased buy thresholds; weak ones get harder buys and easier sells β€” expect more buys on quality, earlier exits on junk
Moderate regime tiers are liveA "Moderately"/"Moderate" string mismatch meant moderate regimes never adjusted anythingFixedModerate expansionary/contractionary regimes now shift thresholds as designed
Elliott wave modulePermanent bearish latch, same deadlock as the India siblingCorrect retracement band and a 100-bar staleness resetComposite scores rise on long-history charts that had a stalled wave state
Macro score could kill all signalsA young chart or one failed macro symbol NaN'd the composite β€” no signals ever, NaN tableMissing legs contribute zeroSymbols that produced nothing at all now produce signals
Exchange leg and trend weight wired inThe exchange weight and its Dollar-Sensitive boost fed nothing; the trend weight was hardcodedBoth feed the composite through named weightsComposite shifts by roughly Β±0.5, up to Β±2.5 in the Dollar-Sensitive regime
Index/ETF penalty removedIndices and ETFs took a blanket βˆ’15 for trading below their 200 EMAThe penalty is restricted to actual stocksIndex charts score materially higher in downtrends β€” buy signals are possible where none could fire
New Risk-Off regimeVolatile, thin-breadth markets fell into High Volatility / ChoppyA dedicated Risk-Off regime when VIX β‰₯ 25 and S&P breadth < 40Buy thresholds Γ—1.4, sell thresholds Γ—0.8, and a different weight mix in those conditions
"FII Sensitive" renamed "Dollar Sensitive"India-derived regime name and advice text ("Monitor USD/INR", "FII holdings")US-appropriate name, regime row and adviceTrigger, weights and thresholds are unchanged, but any alert or screenshot keyed on the old string no longer matches
Defensive-sector detectionSector names never matched TradingView's taxonomy and the correlation test had the wrong sign, so only Utilities ever fired β€” and the sector test overwrote the manual overrideCorrect sectors, correct sign, override preservedStaples/healthcare names with genuinely inverse correlation now flip to inverse-asset threshold logic
Higher-timeframe trendStepped for one chart bar per HTF period and flipped intrabar with the developing barDerived from confirmed HTF closesHTF alignment and signal confidence stop flickering; historical values differ from before
Backtest pricingBooked at the signal bar's openBooked at the closeWin rate and average PnL are honestly lower
Weekly/monthly chartsMacro deltas and P/E-history sampling used 60 chart bars β€” 60 weeks on a weekly chartBoth normalized to ~60 trading days on every timeframeEconomic score and median P/E change on non-daily charts; daily is unchanged

πŸ› Fixes

  • EBITDA estimate sign error β€” interest and tax were subtracted from net income instead of added back, understating every EV-based fair value β†’ corrected.
  • P/S fair value was circular β€” forward revenue per share Γ— forward P/S collapses to roughly the current price by identity, dragging the composite toward the market β†’ the leg is disabled and P/E and EV/EBITDA renormalize cleanly.
  • Macro score could NaN out every signal β€” a young chart or one failed macro symbol poisoned the composite so nothing ever fired β†’ missing legs now contribute zero.
  • Quality gate never matched β€” the easing and penalty branches tested for strings the engine never produces, so quality-based threshold adjustment was dead code β†’ strings aligned on both the engine and the display table.
  • Moderate regime tiers never adjusted thresholds β€” a "Moderately" vs "Moderate" mismatch β†’ fixed at both consumer sites.
  • Elliott wave engine β€” the same deadlock as the India sibling: an inverted retracement test and no state timeout β†’ correct 23.6–78.6 band, absolute-value denominators, and a reset after 100 bars without a wave event.
  • Gold score compared dollars against percent thresholds β€” saturated at Β±2 on week boundaries and 0 elsewhere β†’ percent change with a zero guard.
  • Weekly/monthly EMA switch was dead code β€” the timeframe-adaptive assignments created local shadows, so weekly-and-above charts fell back to an empty 200 EMA β†’ they now use the intended 10/20/40 set.
  • Stale TD Sequential β€” the counts reset but the signal never did β†’ TD contribution is event-scoped again.
  • Backtest priced at the wrong bar β€” entries and exits booked at the signal bar's open β†’ now at the close.
  • Fraud filter toggle ignored β€” operator precedence let the first branch fire regardless of the toggle β†’ fully gated.
  • Blanket βˆ’15 penalty on indices and ETFs β€” a below-200-EMA penalty that dwarfed every sub-model β†’ restricted to actual stocks, with an explicit guard for young charts.
  • Exchange weight fed nothing β€” the exchange signal and its regime boost adjusted a weight that never reached the composite β†’ wired in; the hardcoded trend weight is now a named weight of the same value.
  • Fair-value weighting always diluted β€” the valuation leg entered the denominator even with no valuation data β†’ it now joins only when a fair value actually exists.
  • Defensive-sector detection never fired β€” the sector names weren't TradingView's, the correlation test looked for weak positive correlation instead of inverse, and the branch stomped the manual override β†’ all three corrected.
  • Orphaned risk lines β€” stop and target lines persisted after a Buyβ†’Sell flip or after switching the display off β†’ the inactive side is cleared every bar.
  • Spread change showed "NaN %" β€” a value was being passed where a lookback length was expected β†’ manual, guarded percent change; the table shows "N/A" when there's no data.
  • Elliott table label was stale β€” seven label assignments created local shadows β†’ the cell now shows the true latest wave.
  • Higher-timeframe trend flipped intrabar β€” it stepped once per HTF period then flickered with the developing bar β†’ derived from confirmed HTF closes.
  • Daily/weekly/monthly levels overwrote each other β€” the three level blocks shared one set of line handles, so only the last enabled timeframe drew β†’ separate handles per timeframe, and the period-open line (created but never positioned) is now drawn in yellow.
  • Macro and P/E windows not timeframe-normalized β€” 60 chart bars meant 60 weeks on a weekly chart, starving the P/E median β†’ both use a ~60-trading-day window on every timeframe.

✨ New features

TREND BUY (stage-2 breakout) β€” a valuation-blind structural entry for the rallies the score model can't buy once a run above stale fair value lifts its own threshold.

Β· Inputs: TREND BUY (stage-2 breakout) (ON) Β· Breakout base lookback (bars) (50) β€” the prior-bar high the close must clear Β· Breakout volume multiple (Γ— 20-bar avg) (1.5). Also requires price above a rising long-term MA, relative strength versus the S&P rising over the base, and no active blow-off extension.

Β· What you'll see: a lime "TREND BUY" triangle below the breakout bar.

CAP BUY (capitulation reclaim) β€” buys the reversal after a flush, never the flush itself.

Β· Inputs: Capitulation BUY (ON) Β· ATR flush multiple (4.5) Β· Volume spike multiple (Γ— 20-bar avg) (3.0) Β· Reclaim window (bars) (3) Β· Aggressive mode (OFF) β€” when off, no capitulation buys while price is under a falling long-term MA.

Β· What you'll see: a teal "CAP BUY" triangle 1–3 bars after the flush, on the bar that closes back above the flush bar's midpoint.

ATR Extension Sell (sell factor A) β€” exits parabolic blow-offs.

Β· Inputs: ATR Extension Sell (factor A) (ON) Β· ATR extension multiple (5.0) Β· Extension reference MA length (EMA) (21).

Β· What you'll see: a SELL when the close stretches more than 5 ATRs above the 21 EMA; while flat, the Model Score cell reads the pinned value so a fresh buy can't chase the same parabola.

Volume Stop Sell (sell factor B) β€” classic stopping-volume exit.

Β· Inputs: Volume Stop Sell (factor B) (ON) Β· Volume spike multiple (Γ— 20-bar avg) (3.0).

Β· What you'll see: a SELL on a huge-volume bar closing in the lower half of its range after an advance, or on a spike-and-fail reversal bar.

Campaign Mode (pyramiding tiers) β€” adds are half the initial size, earned at roughly +1R, maximum two adds, never below entry.

Β· Inputs: Enable Campaign Mode (pyramiding tiers) (ON) Β· Tranche 1 size (%) (50) Β· Tranche 2 size (%) (25) Β· Tranche 3 size (%) (25) β€” normalized to their sum Β· Earn-the-add: min open gain (ATRs) (1.5).

Β· What you'll see: small green "P1"/"P2" triangles on adds; small orange "S1" (first trim of the campaign) and "S2" (second trim) triangles on partial exits; one blended trade per campaign in the backtest row. Visual and backtest only β€” this script has no alerts or webhooks.

Entry-class exit labels β€” red "SELL" for score entries, orange-red "TREND SELL" for a campaign opened by TREND BUY, deep-red "CAP SELL" for one opened by CAP BUY. Exactly one label per exit.

Risk-Off regime β€” automatic, no input: triggers when VIX β‰₯ 25 and S&P 500 breadth (percent above 200-day) is below 40, and outranks every regime except Strong Downtrend and Recession Warning.

Β· What you'll see: a burnt-orange regime row with its own advice text; buy thresholds Γ—1.4, sell thresholds Γ—0.8, higher weight on relative volume and monetary factors.

Model Backtest row β€” a new table row reading NN% W Β· avg N.N% Β· nNN: win rate, average PnL per closed model signal and the trade count over the visible history.

Confirm on close β€” Confirm on close (OFF, Signal Filters group). When on, buy and sell signals only change on confirmed bars β€” no intrabar repainting. Default off preserves the previous behavior exactly.

Reset signal state β€” Reset signal state (OFF). Tick once to force the alternation machine flat after a manual exit, then untick.

βš™οΈ Changed defaults

InputOldNewEffect
Enable Campaign Mode (pyramiding tiers)n/a β€” new (built OFF, shipped ON)ONP1/P2 adds and S1/S2 partial trims are live out of the box; one blended trade per campaign in the backtest
TREND BUY (stage-2 breakout)n/a β€” newONlime breakout entries fire independently of valuation
Capitulation BUYn/a β€” newONteal reclaim entries fire after flushes
Aggressive mode (CAP BUY)n/a β€” newOFFno capitulation buys under a falling long-term MA
ATR Extension Sell (factor A)n/a β€” newONadds blow-off exits
Volume Stop Sell (factor B)n/a β€” newONadds climax-volume exits
Earn-the-add: min open gain (ATRs)n/a β€” new1.5adds must show ~1R of open gain
Confirm on closen/a β€” newOFFprevious (repainting) behavior preserved until you switch it on
Reset signal staten/a β€” newOFFinert until ticked

Saved chart instances: TradingView keys saved inputs by title, so every chart copy you already have keeps its stored values for inputs whose titles existed before β€” Enable Probable Fraud filter, Track PnL Mode, Manual Override for Inverse Asset and the rest are untouched. All the inputs above are new, so no saved instance has a stored value for them: old and new chart copies alike pick up these defaults, including Campaign Mode ON. No existing input was renamed.

Internal changes with no input attached: the P/S fair-value leg is zeroed, the Elliott retracement band moves from 0.1 to 23.6–78.6, the macro and P/E-history windows become timeframe-normalized, and the "FII Sensitive" regime string becomes "Dollar Sensitive".

πŸ§ͺ Test plan (before publishing)

Reference symbols: NASDAQ:AAPL, daily (liquid large-cap, clean baseline) and NASDAQ:META, daily (the 2022 drawdown and capitulation, then the 2023 stage-2 re-rating). NASDAQ:NVDA is useful for the extension exit.

  1. Alternation. Scan the full history on AAPL and META. Pass: the first print on each chart is an entry, never a SELL; every entry marker is followed by exactly one exit label before the next entry of any class β€” no two entries or two exits in a row.
  2. TREND BUY fires where expected. META through the 2023 recovery. Pass: at least one lime "TREND BUY" triangle on a bar whose close crosses above the highest high of the prior 50 bars, on volume β‰₯ 1.5Γ— the 20-bar average, with price above a rising long-term MA.
  3. CAP BUY fires where expected. META at the late-2022 low. Pass: a teal "CAP BUY" triangle within 3 bars after a bar whose low is β‰₯ 4.5 ATRs below the 21 EMA on β‰₯ 3Γ— average volume β€” never on the flush bar itself.
  4. CAP BUY stage guard. Leave Aggressive mode OFF. Pass: no CAP BUY prints during the 2022 decline while price is below a falling long-term MA. Tick it on: at least one extra CAP BUY appears in that stretch. Untick to restore.
  5. Sell factor A. NVDA, or any bar where close exceeds the 21 EMA by more than 5 ATRs while a position is open. Pass: a SELL prints there. Untick ATR Extension Sell (factor A): Pass: that SELL disappears and the position runs on.
  6. Sell factor B. Find a bar with volume β‰₯ 3Γ— the 20-bar average closing in the lower half of its range after an advance. Pass: a SELL prints. Untick Volume Stop Sell (factor B): Pass: it disappears.
  7. Partial-exit labels. With Campaign Mode ON and at least two tranches open, re-run the factor-A/B conditions. Pass: a small orange "S1" (first trim) or "S2" (second trim) triangle prints instead of a full SELL, and the core tranche is never trimmed β€” a single remaining tranche always exits via a full SELL.
  8. Adds are earned. Pass: every green "P1"/"P2" triangle sits above the previous tranche's entry, above the 21 EMA, and at least 1.5 ATRs above that entry, and only after the score dipped below the buy threshold and re-crossed it. Set Earn-the-add to 0 β†’ more P1/P2 markers; back to 1.5 β†’ they revert exactly.
  9. Campaign accounting. Read the "Model Backtest" cell. Pass: the trade count n equals the number of completed campaigns visible, not the number of markers β€” a campaign with two adds and one trim counts as one trade, and the win rate reads a real percentage.
  10. Exit labels by entry class. Pass: a campaign opened by TREND BUY closes with an orange-red "TREND SELL"; one opened by CAP BUY closes with a deep-red "CAP SELL"; a score entry closes with the standard red "SELL". Exactly one sell label per exit bar.
  11. Inverse-asset banner absent on ordinary stocks. Pass: no orange "Defensive/Inverse Asset Detected" banner on AAPL, META, or on defensive-sector names such as NYSE:JNJ and NYSE:PG (which the corrected sector taxonomy now matches, but which fail the inverse-correlation test). Pass: it does appear on a genuinely inverse instrument such as AMEX:GLD or a short/inverse ETF.
  12. Campaign Mode off restores classic behavior. Untick Enable Campaign Mode. Pass: all P1/P2/S1/S2 markers vanish, every exit renders as the plain red "SELL", and each cycle is one entry and one exit.
  13. Each new entry class off restores prior behavior. Untick TREND BUY, then Capitulation BUY. Pass: the lime and teal triangles disappear respectively and no other marker moves.
  14. Confirm on close. Switch Confirm on close on during live hours. Pass: the BUY/SELL state stops changing mid-bar and only updates when the bar closes. Switch it off: Pass: prior intrabar behavior returns.
  15. Risk-Off regime. Use bar replay to a VIX β‰₯ 25, thin-breadth window (October 2022 or March 2020). Pass: the regime row reads "Risk-Off" in burnt orange and the displayed buy/sell thresholds are Γ—1.4 / Γ—0.8 versus a neutral-regime bar on the same symbol.
  16. Index sanity. Load AMEX:SPY or a sector ETF in a downtrend. Pass: the score is no longer crushed by a flat βˆ’15 penalty, and the table shows no "NaN" cells.
  17. Weekly timeframe. Switch AAPL to weekly. Pass: the moving-average set switches to the 10/20/40 configuration (no empty 200 EMA), the economic score is populated, and the daily/weekly/monthly level lines all render simultaneously rather than only the last enabled one.

πŸ“‹ Publishing blurb (paste into TradingView release notes)

Signals now alternate strictly: one entry, one exit, no clusters β€” and the first print on any chart is always a buy.

Two new entry classes β€” TREND BUY for stage-2 breakouts the valuation-gated model used to miss, and CAP BUY for the reclaim after a capitulation flush.

Two new structural exits β€” an ATR-extension sell for parabolic blow-offs and a stopping-volume sell for climax distribution bars.

Campaign Mode is now on by default: staged entries, adds earned with ~1R of open gain, and partial trims instead of all-or-nothing exits. Exits are labelled by the entry that opened them.

New Risk-Off regime driven by real VIX and S&P breadth data, plus a Model Backtest row showing win rate, average PnL and trade count.

New "Confirm on close" option for anyone who wants strictly non-repainting signals.

Fixed: the fair-value engine subtracted interest and tax instead of adding them back, and one valuation leg was circular β€” valuations move materially on most symbols.

Fixed: the quality gate and the moderate-regime tiers were comparing against text that never appeared, so neither ever adjusted thresholds. Both are live now.

Fixed: a single missing macro data point could silently suppress every signal on a chart.

Fixed: the Elliott wave module was stuck in a permanent bearish state; indices and ETFs were taking a penalty meant for stocks; and the backtest booked trades at the wrong price.

Fixed: weekly and monthly charts now use the intended moving averages, correctly scaled macro windows, and draw all three level sets instead of just one.

The India-flavoured "FII Sensitive" regime is now "Dollar Sensitive" with US-appropriate guidance β€” update any alerts keyed on the old name.

---

29 July 2026 wave β€” IN Analytics Pro v2.3 Β· US ANALYTICS

_The cheat entry, and the end of frictionless backtest numbers._

⚠️ Behavior changes (read before trusting old signals)

ChangeOld behaviorNew behaviorWhy it matters
Backtest is no longer frictionlessWin rate and average PnL assumed zero costEvery closed trade is charged a full statutory + brokerage + slippage round trip (India β‰ˆ 0.22% + DP + slippage; US β‰ˆ SEC 31 + FINRA TAF + slippage)Win rate and average both drop. On some symbols an average that was positive turns into a losing compounded chain β€” that gap was always there, it just wasn't shown
New "Backtest Risk" rowOnly win% Β· avg Β· nAdds the compounded Γ—multiple, max drawdown, and best/worst single tradeThe Γ—multiple is the honest answer to "what would I have?". (1 + avg)^n is arithmetic and always overstates it β€” the tooltip now prints both side by side so the gap is visible
New CHEAT BUY entry class (ON)Three entry classesFourth class: a Stage-2 advance pulling back into its 40-week (200-day) EMA on dry volumeMore entries, all of them continuation setups with a stop a fraction of an ATR away rather than a base-depth
Campaign trims need confluence (default ON)Either the ATR-extension or the volume-stop factor trimmed a trancheBoth must be live on the same barFar fewer trims. A lone factor on a pyramided campaign (β‰₯2 tranches) now does nothing at all β€” no trim and no full SELL β€” so the core rides to the structural SELL. Set the toggle OFF to restore the old behavior
S1 / S2 relabelled by sequenceS1 = "ATR-extension trim", S2 = "volume-stop trim" β€” cause labels, while P1/P2 were sequence labelsS1 = the campaign's first trim, S2 = every later oneA campaign whose trims were all volume-driven printed S2, S2, S2 and never an S1, and a campaign's very first trim could read "S2". The cause is not lost β€” the hover tooltip names it
"Current PnL%" during a campaign (IN only)Open leg only, gross β€” a campaign that trimmed at +30% could read +5% while actually being +20%, then jump at the final SELLBanked trims plus the open leg, net of costs β€” exactly what the campaign-ending SELL will bookThe live cell and the realized booking can no longer disagree. US already worked this way
"Last 3 PnL%" and "Current PnL%" are netGrossNet of the cost modelConsistently lower, and consistent with the backtest row

πŸ› Fixes

  • S1/S2 were cause labels masquerading as sequence labels (IN only β€” US was already correct). S1 meant "ATR-extension trim" and S2 meant "volume-stop trim", while P1/P2 meant first add / second add. On any name whose trims were volume-driven you would never see an S1 in your life, and the first trim of a campaign could appear as "S2". Now sequential, with the trigger named in the tooltip.
  • Trim tooltip named the wrong witness. The cause lines keyed off the factors' rising edges. In confluence mode a trim fires on the both-active edge, by which point one factor's own edge is already history β€” so the tooltip could report a volume-stop when the extension was the live condition. Both lines now read the level conditions and print together on a confluence trim.

✨ New features

CHEAT BUY β€” the 40-week EMA bounce. Weinstein's continuation entry, and the tightest-stop setup in the model. Fires when a Stage-2 advance pulls all the way back into its 40-week (200-day) EMA. All six conditions required:

  • the bar's low reaches within 0.5 ATR of the MA, and the close doesn't end more than that below it
  • the close sits in the upper half of the bar's range β€” buyers took the MA back the same bar
  • volume ≀ 1.5Γ— the 20-bar average: a dry rest, not distribution
  • the 40-week MA itself is rising over 10 bars
  • a live Stage 2 was read within the last 60 bars β€” beyond that the advance is stale and the touch is just a downtrend passing through
  • relative strength positive (Mansfield on IN, ratio-vs-SPX on US)

It only arms after price has traded β‰₯2 ATRs above the MA, so the setup must come down to the MA out of an advance rather than grinding sideways on it β€” and the arm is consumed on entry, giving exactly one CHEAT BUY per pullback rather than a string of them. Timeframe-aware: 200 bars on daily, 40 on weekly, 10 on monthly.

CHEAT CLOSE β€” the invalidation. Armed only for positions a cheat entry opened (a TREND BUY does not get a 40-week-MA stop). A close below the MA minus 0.75 ATR exits in full, bypassing every churn gate, never as a partial trim β€” a broken 40-week MA invalidates the whole thesis. On IN it also overrides the webhook stop, so a cheat trade routes with the MA stop instead of the generic ATR stop. A cheat position closed by score/extension/volume instead is labelled CHEAT SELL, so a cheat round trip always reads as a pair.

Real-world cost model (new "Backtest Costs" input group).

India (IN Analytics), rates current 29 Jul 2026:

LegSTTStampExchangeSEBIGSTDP
Buy0.100%0.015%0.00297%0.0001%18% on brok+exch+SEBIβ€”
Sell0.100%β€”0.00297%0.0001%18% on brok+exch+SEBIβ‚Ή12.50 + GST

Presets: Dhan delivery (β‚Ή0 brokerage, default) Β· Discount broker (β‚Ή20/order) Β· Custom Β· Off. Round trip β‰ˆ 0.222% + DP + slippage; slippage defaults to 5 bps per side.

US (US ANALYTICS):

ChargeRateSide
SEC Section 310.00206% ($20.60 per million, effective 4 Apr 2026)Sell only
FINRA TAF$0.000166/share, capped $8.30/tradeSell only
Commission$0 retail, or IBKR Pro $0.005/share ($1 min, 1% max)Both
Slippage3 bps defaultBoth

No stamp duty, no transaction tax, no depository charge β€” the US stack is dominated by slippage rather than statute. Note that TAF is per share, so as a percentage it is 0.000166 / price: a $10 ticker pays roughly 40Γ— what a $400 ticker pays in percentage terms. Capital-gains tax is deliberately not modelled β€” it is assessed on your annual net position, not per trade, so folding it in would double-count against losers.

Sell-side levies are charged on exit turnover, so a bigger winner correctly pays more. Campaign trims are netted at their own weight, so a pyramided campaign pays exactly one round trip on committed capital β€” no more, no less.

"Backtest Risk" row. Γ—3.4 Β· maxDD 18.2% Β· best +41% / worst βˆ’12%. The Γ—multiple chains every closed trade in sequence, net of costs. Max drawdown is the deepest peak-to-trough fall of that same curve β€” the pain you would have had to sit through to collect the multiple. Best/worst expose a multiple carried by a single outlier.

"40W EMA / Cheat" row. Distance to the 40-week EMA in ATRs plus live machine state: ARMED / not armed / stage-2 stale / cheat position with its live stop.

Trim-mode toggle. "Trim needs BOTH exit factors (confluence)", default ON. OFF restores either-factor trimming and labels the marker by cause: S[ATR], S[VS], S[A+V]. Alerts and the webhook stay sequence-based in both modes (s1/s2), so flipping a display preference never changes what a downstream router receives.

βš™οΈ Changed defaults

  • Backtest Costs = ON (Dhan delivery on IN, zero-commission retail on US). Set the model to "Off (frictionless)" to reproduce the old numbers exactly.
  • Slippage 5 bps/side (IN), 3 bps/side (US). On IN this is auto-netted against the legacy "Backtest slippage" input, so slippage can never be counted twice.
  • Assumed capital per trade β‚Ή1,00,000 (IN) / $10,000 (US) β€” the only place trade size enters a percentage-based backtest. Set it to what you actually deploy: on a β‚Ή25k trade a β‚Ή15 DP charge is 0.06%, on β‚Ή5L it is 0.003%.
  • CHEAT BUY = ON, Trim confluence = ON.

πŸ§ͺ Test plan (before publishing)

  1. Costs actually bite. Note the Model Backtest cell, then set Cost model to "Off (frictionless)". Pass: the average rises and the cell's suffix flips from "(net)" to "(gross)". Set it back β€” the numbers return exactly.
  2. The compounding gap is visible. Hover Model Backtest. Pass: the tooltip states the naive (1 + avg)^n figure and the real chained Γ—multiple, and they differ. On a symbol with a positive average but a Γ—multiple below 1.0, that is the feature working, not a bug.
  3. Drawdown is real. Pass: Backtest Risk maxDD is > 0 on any symbol with more than a couple of closed trades, and best β‰₯ worst.
  4. Cheat arms and fires. On a Stage-2 name, watch the "40W EMA / Cheat" cell. Pass: it reads ARMED only after price has been β‰₯2 ATRs above the 40W EMA, and a violet CHEAT triangle appears only on a bar whose low reaches the MA band with a close in the upper half of the range on ≀1.5Γ— volume.
  5. One cheat per pullback. Pass: price hugging the MA for several bars produces exactly one CHEAT marker, not one per bar.
  6. Cheat stop works. With a cheat position open, the cell shows "cheat position β€” exit under {level}". Pass: a close below that level prints a violet CHEAT CLOSE, and it fires even inside the min-hold window (structural exits bypass the churn gates).
  7. Every exit has a marker. Scan full history. Pass: every entry marker of any class is followed by exactly one exit label β€” SELL, TREND SELL, CAP SELL, CHEAT SELL or CHEAT CLOSE β€” before the next entry. Zero unlabelled exits.
  8. S1 actually appears. With Campaign Mode ON and the trim toggle OFF, find a campaign with β‰₯2 tranches and two trims. Pass: the first trim is S[ATR] or S[VS] per its cause; toggle confluence ON and Pass: the first trim of a campaign reads S1, never S2.
  9. Confluence really restricts. Toggle ON. Pass: trim markers become markedly rarer, and a bar with only an extension (no volume stop) produces no trim and no SELL while β‰₯2 tranches are open. This is expected β€” confirm you are comfortable with it before leaving it on.
  10. Alerts unchanged by the toggle. Fire an S1 alert in each mode. Pass: the alert fires on the campaign's first trim in both, regardless of which label the chart drew.
  11. Campaign PnL agrees with itself (IN). With a campaign open that has already trimmed. Pass: "Current PnL%" includes the banked trim, and does not jump when the final SELL prints.
  12. Weekly/monthly sanity. Switch to a weekly chart. Pass: the 40W EMA cell still reads sensible values (the length rescales to 40 on weekly, 10 on monthly) and cheat markers remain plausible.

Cheat entry v2 β€” same-day rework (29 Jul, after a live MANINDS review)

The first cut of the cheat entry shipped and was reviewed on a live chart the same day. Two things

were wrong, and both are corrected in the build being published:

Entry was too loose. The arm never expired, so ANY later brush of the 40-week MA could fire β€”

including a sideways chart drifting along the line. It is now a leg state machine: price must trade

clear above the MA (a real advance), the FIRST touch of that leg opens a short bounce window, and

when the window closes the leg is spent. A second visit is not a cheat entry β€” it is the MA failing

as support β€” and the setup must re-arm from a fresh advance. A new stage-banked counter additionally

requires real Stage-2 time before any touch qualifies.

Exit defeated the thesis. A cheat entry is a CONTINUATION trade, but it was being closed by the

ordinary score SELL β€” which only fires once the composite has decayed, long after price has rolled

over. Live review showed cheat trades round-tripping most of their gain. Three fixes:

  • cheat positions are now HELD THROUGH score SELLs entirely (default ON)
  • a chandelier trail releases the trade a fixed ATR distance below the highest high since entry β€”

catching the top of a thrust by construction rather than by the score noticing late

  • a momentum-fade exit closes on a return under the EMA21 while in profit, typically several bars

ahead of the chandelier on a slow fade

  • the stop ratchets to breakeven, then trails the EMA50; it never moves down

Exits are now labelled by OUTCOME: CHEAT TRAIL (green β€” released in profit near the high) versus

CHEAT CLOSE (violet β€” stopped out, the 40-week thesis broke).

Verdict icons on the dashboard rows

Every gate row now carries the verdict inline instead of leaving it to be computed: βœ… supports

acting Β· ⚠️ works with a caveat Β· ❌ do not act Β· βšͺ neutral or too thin Β· ⏳ warming up or held Β·

πŸ”’ held by weekly structure Β· 🎯 live cheat position. Edge is judged on the COMPOUNDED multiple,

never the average; under 20 trades the cell is βšͺ and marked "thin"; a 🎲one-trade tag appears when

a single trade is worth more than half the entire summed edge.

πŸ“‹ Publishing blurb (paste into TradingView release notes)

New CHEAT BUY entry class: a Stage-2 advance pulling back into its 40-week (200-day) EMA on drying volume, with the close reclaiming the average on the same bar. It only arms after price has traded well above the MA, so the setup has to come down to it out of an advance β€” one entry per pullback, not a string of them.

CHEAT CLOSE is its invalidation: a close below the 40-week EMA exits in full and bypasses every hold gate. That is the point of the setup β€” the stop sits at the moving average, a fraction of an ATR away instead of a base-depth below.

The self-backtest is no longer frictionless. Every closed trade is now charged a real round trip β€” STT, stamp duty, exchange and SEBI fees, GST, DP charge and slippage on the India build; SEC Section 31, FINRA TAF and slippage on the US build β€” with presets for zero-brokerage and discount tiers. Sell-side levies are charged on exit turnover, so bigger winners correctly pay more.

New Backtest Risk row: the compounded multiple, the maximum drawdown of that equity curve, and the best and worst single trades. The multiple chains the actual sequence of trades, which is the honest answer to "what would I have?" β€” the average per trade never was, and hovering the row now shows both numbers together so the difference is visible.

Campaign trims can now require confluence: by default a tranche is trimmed only when the ATR-extension and stopping-volume factors are both live on the same bar. Turn it off to restore either-factor trimming, in which case the marker names the cause: S[ATR], S[VS] or S[A+V].

S1 and S2 now mean first trim and later trims, matching P1 and P2. They previously named which factor fired, which meant that on names whose trims were volume-driven an S1 never appeared at all.

Fixed: while a pyramided campaign was open, the current-PnL cell showed only the open leg and ignored partials already banked, so it understated the position and jumped at the final exit.

A cheat trade is now held through ordinary score exits and released by its own trailing stop instead β€” a chandelier a fixed ATR distance below the highest high since entry, a momentum-fade exit on a return under the EMA21 while in profit, and a ratchet to breakeven that never moves down. Exits are labelled CHEAT TRAIL when released in profit and CHEAT CLOSE when stopped out.

Cheat entries only fire on the FIRST touch of the 40-week average after a genuine Stage-2 advance. A later revisit is the average failing as support, not a setup, and must re-arm from a fresh advance.

Dashboard rows now carry a verdict icon so each read is legible without arithmetic.

Recommended: set "Assumed capital per trade" in the Backtest Costs group to the size you actually deploy β€” flat charges like the DP fee are a very different percentage on a small position than a large one.

---

---

30–31 July 2026 wave β€” IN Analytics Pro 3 Β· US ANALYTICS Β· Valuations ++ v5.3

⚠️ Behavior changes (read before trusting old readings)

ChangeEffect
Circular valuation fallbacks removed (IN Γ—3, US Γ—2)Symbols with no usable multiple history previously showed a fabricated fair value β‰ˆ price β†’ ratio 1.00 "fairly valued", and counted as a working method. You will now see some symbols move from 4m to 3m/2m confidence, and some valuations go from a confident number to N/A. That is the fix working β€” a silent wrong answer became a visible gap.
US coverage lossUS has no P/B leg and its P/S leg already contributed 0, so a US symbol with no usable P/E history now rests on EV/EBITDA alone or reports N/A. Real loss of coverage, deliberately accepted.
Classification rebuilt (IN + V++)Weights per company change. Most visible on banks/NBFCs (EV/EBITDA now 0, P/B 0.55) and profitable small-caps (were valued as startups at P/E weight 0.1, now 0.40–0.50).
Multiple sampling is now timeframe-aware (IN)On weekly charts the "3-year" P/E window previously spanned ~14 years. Fair values on weekly charts will shift, in some cases materially.
Volume-stop is location-gatedFewer exits near lows; positions hold longer through post-entry volatility. Winners may exit later than before.
Normalized Scoring ON by default (IN)Score and thresholds move to the Οƒ scale. Entries and exits differ from the raw path. Will not engage below 500 bars β€” ~2y daily but ~10y weekly.
Aggressive mode ON by default (IN + US)CAP BUY may now fire in confirmed downtrends. That is where genuine capitulation reclaims happen, and also where knives are.

πŸ› Fixes

  • Whipsaw on SONACOMS. The volume-stop's location filter had a branch requiring nothing about where price was β€” any red bar taking out the prior high qualified. Five bars after a capitulation-low entry on 3.16Γ— volume it closed a good campaign at +0.78%, forcing a re-entry 23 points higher. Now requires the bar to have traded above the reference EMA.
  • Move hurdle was symmetric. A trade 2 ATR into profit waived its own 10-bar minimum hold and became eligible for an early score exit. Now adverse-only.
  • "Early Stage" misclassification. Every profitable small-cap under β‚Ή5,000 Cr was classified a pre-revenue startup, because size was tested before stability. Found by questioning the label on a sixty-year-old pharma company.
  • Entry @ Price now shows the individual tranche fills beside the blend β€” 417.15 (3t @ 377.70 / 410.20 / 503.10) β€” which explains why a winning campaign can show a modest percentage.
  • CE10235 compile error (if/else return-type mismatch) and CE10117 compiled-token ceiling, both resolved.

✨ New features

Edge by Entry Class (IN + US) β€” splits the same closed campaigns by the class that opened each one:

BUY 52%Β·+28.9%Β·n11   TRD 60%Β·+1.3%Β·n5   CHT 0%Β·-8.4%Β·n1

The pooled backtest cannot tell you which entry path carries the model and which drags it. Read this before tuning any entry filter.

Two new company classes (IN + V++):

  • Lender β€” for a bank or NBFC debt is raw material, not leverage, so EV/EBITDA is meaningless. Weight now 0.00, with P/B at 0.55. Previously every bank got a 0.3–0.6 EV weight.
  • Cyclical β€” P/E inverts across a cycle: lowest at the earnings peak when the stock is most dangerous. De-emphasised, with EV/EBITDA and P/B anchoring. Cyclicals also take the full P/E history window, since a 3–5 year window can sit entirely inside one leg of a cycle.

External fair value bridge (IN ← V++) β€” point IN at Valuations++'s πŸ”— Fair Value (bridge export) plot and IN inherits its percentile bands, winsorized sampling, CV-derived weights and stationarity gate, with no duplicated maths. Default OFF, guarded, silent fallback β€” a free-tier user running IN alone under the 2-indicator cap is never affected.

Auto (Company Type) preset (V++) β€” classifies instead of making you pick Value/Growth/GARP/Income. Wired as a prior, so CV blending still refines it: Auto: Stable Value [CV-blended].

Volume-stop: min bars held (IN + US) β€” -1 = auto by timeframe (monthly 0 / weekly 1 / daily 2 / intraday 6).

βš™οΈ Changed defaults

SettingOldNewScript
Use Normalized ScoringOFFONIN
Normalization lookback200500IN
Aggressive modeOFFONIN + US
Volume-stop: min bars heldβ€”βˆ’1 (auto)IN + US

TradingView keys saved values by title, so charts you have already saved keep their old values. Set these by hand once, then Defaults β†’ Save as Default.

πŸ§ͺ Test plan (before publishing)

  1. SONACOMS daily β€” the spurious second SELL should be gone. Then set volStopMinBars to 0: if it stays gone, the location guard alone is sufficient and you keep the bull-trap exit intact.
  2. PANACEABIO β€” IN and V++ must now agree on company type (Loss-making). If they disagree, one paste didn't take.
  3. Any bank/NBFC β€” confirm the class reads Lender and EV/EBITDA weight is 0. Industry-string matching will miss oddly-named NBFCs.
  4. A profitable β‚Ή2,000–5,000 Cr small-cap β€” must no longer read as a startup; expect Quality Compounder or Steady.
  5. Weekly chart of a 10+ year name β€” fair value will differ from before. That is the sampling fix, not a regression.
  6. A symbol with no earnings history β€” valuation should read N/A, not a confident number.
  7. Bridge β€” enable it, confirm IN's Composite Value matches V++'s median exactly. If it doesn't move, the guard is rejecting the source; re-point at πŸ”— Fair Value (bridge export), not 🎯.
  8. Free-tier simulation β€” remove V++ from the chart with the bridge still enabled. IN must fall back silently with no error.
  9. Edge by Entry Class across 3–5 names before acting on any single reading β€” per-class n is small.
  10. Model Backtest / Backtest Risk before vs after on a few names. Gating the volume-stop means winners exit later; if maxDD worsens materially, trim minHoldBars rather than reverting.

πŸ“‹ Publishing blurb (paste into TradingView release notes)

Fixes and upgrades to the valuation and exit engines.

β€’ Valuation no longer falls back to a price-derived estimate when a stock's own
  multiple history is unusable. Those cases now report N/A with a reduced
  confidence count instead of a fabricated "fairly valued" reading.
β€’ Historical multiples are now sampled at a consistent quarterly cadence on any
  timeframe. Previously a weekly chart sampled every ~14 months, so the
  "3-year" window spanned far more than three years.
β€’ Company classification rebuilt into seven classes, adding Lender (EV/EBITDA
  is meaningless for a bank β€” P/B anchored instead) and Cyclical (P/E inverts
  across a cycle, so it is de-emphasised). Profitable small-caps are no longer
  classified as pre-revenue startups.
β€’ The stopping-volume exit now requires price to have traded above its
  reference average, so it fires on distribution rather than on ordinary
  volatility shortly after an entry.
β€’ The early-exit valve on the minimum-hold gate is now adverse-only: a trade
  running into profit no longer unlocks its own early exit.
β€’ New "Edge by Entry Class" row splits the self-backtest by the entry type that
  opened each campaign.
β€’ Optional external fair-value source, for use alongside Valuations ++.

Defaults changed: normalized scoring on, lookback 500, aggressive mode on.
TradingView keeps saved settings per chart, so existing charts retain their
previous values β€” set them by hand if you want the new behaviour.

πŸ“Œ Known limits carried forward

  • IN Analytics is at ~100,071 of the 100,256 compiled-token ceiling (~185 spare). The next feature requires removing something. Candidates by approximate compiled cost: Eco/Fundamental table ~8,000 Β· Regime table ~3,600 Β· Risk table ~2,100 Β· signal-tooltip subsystem.
  • US has not received the classification rework. It does not carry IN's size-outranks-stability bug (it keys on history depth, which was always right), but it lacks Lender and Cyclical β€” so US banks and commodity names are still mis-weighted. Porting needs a 3-column weight table since US has no P/B leg.
  • Lender detection is industry-string matching and will miss oddly-named NBFCs.
  • IN and V++ can disagree on Cyclical vs Quality β€” V++ measures a true stdev of realised growth, IN only a one-period estimate-vs-actual gap.
  • volStopMinBars has a real cost: a fast bull trap (TREND BUY failing on climax volume within 2 bars) loses its volume-stop exit. 2 on daily / 0 on weekly recommended.
INDICATOR
1 Aug
2026
PRIMAEGIS_RELEASE_NOTES β€” Indicator

Primaegis Pine Suite β€” Release Notes

_Cumulative: 26 July – 1 August 2026 Β· defect fixes, upgrades, the signal-architecture rework, the cheat-entry + real-cost wave, and the v6.2 guidance layer_

How to use: ⚠️ Behavior changes first (what will look different vs your old charts) β†’ πŸ§ͺ Test plan before publishing β†’ πŸ“‹ Publishing blurb to paste into TradingView.

Contents

  1. IN Analytics Pro v2.3 Β· US ANALYTICS
  2. Valuations ++ v5.3 Β· Valuations + PP Screener v4 Β· EOD Screener
  3. Position Planner Pro Β· Wyckoff Pro+ Β· Lock In Expiry Β· Defensive Asset Screener Β· MFMSI Pro
  4. 29 July wave β€” IN Analytics Pro v2.3 Β· US ANALYTICS: CHEAT entry, real-world cost model, Backtest Risk metrics, trim confluence
  5. 31 Jul – 1 Aug wave β€” Valuations ++ v6.2: the guidance layer (850+ concall transcripts, credibility-scored) now blended into the scenario engine AND the fair-value bands; two companion Pine libraries; πŸ”— Fair Value (bridge export) consumed by IN Analytics via Use external fair value (manual wiring, per chart). Full detail: 02_valuations.md.

---

IN Analytics β€” IN Analytics Pro v2.3

_A signal-engine rebuild: one-in-one-out discipline, three entry classes, two structural exits, pyramiding Campaign Mode on by default β€” plus the scoring bugs that were quietly dragging every composite down._

⚠️ Behavior changes (read before trusting old signals)

ChangeOld behaviorNew behaviorWhy it matters
Strict signal alternationSame-side signals could repeat and cluster β€” dozens of SELLs through one advanceExactly one entry and one exit per cycle: no BUY without an intervening SELL, and vice versaMarker counts on historical charts drop sharply; alerts and Dhan webhooks go back to at-most-one signal per side per cycle
Campaign Mode (default ON)One-in, one-out: full position on the entry, full exit on the sellStaged position: entry = tranche 1, P1/P2 adds, S1/S2 partial trims, final SELL closes the campaignThe self-backtest books one blended trade per campaign, not one per marker; position sizing is now tiered
Two new sell triggers (both ON)Exits came only from the score modelBlow-off extension and climax-volume bars also force an exitPositions exit at parabolic tops instead of riding the round trip down; more exits than the old build
Two new entry classes (both ON)Only the valuation-gated score BUYTREND BUY (stage-2 breakout) and CAP BUY (capitulation reclaim) fire independently of the scoreRe-rating rallies and post-flush reversals that the score model structurally could not buy now produce entries
Inverse-asset detection tightenedA mildly negative beta was enough β€” ordinary smallcaps got the "Defensive/Inverse Asset" banner and inverted buy/sell thresholdsAutomatic detection needs genuinely negative correlation and negative betaOrdinary equities stop generating inverted SELL pressure through uptrends; real inverse assets are unaffected
Elliott wave moduleCould never confirm a valid retracement and had no way out of a stuck state β€” a permanent bearish drag on the compositeCorrect retracement band and math, plus a 100-bar timeout back to neutralComposite and combined scores shift upward on trending charts versus historical readings
Missing fundamental dataAbsent cash-flow data scored as "terrible cash conversion" and could trip the fraud penalty; the valuation weight always diluted the denominatorMissing data is treated as missing on both countsFundamental scores rise for data-poor names; the quality table shows "N/A" instead of "NaN%"
Self-backtest pricingBooked at the signal bar's open β€” unknowable when a close-based signal firesBooked at the close, with an optional slippage haircutWin rate and average PnL are honestly lower than the old numbers
Backtest win rateInteger division truncated it to 0% or 100%Real percentagesThe "Model Backtest" cell was effectively meaningless before
TD Sequential contributionLatched for weeks after the setup endedDecays after ~10 bars, clears when counts reset, and shows its ageStale Β±3-weighted TD values no longer sit in the composite
Exchange-rate legThresholds were 100Γ— too small β€” the signal flipped on FX noise and carried half the monetary scoreCorrect percent-scale thresholdsThe exchange signal sits neutral far more often; monetary score shifts toward neutral vs history
Macro windows on weekly/monthly chartsA fixed 60-bar lookback meant 60 weeks (~14 months) on a weekly chartWindow scales with the chart timeframe (~60 calendar days)Economic score and the regime label genuinely differ on weekly passes; daily charts are unchanged
Higher-timeframe moving averagesAveraged chart bars of a stepped HTF seriesTrue EMAs computed inside the higher-timeframe contextHTF alignment and signal confidence read differently
Macro inputs slimmedUS CPI and US GDP fed small legs into the India macro scoreThose two legs removed; the India legs keep their weightsBorderline regime classifications can flip
Webhook JSONFired only on score BUY/SELLFires on all eight events and carries type, confidence, plus fraction and (on sells) entry_class while Campaign Mode is onAny consumer keying only off action is unaffected, but it must be idempotent about the new event types

πŸ› Fixes

  • Elliott wave engine β€” the wave check compared a percentage retracement against a 0.1 threshold (so it only "passed" when the pivot sat above the wave high) and the state machine had no exit β†’ correct 23.6–78.6 retracement band, absolute-value denominators on both impulse and corrective legs, and a 100-bar timeout that resets the state to neutral.
  • Inverse-asset misfire β€” a smallcap's high volatility could push its beta below the trigger even with near-zero correlation, flagging it as an inverse asset and inverting every threshold β†’ automatic detection now requires real negative correlation and negative beta.
  • Missing cash-flow data penalised β€” an absent CFO/net-income figure was scored as a terrible cash-conversion reading and could trigger the fraud penalty β†’ missing is now genuinely missing, and the table cell shows "N/A" instead of "NaN%".
  • Fair-value weighting always diluted β€” the valuation leg entered the denominator even when no method produced a fair value β†’ it now counts only when at least one method worked.
  • Backtest win rate stuck at 0% or 100% β€” integer division β†’ real percentages.
  • Backtest priced at the wrong bar β€” entries and exits were booked at the signal bar's open β†’ now at the close, matching the alert payload.
  • Stale TD Sequential readings β€” the TD signal was set but never reset, holding weeks-old values β†’ decays after ~10 bars and clears when the counts are zero.
  • Exchange-rate thresholds 100Γ— too small β€” percent-scale deviations were compared against 0.02/0.01 β†’ 2.0/1.0.
  • Fraud filter toggle ignored β€” operator precedence let the first branch fire even with the filter switched off β†’ the toggle now gates both branches.
  • Inverse-asset detection self-cancelling β€” the sector test overwrote the manual override and keyword detection β†’ the tests now combine, and the banner names which one fired.
  • Gold keyword over-matched β€” any ticker containing "GOLD" was caught, including ordinary jewellery equities β†’ gold ETFs and futures still match, equities no longer do.
  • Higher-timeframe MAs weren't β€” the 8/21 EMAs averaged chart bars of a stepped weekly series β†’ computed inside the higher-timeframe context.
  • Weekly/monthly macro windows β€” a hardcoded 60-bar lookback became 60 weeks on a weekly chart β†’ the window now scales with the timeframe and is capped so it can't outrun the history buffer.
  • Gold weekly feed drifted intra-week β€” now reads the confirmed prior week; historical values are identical, only live drift is gone.
  • "Stable Value" for companies with no earnings data β€” a missing EPS estimate was read as zero earnings volatility β†’ those names now classify as Undefined and get default valuation weights.
  • Normalization lookback could exceed the script's history buffer β€” now clamped, with the clamp documented in the input tooltip.
  • Stale entry prices β€” a blocked or repeated signal could re-stamp the entry anchor and corrupt the next trade's PnL β†’ every stamp is gated by the position state.

✨ New features

TREND BUY (stage-2 breakout) β€” a valuation-blind structural entry for re-rating rallies the score model can't buy, because a run above stale fair value lifts its own threshold out of reach.

Β· Inputs: TREND BUY (stage-2 breakout) (ON) β€” master toggle Β· Breakout base lookback (bars) (50) β€” the base high the close must clear Β· Breakout volume multiple (Γ— 20-bar avg) (1.5) β€” minimum volume expansion on the breakout bar. Also requires price above a rising long-term MA, positive Mansfield relative strength vs your chosen benchmark, and no active blow-off extension.

Β· What you'll see: a lime "TREND BUY" triangle below the breakout bar.

CAP BUY (capitulation reclaim) β€” buys the reversal after a flush, never the flush itself.

Β· Inputs: Capitulation BUY (ON) Β· ATR flush multiple (4.5) β€” the climax bar's low must be this many ATRs below the reference EMA Β· Volume spike multiple (Γ— 20-bar avg) (3.0) Β· Reclaim window (bars) (3) β€” bars allowed for the reclaim after the climax Β· Aggressive mode (OFF) β€” when off, no capitulation buys while price is under a falling long-term MA.

Β· What you'll see: a teal "CAP BUY" triangle 1–3 bars after the flush bar, on the bar that closes back above the flush bar's midpoint.

ATR Extension Sell (sell factor A) β€” exits parabolic blow-offs.

Β· Inputs: ATR Extension Sell (factor A) (ON) Β· ATR extension multiple (5.0, typical 4–7, up to 10 for high-momentum names) Β· Extension reference MA length (EMA) (21).

Β· What you'll see: a SELL when the close stretches more than 5 ATRs above the 21 EMA β€” and, while flat, the info table reads "Sell" so a fresh buy can't chase the same parabola.

Volume Stop Sell (sell factor B) β€” classic stopping-volume / distribution exit.

Β· Inputs: Volume Stop Sell (factor B) (ON) Β· Volume spike multiple (Γ— 20-bar avg) (3.0).

Β· What you'll see: a SELL on a huge-volume bar that closes in the lower half of its range after an advance, or on a spike-and-fail reversal bar.

Campaign Mode (pyramiding tiers) β€” position-level pyramiding per the house doctrine: adds are half the initial size, earned at roughly +1R, maximum two adds, never below entry.

Β· Inputs: Enable Campaign Mode (ON) Β· Tranche 1 % (initial BUY / CAP BUY) (50) Β· Tranche 2 % (P1 add) (25) Β· Tranche 3 % (P2 add) (25) Β· Earn-the-add: min open gain (ATRs) (1.5) β€” an add needs this much open gain above the last tranche's entry.

Β· What you'll see: small green "P1"/"P2" triangles on adds; small orange "S1" (extension trim) and "S2" (volume-stop trim) triangles on partial exits; the final SELL closes the campaign, and the Model Backtest row counts the whole campaign as one blended trade.

Entry-class exit labels β€” the exit now tells you which entry it is closing.

Β· What you'll see: red "SELL" for score entries, orange-red "TREND SELL" for a campaign opened by TREND BUY, deep-red "CAP SELL" for one opened by CAP BUY. Exactly one label per exit.

Alert and webhook upgrades β€” eight alert conditions: BUY, TREND BUY, CAP BUY, SELL, and campaign P1 ADD / P2 ADD / S1 TRIM / S2 TRIM.

Β· What you'll see: the webhook JSON now carries type on every emission (buy/trend_buy/cap_buy/sell/p1/p2/s1/s2), confidence, plus fraction (the tranche % involved) and entry_class on sells whenever Campaign Mode is on.

Backtest slippage β€” Backtest slippage (bps per side) (0.0). Applies an adverse fill to every tracked entry and exit; at the default of 0 nothing changes.

Reset signal state β€” Reset signal state (OFF). Tick once to force the alternation machine back to flat after a manual exit, then untick.

Inverse-asset reason β€” the orange banner now reads "Defensive/Inverse Asset Detected (…)" naming what triggered it: manual override, ticker keyword, defensive sector, negative correlation, or negative beta.

TD age tag β€” the TD Seq row appends "Β· n bars ago" whenever the reading isn't from the current bar.

βš™οΈ Changed defaults

InputOldNewEffect
Enable Campaign Moden/a β€” new (built OFF, shipped ON)ONP1/P2 adds and S1/S2 partial trims are live out of the box; the backtest books one blended trade per campaign
TREND BUY (stage-2 breakout)n/a β€” newONlime breakout entries fire independently of valuation
Capitulation BUYn/a β€” newONteal reclaim entries fire after flushes
Aggressive mode (CAP BUY)n/a β€” newOFFno capitulation buys under a falling long-term MA
ATR Extension Sell (factor A)n/a β€” newONadds blow-off exits
Volume Stop Sell (factor B)n/a β€” newONadds climax-volume exits
Earn-the-add: min open gain (ATRs)n/a β€” new1.5adds must show ~1R of open gain
Backtest slippage (bps per side)n/a β€” new0.0stats unchanged until you raise it
Reset signal staten/a β€” newOFFinert until ticked

Saved chart instances: TradingView keys saved inputs by title, so every chart copy you already have keeps its stored values for inputs whose titles existed before β€” Enable Probable Fraud filter, Confirm signals on bar close, Use Normalized Scoring (v4), RS / Correlation Benchmark and the rest are untouched. Every input in the table above is new, so no saved instance has a stored value for it: old and new chart copies alike pick up these defaults, including Campaign Mode ON. No existing input was renamed, precisely so nothing silently resets.

Internal thresholds also changed (not user inputs): the Elliott retracement band (0.1 β†’ 23.6–78.6), the exchange-rate signal thresholds (0.02/0.01 β†’ 2.0/1.0), and the macro change window (fixed 60 bars β†’ timeframe-scaled).

πŸ§ͺ Test plan (before publishing)

Reference symbol: NSE:INDSWFTLAB, daily β€” a +130% re-rating with a 2025 capitulation, and the chart that surfaced the hotfix wave.

  1. Alternation. Scan the full visible history on INDSWFTLAB. Pass: every entry marker (BUY / TREND BUY / CAP BUY) is followed by exactly one exit label before the next entry of any class β€” zero instances of two entries or two exits in a row anywhere on the chart.
  2. TREND BUY fires where expected. During the β‚Ή124β†’237 advance. Pass: at least one lime "TREND BUY" triangle sits on a bar whose close crosses above the highest high of the prior 50 bars, on volume β‰₯ 1.5Γ— the 20-bar average, with price above a rising long-term MA.
  3. CAP BUY fires where expected. At the 2025 capitulation. Pass: a teal "CAP BUY" triangle appears within 3 bars after a bar whose low is β‰₯ 4.5 ATRs below the 21 EMA on β‰₯ 3Γ— average volume β€” and never on the flush bar itself.
  4. CAP BUY stage guard. Leave Aggressive mode OFF. Pass: no CAP BUY prints while price is below a falling long-term MA. Tick it on: at least one extra CAP BUY appears in a Stage-4 stretch. Untick to restore.
  5. Sell factor A. Find a bar where close exceeds the 21 EMA by more than 5 ATRs while a position is open. Pass: a SELL prints there. Untick ATR Extension Sell (factor A): Pass: that SELL disappears and the position runs on to the next model exit.
  6. Sell factor B. Find a bar with volume β‰₯ 3Γ— the 20-bar average closing in the lower half of its range after an advance. Pass: a SELL prints. Untick Volume Stop Sell (factor B): Pass: it disappears.
  7. Partial-exit labels. With Campaign Mode ON and at least two tranches open, re-run the factor-A/B conditions. Pass: a small orange "S1" (extension) or "S2" (volume stop) triangle prints instead of a full SELL, at most one per bar, and a multi-bar extension trims only once β€” the last remaining tranche always exits via a full SELL, never a trim.
  8. Adds are earned. Pass: every green "P1"/"P2" triangle sits above the previous tranche's entry price, above the 21 EMA, and at least 1.5 ATRs above that entry. Set Earn-the-add to 0 β†’ more P1/P2 markers appear; set it back to 1.5 β†’ they revert exactly.
  9. Campaign accounting. Read the "Model Backtest" cell. Pass: the trade count n equals the number of completed BUY→SELL campaigns visible, not the number of entry markers — a campaign with two adds and one trim still counts as one trade, and the win rate is some value other than 0% or 100%.
  10. Exit labels by entry class. Pass: a campaign opened by TREND BUY closes with an orange-red "TREND SELL"; one opened by CAP BUY closes with a deep-red "CAP SELL"; a score entry closes with the standard red "SELL". Exactly one sell label per exit bar.
  11. Inverse-asset banner absent on ordinary stocks. Pass: no orange "Defensive/Inverse Asset Detected" banner on INDSWFTLAB, on a large-cap such as NSE:RELIANCE, or on NSE:GOLDIAM (a jewellery equity, previously caught by the GOLD keyword). Pass: the banner does still appear, with a reason in brackets, on NSE:GOLDBEES and on MCX gold futures.
  12. Campaign Mode off restores classic behavior. Untick Enable Campaign Mode. Pass: all P1/P2/S1/S2 markers vanish, every exit renders as the plain red "SELL", and each cycle is exactly one entry and one exit.
  13. Each new entry class off restores prior behavior. Untick TREND BUY, then Capitulation BUY. Pass: the lime and teal triangles disappear respectively and no other marker moves.
  14. Alerts and webhook payload. Create all eight alert conditions and let one fire. Pass: the JSON contains a type field matching the event, a confidence value, a fraction field while Campaign Mode is on, and β€” on a sell β€” an entry_class naming the class that opened the campaign.
  15. Reset hatch. Tick Reset signal state for one bar, then untick. Pass: the machine returns to flat and the next entry of any class can fire immediately.
  16. TD age tag. Pass: the TD Seq row shows "Β· n bars ago" when the reading is stale, and shows no tag on a bar where a TD label prints on the chart.

πŸ“‹ Publishing blurb (paste into TradingView release notes)

Signals now alternate strictly: one entry, one exit, no clusters.

Two new entry classes β€” TREND BUY catches stage-2 breakouts that the valuation-gated model used to miss, and CAP BUY buys the reclaim after a capitulation flush (never the flush itself).

Two new structural exits β€” an ATR-extension sell for parabolic blow-offs and a stopping-volume sell for climax distribution bars.

Campaign Mode is now on by default: the entry opens tranche 1, P1/P2 adds are earned with ~1R of open gain, and S1/S2 trim partial tranches instead of dumping the whole position.

Exits are labelled by the entry that opened them: SELL, TREND SELL or CAP SELL.

Eight alert conditions, and the webhook payload now carries the event type, confidence, tranche fraction and entry class.

Fixed: the Elliott wave module was stuck in a permanent bearish state and dragging every composite score down.

Fixed: companies with missing cash-flow or earnings data were being scored as if the data were bad rather than absent.

Fixed: ordinary stocks were sometimes flagged as inverse/defensive assets, which silently inverted their buy and sell thresholds.

Fixed: the backtest booked trades at the wrong price and its win rate could only ever read 0% or 100%.

Fixed: TD Sequential readings latched for weeks, exchange-rate signals flipped on noise, and macro windows on weekly charts covered 14 months instead of two.

Recommended: re-validate any alert thresholds against replay before comparing new readings with old ones.

---

US Analytics β€” US ANALYTICS

_The India-sibling fix set finally ported, a valuation engine that stops fighting itself, and the same one-in-one-out signal machine with three entry classes, two structural exits and Campaign Mode._

⚠️ Behavior changes (read before trusting old signals)

ChangeOld behaviorNew behaviorWhy it matters
Strict signal alternationThe old latch allowed a first-signal SELL and repeated same-side printsStarts flat: the first print is always a BUY, and every SELL requires an open BUYHistorical marker counts fall and backtest trades are segmented into complete round trips
Campaign Mode (default ON)One-in, one-outEntry = tranche 1, P1/P2 adds, S1/S2 partial trims, final SELL closes the campaignThe backtest books one blended trade per campaign; position sizing is tiered
Two new sell triggers (both ON)Exits came only from the score modelBlow-off extension and climax-volume bars also force an exitExits at parabolic tops instead of round trips; more exits than before
Two new entry classes (both ON)Only the valuation-gated score BUYTREND BUY (stage-2 breakout) and CAP BUY (capitulation reclaim) fire independently of the scoreStage-2 rallies and post-crash reversals now produce entries
Fair value recalculatedThe EBITDA estimate subtracted interest and tax instead of adding them back, and the P/S leg was circular β€” it collapsed to roughly the current priceSign corrected; the circular P/S leg is disabled and the remaining legs renormalizeComposite fair value, projected ROI, valuation rating and long-term valuation impulses all move materially on most symbols
Quality gate is live for the first timeThe easing/penalty tests compared against strings the engine never emitted, so quality never adjusted thresholdsStrings alignedHigh-quality names get eased buy thresholds; weak ones get harder buys and easier sells β€” expect more buys on quality, earlier exits on junk
Moderate regime tiers are liveA "Moderately"/"Moderate" string mismatch meant moderate regimes never adjusted anythingFixedModerate expansionary/contractionary regimes now shift thresholds as designed
Elliott wave modulePermanent bearish latch, same deadlock as the India siblingCorrect retracement band and a 100-bar staleness resetComposite scores rise on long-history charts that had a stalled wave state
Macro score could kill all signalsA young chart or one failed macro symbol NaN'd the composite β€” no signals ever, NaN tableMissing legs contribute zeroSymbols that produced nothing at all now produce signals
Exchange leg and trend weight wired inThe exchange weight and its Dollar-Sensitive boost fed nothing; the trend weight was hardcodedBoth feed the composite through named weightsComposite shifts by roughly Β±0.5, up to Β±2.5 in the Dollar-Sensitive regime
Index/ETF penalty removedIndices and ETFs took a blanket βˆ’15 for trading below their 200 EMAThe penalty is restricted to actual stocksIndex charts score materially higher in downtrends β€” buy signals are possible where none could fire
New Risk-Off regimeVolatile, thin-breadth markets fell into High Volatility / ChoppyA dedicated Risk-Off regime when VIX β‰₯ 25 and S&P breadth < 40Buy thresholds Γ—1.4, sell thresholds Γ—0.8, and a different weight mix in those conditions
"FII Sensitive" renamed "Dollar Sensitive"India-derived regime name and advice text ("Monitor USD/INR", "FII holdings")US-appropriate name, regime row and adviceTrigger, weights and thresholds are unchanged, but any alert or screenshot keyed on the old string no longer matches
Defensive-sector detectionSector names never matched TradingView's taxonomy and the correlation test had the wrong sign, so only Utilities ever fired β€” and the sector test overwrote the manual overrideCorrect sectors, correct sign, override preservedStaples/healthcare names with genuinely inverse correlation now flip to inverse-asset threshold logic
Higher-timeframe trendStepped for one chart bar per HTF period and flipped intrabar with the developing barDerived from confirmed HTF closesHTF alignment and signal confidence stop flickering; historical values differ from before
Backtest pricingBooked at the signal bar's openBooked at the closeWin rate and average PnL are honestly lower
Weekly/monthly chartsMacro deltas and P/E-history sampling used 60 chart bars β€” 60 weeks on a weekly chartBoth normalized to ~60 trading days on every timeframeEconomic score and median P/E change on non-daily charts; daily is unchanged

πŸ› Fixes

  • EBITDA estimate sign error β€” interest and tax were subtracted from net income instead of added back, understating every EV-based fair value β†’ corrected.
  • P/S fair value was circular β€” forward revenue per share Γ— forward P/S collapses to roughly the current price by identity, dragging the composite toward the market β†’ the leg is disabled and P/E and EV/EBITDA renormalize cleanly.
  • Macro score could NaN out every signal β€” a young chart or one failed macro symbol poisoned the composite so nothing ever fired β†’ missing legs now contribute zero.
  • Quality gate never matched β€” the easing and penalty branches tested for strings the engine never produces, so quality-based threshold adjustment was dead code β†’ strings aligned on both the engine and the display table.
  • Moderate regime tiers never adjusted thresholds β€” a "Moderately" vs "Moderate" mismatch β†’ fixed at both consumer sites.
  • Elliott wave engine β€” the same deadlock as the India sibling: an inverted retracement test and no state timeout β†’ correct 23.6–78.6 band, absolute-value denominators, and a reset after 100 bars without a wave event.
  • Gold score compared dollars against percent thresholds β€” saturated at Β±2 on week boundaries and 0 elsewhere β†’ percent change with a zero guard.
  • Weekly/monthly EMA switch was dead code β€” the timeframe-adaptive assignments created local shadows, so weekly-and-above charts fell back to an empty 200 EMA β†’ they now use the intended 10/20/40 set.
  • Stale TD Sequential β€” the counts reset but the signal never did β†’ TD contribution is event-scoped again.
  • Backtest priced at the wrong bar β€” entries and exits booked at the signal bar's open β†’ now at the close.
  • Fraud filter toggle ignored β€” operator precedence let the first branch fire regardless of the toggle β†’ fully gated.
  • Blanket βˆ’15 penalty on indices and ETFs β€” a below-200-EMA penalty that dwarfed every sub-model β†’ restricted to actual stocks, with an explicit guard for young charts.
  • Exchange weight fed nothing β€” the exchange signal and its regime boost adjusted a weight that never reached the composite β†’ wired in; the hardcoded trend weight is now a named weight of the same value.
  • Fair-value weighting always diluted β€” the valuation leg entered the denominator even with no valuation data β†’ it now joins only when a fair value actually exists.
  • Defensive-sector detection never fired β€” the sector names weren't TradingView's, the correlation test looked for weak positive correlation instead of inverse, and the branch stomped the manual override β†’ all three corrected.
  • Orphaned risk lines β€” stop and target lines persisted after a Buyβ†’Sell flip or after switching the display off β†’ the inactive side is cleared every bar.
  • Spread change showed "NaN %" β€” a value was being passed where a lookback length was expected β†’ manual, guarded percent change; the table shows "N/A" when there's no data.
  • Elliott table label was stale β€” seven label assignments created local shadows β†’ the cell now shows the true latest wave.
  • Higher-timeframe trend flipped intrabar β€” it stepped once per HTF period then flickered with the developing bar β†’ derived from confirmed HTF closes.
  • Daily/weekly/monthly levels overwrote each other β€” the three level blocks shared one set of line handles, so only the last enabled timeframe drew β†’ separate handles per timeframe, and the period-open line (created but never positioned) is now drawn in yellow.
  • Macro and P/E windows not timeframe-normalized β€” 60 chart bars meant 60 weeks on a weekly chart, starving the P/E median β†’ both use a ~60-trading-day window on every timeframe.

✨ New features

TREND BUY (stage-2 breakout) β€” a valuation-blind structural entry for the rallies the score model can't buy once a run above stale fair value lifts its own threshold.

Β· Inputs: TREND BUY (stage-2 breakout) (ON) Β· Breakout base lookback (bars) (50) β€” the prior-bar high the close must clear Β· Breakout volume multiple (Γ— 20-bar avg) (1.5). Also requires price above a rising long-term MA, relative strength versus the S&P rising over the base, and no active blow-off extension.

Β· What you'll see: a lime "TREND BUY" triangle below the breakout bar.

CAP BUY (capitulation reclaim) β€” buys the reversal after a flush, never the flush itself.

Β· Inputs: Capitulation BUY (ON) Β· ATR flush multiple (4.5) Β· Volume spike multiple (Γ— 20-bar avg) (3.0) Β· Reclaim window (bars) (3) Β· Aggressive mode (OFF) β€” when off, no capitulation buys while price is under a falling long-term MA.

Β· What you'll see: a teal "CAP BUY" triangle 1–3 bars after the flush, on the bar that closes back above the flush bar's midpoint.

ATR Extension Sell (sell factor A) β€” exits parabolic blow-offs.

Β· Inputs: ATR Extension Sell (factor A) (ON) Β· ATR extension multiple (5.0) Β· Extension reference MA length (EMA) (21).

Β· What you'll see: a SELL when the close stretches more than 5 ATRs above the 21 EMA; while flat, the Model Score cell reads the pinned value so a fresh buy can't chase the same parabola.

Volume Stop Sell (sell factor B) β€” classic stopping-volume exit.

Β· Inputs: Volume Stop Sell (factor B) (ON) Β· Volume spike multiple (Γ— 20-bar avg) (3.0).

Β· What you'll see: a SELL on a huge-volume bar closing in the lower half of its range after an advance, or on a spike-and-fail reversal bar.

Campaign Mode (pyramiding tiers) β€” adds are half the initial size, earned at roughly +1R, maximum two adds, never below entry.

Β· Inputs: Enable Campaign Mode (pyramiding tiers) (ON) Β· Tranche 1 size (%) (50) Β· Tranche 2 size (%) (25) Β· Tranche 3 size (%) (25) β€” normalized to their sum Β· Earn-the-add: min open gain (ATRs) (1.5).

Β· What you'll see: small green "P1"/"P2" triangles on adds; small orange "S1" (first trim of the campaign) and "S2" (second trim) triangles on partial exits; one blended trade per campaign in the backtest row. Visual and backtest only β€” this script has no alerts or webhooks.

Entry-class exit labels β€” red "SELL" for score entries, orange-red "TREND SELL" for a campaign opened by TREND BUY, deep-red "CAP SELL" for one opened by CAP BUY. Exactly one label per exit.

Risk-Off regime β€” automatic, no input: triggers when VIX β‰₯ 25 and S&P 500 breadth (percent above 200-day) is below 40, and outranks every regime except Strong Downtrend and Recession Warning.

Β· What you'll see: a burnt-orange regime row with its own advice text; buy thresholds Γ—1.4, sell thresholds Γ—0.8, higher weight on relative volume and monetary factors.

Model Backtest row β€” a new table row reading NN% W Β· avg N.N% Β· nNN: win rate, average PnL per closed model signal and the trade count over the visible history.

Confirm on close β€” Confirm on close (OFF, Signal Filters group). When on, buy and sell signals only change on confirmed bars β€” no intrabar repainting. Default off preserves the previous behavior exactly.

Reset signal state β€” Reset signal state (OFF). Tick once to force the alternation machine flat after a manual exit, then untick.

βš™οΈ Changed defaults

InputOldNewEffect
Enable Campaign Mode (pyramiding tiers)n/a β€” new (built OFF, shipped ON)ONP1/P2 adds and S1/S2 partial trims are live out of the box; one blended trade per campaign in the backtest
TREND BUY (stage-2 breakout)n/a β€” newONlime breakout entries fire independently of valuation
Capitulation BUYn/a β€” newONteal reclaim entries fire after flushes
Aggressive mode (CAP BUY)n/a β€” newOFFno capitulation buys under a falling long-term MA
ATR Extension Sell (factor A)n/a β€” newONadds blow-off exits
Volume Stop Sell (factor B)n/a β€” newONadds climax-volume exits
Earn-the-add: min open gain (ATRs)n/a β€” new1.5adds must show ~1R of open gain
Confirm on closen/a β€” newOFFprevious (repainting) behavior preserved until you switch it on
Reset signal staten/a β€” newOFFinert until ticked

Saved chart instances: TradingView keys saved inputs by title, so every chart copy you already have keeps its stored values for inputs whose titles existed before β€” Enable Probable Fraud filter, Track PnL Mode, Manual Override for Inverse Asset and the rest are untouched. All the inputs above are new, so no saved instance has a stored value for them: old and new chart copies alike pick up these defaults, including Campaign Mode ON. No existing input was renamed.

Internal changes with no input attached: the P/S fair-value leg is zeroed, the Elliott retracement band moves from 0.1 to 23.6–78.6, the macro and P/E-history windows become timeframe-normalized, and the "FII Sensitive" regime string becomes "Dollar Sensitive".

πŸ§ͺ Test plan (before publishing)

Reference symbols: NASDAQ:AAPL, daily (liquid large-cap, clean baseline) and NASDAQ:META, daily (the 2022 drawdown and capitulation, then the 2023 stage-2 re-rating). NASDAQ:NVDA is useful for the extension exit.

  1. Alternation. Scan the full history on AAPL and META. Pass: the first print on each chart is an entry, never a SELL; every entry marker is followed by exactly one exit label before the next entry of any class β€” no two entries or two exits in a row.
  2. TREND BUY fires where expected. META through the 2023 recovery. Pass: at least one lime "TREND BUY" triangle on a bar whose close crosses above the highest high of the prior 50 bars, on volume β‰₯ 1.5Γ— the 20-bar average, with price above a rising long-term MA.
  3. CAP BUY fires where expected. META at the late-2022 low. Pass: a teal "CAP BUY" triangle within 3 bars after a bar whose low is β‰₯ 4.5 ATRs below the 21 EMA on β‰₯ 3Γ— average volume β€” never on the flush bar itself.
  4. CAP BUY stage guard. Leave Aggressive mode OFF. Pass: no CAP BUY prints during the 2022 decline while price is below a falling long-term MA. Tick it on: at least one extra CAP BUY appears in that stretch. Untick to restore.
  5. Sell factor A. NVDA, or any bar where close exceeds the 21 EMA by more than 5 ATRs while a position is open. Pass: a SELL prints there. Untick ATR Extension Sell (factor A): Pass: that SELL disappears and the position runs on.
  6. Sell factor B. Find a bar with volume β‰₯ 3Γ— the 20-bar average closing in the lower half of its range after an advance. Pass: a SELL prints. Untick Volume Stop Sell (factor B): Pass: it disappears.
  7. Partial-exit labels. With Campaign Mode ON and at least two tranches open, re-run the factor-A/B conditions. Pass: a small orange "S1" (first trim) or "S2" (second trim) triangle prints instead of a full SELL, and the core tranche is never trimmed β€” a single remaining tranche always exits via a full SELL.
  8. Adds are earned. Pass: every green "P1"/"P2" triangle sits above the previous tranche's entry, above the 21 EMA, and at least 1.5 ATRs above that entry, and only after the score dipped below the buy threshold and re-crossed it. Set Earn-the-add to 0 β†’ more P1/P2 markers; back to 1.5 β†’ they revert exactly.
  9. Campaign accounting. Read the "Model Backtest" cell. Pass: the trade count n equals the number of completed campaigns visible, not the number of markers β€” a campaign with two adds and one trim counts as one trade, and the win rate reads a real percentage.
  10. Exit labels by entry class. Pass: a campaign opened by TREND BUY closes with an orange-red "TREND SELL"; one opened by CAP BUY closes with a deep-red "CAP SELL"; a score entry closes with the standard red "SELL". Exactly one sell label per exit bar.
  11. Inverse-asset banner absent on ordinary stocks. Pass: no orange "Defensive/Inverse Asset Detected" banner on AAPL, META, or on defensive-sector names such as NYSE:JNJ and NYSE:PG (which the corrected sector taxonomy now matches, but which fail the inverse-correlation test). Pass: it does appear on a genuinely inverse instrument such as AMEX:GLD or a short/inverse ETF.
  12. Campaign Mode off restores classic behavior. Untick Enable Campaign Mode. Pass: all P1/P2/S1/S2 markers vanish, every exit renders as the plain red "SELL", and each cycle is one entry and one exit.
  13. Each new entry class off restores prior behavior. Untick TREND BUY, then Capitulation BUY. Pass: the lime and teal triangles disappear respectively and no other marker moves.
  14. Confirm on close. Switch Confirm on close on during live hours. Pass: the BUY/SELL state stops changing mid-bar and only updates when the bar closes. Switch it off: Pass: prior intrabar behavior returns.
  15. Risk-Off regime. Use bar replay to a VIX β‰₯ 25, thin-breadth window (October 2022 or March 2020). Pass: the regime row reads "Risk-Off" in burnt orange and the displayed buy/sell thresholds are Γ—1.4 / Γ—0.8 versus a neutral-regime bar on the same symbol.
  16. Index sanity. Load AMEX:SPY or a sector ETF in a downtrend. Pass: the score is no longer crushed by a flat βˆ’15 penalty, and the table shows no "NaN" cells.
  17. Weekly timeframe. Switch AAPL to weekly. Pass: the moving-average set switches to the 10/20/40 configuration (no empty 200 EMA), the economic score is populated, and the daily/weekly/monthly level lines all render simultaneously rather than only the last enabled one.

πŸ“‹ Publishing blurb (paste into TradingView release notes)

Signals now alternate strictly: one entry, one exit, no clusters β€” and the first print on any chart is always a buy.

Two new entry classes β€” TREND BUY for stage-2 breakouts the valuation-gated model used to miss, and CAP BUY for the reclaim after a capitulation flush.

Two new structural exits β€” an ATR-extension sell for parabolic blow-offs and a stopping-volume sell for climax distribution bars.

Campaign Mode is now on by default: staged entries, adds earned with ~1R of open gain, and partial trims instead of all-or-nothing exits. Exits are labelled by the entry that opened them.

New Risk-Off regime driven by real VIX and S&P breadth data, plus a Model Backtest row showing win rate, average PnL and trade count.

New "Confirm on close" option for anyone who wants strictly non-repainting signals.

Fixed: the fair-value engine subtracted interest and tax instead of adding them back, and one valuation leg was circular β€” valuations move materially on most symbols.

Fixed: the quality gate and the moderate-regime tiers were comparing against text that never appeared, so neither ever adjusted thresholds. Both are live now.

Fixed: a single missing macro data point could silently suppress every signal on a chart.

Fixed: the Elliott wave module was stuck in a permanent bearish state; indices and ETFs were taking a penalty meant for stocks; and the backtest booked trades at the wrong price.

Fixed: weekly and monthly charts now use the intended moving averages, correctly scaled macro windows, and draw all three level sets instead of just one.

The India-flavoured "FII Sensitive" regime is now "Dollar Sensitive" with US-appropriate guidance β€” update any alerts keyed on the old name.

---

πŸ’° Valuations ++ v5.3 β€” Valuations ++ Dev

_A correctness release: no-analyst-coverage names stop being punished, the EV leg stops being stale, the fair-value bands stop collapsing into one line, and the level lines/labels are finally yours to style._

⚠️ Behavior changes (read before trusting old readings)

ChangeOldNewWhy it matters
Fair-value band samplingExtreme multiples were dropped by hard cutoffs (PE < 500 etc.), so bands froze at the cutoffSamples are winsorized in, clamped to an expandable envelope (rolling 1st/99th percentile Γ·/Γ— 1.25); only 10Γ— sanity ceilings drop data (PE 5000, PS 1000, PB 500, EV 1000)Low/Med/High bands, z-scores and CV weights move on high-multiple and crash-history names. Bands now widen with a genuine re-rating instead of freezing. Min/Max band mode shifts most.
EV/EBITDA history legQuarterly-stepped from reported FQ enterprise valueMarked daily as close Γ— shares out + net debtEV's variability was structurally understated, so the inverse-CV blend systematically overweighted the stalest leg. hist-EV bands, the EV fair-value leg and the composite bands all shift as the new history accumulates.
Displayed EV/EBITDA, its z-score and EV exit multiplesReported FQ enterprise valueSame live-price construction as the history legThe printed ratio jumps versus the old quarterly-step reading on any symbol with a stale FQ EV.
Beat/miss tracking with zero analyst coverageCounted as a miss every quarter β†’ ~30% growth haircut, βˆ’10 momentum points, red Track Record cellsNeutral: 1.0Γ— growth multiplier, 0 beat bonus, βšͺ icons, neutral cellUncovered names (most NSE SMEs) had their scenario targets, momentum and composite score dragged down for having no data. Those readings rise.
Interest-coverage quality pointReported-zero interest (debt-free, the best case) scored 0/2, while missing interest scored 2/2Zero interest scores 2.0; interest present with missing EBITDA is treated as missing (neutral)Debt-free companies gain quality score; the inversion is gone.
Quality score with missing inputsMissing ROE/D-E/Current-Ratio/FCF/OpMargin = 0/2 penalty, working capital = 1/2, interest = 2/2 bonusEvery missing factor reads neutral and is excluded; the score is renormalised over the factors actually presentQuality β€” and the composite score and scenario probabilities built on it β€” moves toward neutral for sparsely covered names instead of arbitrary.
Scenario growth driversPS, PB and EV legs all grew on EPS-derived growthPS and EV grow on sales growth (EV grows EBITDA sales-linked); PB grows on sustainable growth = ROE Γ— (1 βˆ’ payout)Scenario price targets shift for any symbol whose primary multiple is PS, PB or EV. Margin-expansion stories come down; high-retention compounders' PB targets move. PE-primary symbols are unchanged.
Quality ROE sourceFY ROEFQ ROE β†’ FY ROE β†’ computed NI(TTM) / total equity (FQ)Quality moves wherever the fresh quarterly ROE differs from the annual figure.

πŸ› Fixes

  • Fair-value bands collapsed to a single line on any re-rated stock. The new winsorizer was a one-way ratchet β€” it could only shrink the sample range, never extend it β€” so a 5-year window degenerated toward a constant and Low = Fair = High. Fixed with an expandable envelope; a simulated 18β†’55 PE re-rating goes from 0.0% band width back to the correct ~57%.
  • The band labels looked "missing". They were never dropped from the code β€” all three sat at the same price and the same bar and rendered as one. The label x-offsets are now staggered so co-located levels can't stack.
  • A collapsed band leg hijacked the blend. Because its variability read as ~zero, the inverse-CV weighting handed the degenerate leg near-total weight and dragged the composite with it. Fixed by the same envelope change.
  • Zero analyst coverage was scored as "missed every quarter". Tracked quarters were counted from actuals alone while beats required an estimate, so the numerator and denominator disagreed. Both now require an actual and a standing estimate.
  • Debt-free companies were penalised for having no interest expense β€” reported-zero interest scored worse than missing data.
  • The EV leg was the stalest input yet carried the most weight, because a quarterly plateau looks less variable than a daily-marked series.
  • Missing quality inputs were scored inconsistently β€” some as a zero penalty, one as a full bonus.
  • Track Record showed red for quarters that simply had no estimate β€” those now show βšͺ.
  • The legacy quality row failed debt-free names on the same interest-coverage test.

✨ New features

Anchor bands to TTM EPS β€” puts the PE fair-value bands on a consistent trailingΓ—trailing basis (trailing-PE percentiles Γ— trailing EPS) instead of the default forward tilt, which biases bands high for growers. Falls back to the forward basis if TTM EPS is unusable. Graham number and reverse-DCF are unaffected. Β· Inputs: Anchor bands to TTM EPS (default OFF, 🎨 Valuation Bands) Β· What you'll see: the main-table PE fair-value tooltip names the basis in use.

πŸ“ Levels Style β€” one uniform style, width and label size for all four level lines (Low, Fair, High, EV 1Y). Β· Inputs: Label size (default Auto β€” Fair normal, minors small), Line style (default Dashed), Line thickness (default 1, range 1–4) Β· What you'll see: the four dashed level lines redraw at the chosen style/width immediately; picking an explicit label size forces it on all four labels.

Compact bands β€” hides the minor overlays when the band area gets crowded: the MoS βˆ’10/βˆ’20/βˆ’30 ladder, the Norm-PE fair-value plot, the dotted Low/High lines and labels, and the EV 1Y line and label. Band plots, zone fills and the Fair line + label stay. Β· Inputs: Compact bands (default OFF, 🎨 Valuation Bands) Β· What you'll see: the overlay drops to the Fair line plus the shaded bands.

Partial-history badge β€” warns when the band percentiles were computed from fewer bars than the lookback asks for (the intraday 20k-bar cap can cut ~1260 samples to ~80 without any prior warning). Β· What you'll see: a ⚠️ with an "n/N samples" tooltip on the main-table Bands header, and a matching lowest-priority warning row in the scenario table.

"No est. coverage" badge β€” the Track Record cell now says so explicitly instead of showing a red 0% beat rate. Β· What you'll see: neutral background, " (no est. coverage)" text, and a tooltip explaining that βšͺ marks an uncovered quarter.

Driver-aware scenario tooltips β€” bear/base/bull tooltips now report the effective growth rate actually applied to the selected primary multiple, and name the driver behind it (EPS, sales, or ROE Γ— retention).

Fresher quality inputs β€” quarterly ROE and total equity are now requested, so the quality ROE factor and the new BVPS growth driver no longer run on annual data.

βš™οΈ Changed defaults

InputOldNewEffect
Line thickness (πŸ“ Levels Style)not an input β€” all four level lines hard-coded to width 21Thinner level lines. Set to 2 to restore the old weight.
Line style (πŸ“ Levels Style)not an input β€” hard-coded dashedDashedNo visual change at the default; now switchable to Dotted or Solid.
Label size (πŸ“ Levels Style)all four labels rendered at normal sizeAutoFair stays normal; Low, High and EV 1Y labels shrink to small so the staggered row reads cleanly.
Anchor bands to TTM EPSn/a (new)OFFThe existing forward-EPS band basis is preserved exactly until you turn it on.
Compact bandsn/a (new)OFFAll overlay lines keep drawing as before.

Existing chart instances keep whatever values you already saved β€” the new defaults only apply when you add a fresh copy of the indicator or reset settings to defaults.

πŸ§ͺ Test plan (before publishing)

  1. Bands must be three separate lines on a re-rated stock. Pick a name whose multiple has trended one way across the 5-year lookback (confirm it on the chart's own PE history before using it as the test case). Pass: the Low, Fair and High dashed lines sit at visibly different prices, the zone fills have real height, and the main-table Low/Fair/High figures differ. Fail: any two of the three print the same number β€” that is the ratchet regression.
  2. Range-bound control. Repeat on a symbol whose multiple has oscillated in a band. Pass: band width is essentially unchanged from the previous build (this case was never affected by the bug, so a large move here means something else shifted).
  3. Labels visible and staggered. Pass: four distinct labels β€” Fair, Low, High, EV 1Y β€” at increasing horizontal offsets (+1, +7, +13, +19 bars), each showing its name, price and signed % versus price. Fail: fewer than four labels, or two overlapping.
  4. πŸ“ Levels Style, one control at a time. Set Line thickness 1 β†’ 4: pass if all four lines visibly thicken. Set Line style Dashed β†’ Dotted β†’ Solid: pass if all four change together (the style is uniform by design β€” Fair should not stay solid while the others go dotted). Set Label size Auto β†’ Large β†’ Tiny: pass if all four labels resize, including Fair.
  5. Compact bands. Tick it. Pass: the MoS ladder, Norm-PE plot, Low/High lines + labels and the EV 1Y line + label disappear while the shaded bands and the Fair line + label remain. Untick and confirm everything returns.
  6. Zero-coverage name reads neutral. Load an NSE SME or any recently listed name with no analyst estimates. Pass: Track Record shows βšͺ icons and the "(no est. coverage)" text on a neutral background β€” not red; the scenario table shows no beat-history growth haircut and momentum carries no βˆ’10 beat penalty. Fail: a 0% beat rate on a red background.
  7. EV band behaviour after daily marking. On a symbol with a visibly stale reported enterprise value, note the displayed EV/EBITDA and its z-score, then re-check after a day with a meaningful price move. Pass: the printed EV/EBITDA moves with price rather than sitting flat until the next quarterly report; the EV fair-value leg and its weight in the Bands tooltip are populated. Pass (degradation): on a symbol with no net-debt data the EV leg simply drops out of the blend rather than producing debt-blind bands.
  8. Partial-history badge fires where it should. Load the indicator on an intraday timeframe where the 20k-bar cap bites. Pass: the ⚠️ appears on the Bands header with an "n/N samples" tooltip, and the scenario table carries the matching warning row (it should yield to stale/trough/poor-beat warnings when those apply).
  9. TTM anchor toggle. On a high-growth name, note the PE fair-value figures, then tick Anchor bands to TTM EPS. Pass: the PE bands drop (trailing EPS < forward EPS) and the tooltip names the TTM basis; the Graham number and reverse-DCF values are unchanged.
  10. Scenario drivers on a non-PE-primary name. Load a symbol whose primary method is PS, PB or EV. Pass: the bear/base/bull tooltips name sales growth (PS/EV) or ROE Γ— retention (PB) as the driver and report an effective growth rate that differs from the EPS growth rate. On a PE-primary symbol, pass if the scenario targets are unchanged from the previous build.
  11. Debt-free name quality check. Load a company with no debt. Pass: the interest-coverage factor contributes its full 2.0 and the quality score is at least as high as before.
  12. Compile and budget. Pass: the script compiles and loads; request budget stays at 35 of 40.

πŸ“‹ Publishing blurb (paste into TradingView release notes)

Fixed: fair-value bands could collapse into a single line on stocks whose multiple had re-rated β€” Low, Fair and High now separate correctly again.

Fixed: the three band labels are no longer stacked on top of each other; they're staggered and readable.

Fixed: stocks with no analyst coverage were being scored as if they had missed every quarter. They now read neutral β€” no growth haircut, no momentum penalty, βšͺ icons and a "no est. coverage" badge.

Fixed: debt-free companies were penalised on interest coverage. Zero debt now scores as the best case, not the worst.

Fixed: EV/EBITDA was quarterly-stepped while every other multiple re-marked daily, which quietly gave the stalest input the most weight. EV is now marked daily β€” expect band and z-score values to shift.

Improved: missing quality inputs now count as neutral and the score renormalises over what's actually available, instead of penalising sparse coverage.

Improved: PS and EV scenarios grow on sales, PB grows on ROE Γ— retention. Targets shift for non-PE-primary names.

Improved: extreme historical multiples are now clamped into the sample instead of thrown away, so bands track genuine re-ratings.

New: πŸ“ Levels Style β€” set the line style, thickness and label size of the four level lines.

New: "Compact bands" to hide the minor overlay lines when the chart gets busy.

New: "Anchor bands to TTM EPS" (off by default) for a consistent trailing basis.

New: a ⚠️ "n/N samples" badge when the bands were built from less history than you asked for.

---

Valuations + Pocket Pivot Screener v4 β€” πŸ’° Valuations Screener πŸ’°

_Stops no-data stocks from ranking as "fairly valued", tightens what counts as a certified fair value, and spends the freed output slots on four columns that were computed but never shown._

⚠️ Behavior changes (read before trusting old readings)

ChangeOldNewWhy it matters
β‘’ Valuation Zone for names with no fundamental data0.0 β€” reads as "at fair value"blank (na)Zone-only screens and zone sorts now exclude these names instead of ranking them mid-pack, above genuinely overvalued stocks.
Data-quality certificationData Quality >= 3 (good) / >= 2 (minimum) β€” a raw count of available metricsAlso requires covered weight β‰₯ 0.75 / β‰₯ 0.50 of the sector profile's intended weightingA bank missing book value could pass "DQ β‰₯ 3" on a composite that was 100% P/E with 65% of the intended weight absent. Screens and alerts gated on these β€” value opportunity, deep value, πŸ”₯ Strong Conviction, πŸš€ Accumulation, πŸ”Ό Value Trend Turn, πŸ”₯ Pattern Conviction β€” are now stricter, and some previously flagged low-coverage names drop off.
Minimum history for fair-value bands6 valid fundamental samples (~2 weeks of listed history)60 (new input)Composite fair value, the β‘  score, β‘‘ upside, β‘’ zone, Margin of Safety and every signal built on them stay na until 60 samples exist β€” recently listed names drop out of the valuation columns for roughly three months. The ⑀–⑨ percentile columns keep the lighter 6-sample floor.
Bottom-fishing pivot (type 2)A gap-up finishing well above the 50MA still printed a pivotRejected when close is more than Max % Extended Above Fast MA above the 50MAWith the uptrend filter ON, everything downstream of the pivot can now flip false on those bars: tech score, πŸš€ Accumulation, πŸ’₯ Value Breakout, πŸ”₯ Strong Conviction, the conviction score's technical component, the "+ PP" pattern flags, πŸ”„ 30% Fall Reversal, and the related alerts.
Pivot classification with "Require Price in Uptrend" OFFType 2 was unreachable β€” the filter sat inside the type-2 condition50MA-reclaim days now print type 2Classification only. Any-pivot screens (>= 1) see no change; with the filter ON, classification is bit-identical to the previous build.
🟩 Pocket Pivot column values1 or 21 / 1.5 / 2 / 2.5 β€” the +0.5 marks a pivot whose volume was at least 2Γ— the largest down-day volume it beatExisting >= 1 and >= 2 filters keep working; an exact = 2 filter now misses the strongest bottom-fish pivots. Use >= 2.
Band-cross alerts (πŸ“ Dropped Below Low Band, πŸ“ Reclaimed Fair Value, πŸ“ Lost Fair Value)Crossed the raw compositeCross a 5-period EMA of the composite fair value and low bandFar fewer whipsaw alerts around estimate revisions; a single clean cross shifts by at most the EMA lag (~2 bars). The two val-score threshold alerts (πŸ“ Became Under/Overvalued) are timing-identical.
Chart-mode visualsZone background tint, pocket-pivot triangle, accumulation diamond, always-on price lineBackgrounds and both shapes removed; the price line is behind a "Screener Build" toggle (ON by default = blank)Hidden outputs still consume their slot toward the 64-output cap, so gating them was not enough β€” they had to go. Their information survives as columns (β‘’ Valuation Zone, 🟩 Pocket Pivot, πŸš€ Accumulation Signal). On a chart, untick "Screener Build" to get the price line back.

πŸ› Fixes

  • Stocks with no fundamental data printed as "at fair value" in the β‘’ Valuation Zone column and ranked ahead of genuinely overvalued names in zone sorts. They now go blank and fall out of those screens.
  • "Good data" could certify a single-metric fair value. The quality flags counted raw metric availability without checking whether those metrics carried any weight in the sector profile; they now also require 75% / 50% of the intended weight to be covered.
  • Fair value could be defined by two weeks of listed history β€” the percentile bands accepted as few as 6 samples.
  • A gap-up straight through the 50MA counted as a bottom-fishing pivot, with no extension backstop of the kind standard pivots already applied to the 10MA.
  • Unticking "Require Price in Uptrend" silently made the bottom-fishing pivot unreachable rather than just relaxing the uptrend requirement.
  • A ta.crossover call sat inside a short-circuited or chain, so it could be skipped on some bars β€” an inconsistent-execution and repaint hazard. It is now evaluated at global scope.

✨ New features

Four promoted columns β€” metrics that were computed since v3 but never output. Β· What you'll see: Upside to High % (distance to the top band), Margin of Safety %, Coverage % (the covered fraction of the sector profile's intended weight β€” the honest companion to Data Quality, and the same quantity the new quality guards threshold at 75/50), and Vol / MaxDownVol (the natural pocket-pivot ranking key β€” how forcefully the pivot beat the down-day volume it had to clear). All four are sortable screener columns.

Minimum-samples control for the bands Β· Inputs: Min Samples for Fair-Value Bands (default 60, range 6–500) Β· What you'll see: valuation columns stay blank on young listings until the history exists. Set it to 6 to restore the old behaviour exactly.

Screener Build toggle Β· Inputs: Screener Build (blank the Price plot) (default ON) Β· What you'll see: ON, the Price plot reads na so it doesn't duplicate the screener's native Price column. OFF, close is drawn against the fair-value bands for chart use.

Pocket-pivot quality tiering β€” the 🟩 column adds 0.5 when the pivot's volume was at least twice the largest down-day volume in the lookback window, so you can sort pivots by force. Degenerate windows (no valid down-day volume) stay at their base tier.

Smoothed band-cross alerts β€” the three band-transition alerts now cross 5-period EMAs of the fair value and low band, cutting the estimate-revision whipsaw.

Guide update β€” the usage guide gained a worked screen: Margin of Safety % > 20 AND Coverage % >= 75, and the note that pocket-pivot filters should use >= 2 rather than = 2.

βš™οΈ Changed defaults

InputOldNewEffect
Min Samples for Fair-Value Bandsnot an input β€” hard-coded floor of 660Fair value, the β‘ /β‘‘/β‘’ columns and every derived signal stay blank on names with under ~3 months of fundamental history. Set to 6 for the previous behaviour.
Screener Build (blank the Price plot)n/a (new)ONThe Price plot is blank by default. Untick for chart use.
Require Price in Uptrend for Pocket PivotONON (value unchanged)Same default, new meaning: it no longer gates the bottom-fishing pivot, which is now controlled solely by "Allow Bottom-Fishing Pivot".

Existing chart instances keep whatever values you already saved β€” the new defaults only apply to a fresh copy of the indicator or a reset to defaults.

πŸ§ͺ Test plan (before publishing)

  1. Output count β€” do this first. The script errors outright above 64 outputs. Add the indicator to a chart and confirm it loads. Pass: it compiles and renders β€” the build is 42 plots + 21 alert conditions = 63/64, with one slot spare. Fail: any "too many outputs" error, which means an output was added somewhere without removing one.
  2. Compile check. This script has never been run through the TradingView compiler. Run a /pine-check pass before publishing. Pass: zero compile errors.
  3. The four new columns exist and sort. Open the Pine Screener column list. Pass: Upside to High %, Margin of Safety %, Coverage % and Vol / MaxDownVol all appear, populate with numbers on a well-covered large cap, and sort ascending/descending.
  4. No-data names drop out rather than ranking mid-pack. Screen a list containing NSE SME or recently listed names, sort by β‘’ Valuation Zone. Pass: names without fundamental data show a blank β‘’ and blank β‘  score, and do not appear between the undervalued and overvalued groups. Fail: any row showing exactly 0.00 in β‘’.
  5. Coverage guard bites where it should. Find a bank or NBFC where book value is missing. Pass: Coverage % reads below 75 and the name no longer flags πŸ”₯ Strong Conviction or a value opportunity, even though Data Quality still reads 3+. Data Quality itself is unchanged β€” it remains an honest raw count.
  6. Screener Build toggle on a chart pane. Add the indicator to a chart (it draws in its own pane) with the toggle ON. Pass: no price line, just the fair-value bands. Untick "Screener Build". Pass: the price line returns and can be compared against the bands. Also confirm the zone background tint and the two signal shapes are gone in both states β€” that is intended, not a regression.
  7. Minimum-samples behaviour. Load a name listed within the last two months. Pass: β‘ , β‘‘, β‘’ and Margin of Safety are blank. Set Min Samples for Fair-Value Bands to 6. Pass: the columns populate again, confirming the input is the only gate. Check the ⑀–⑨ percentile columns stayed populated throughout.
  8. Pivot classification truth table. With Require Price in Uptrend for Pocket Pivot ON, compare the 🟩 column against the previous build on a handful of names. Pass: identical classification. Untick it. Pass: 50MA-reclaim days now print 2 or 2.5 instead of 1, and a screen on 🟩 >= 1 returns the same set in both states.
  9. Pivot quality tier. Sort by 🟩 descending. Pass: values of 1.5 and 2.5 appear, and every one of them shows Vol / MaxDownVol >= 2.
  10. Extension guard on bottom-fish pivots. Find a name that gapped up hard through its 50MA. Pass: no pivot is printed on that bar (with the uptrend filter ON), where the previous build printed a 2.
  11. Smoothed alerts. Set an alert on πŸ“ Reclaimed Fair Value on a name with a recent estimate revision. Pass: the alert fires within a couple of bars of the raw cross and does not fire repeatedly on a single revision step. Confirm πŸ“ Became Undervalued / Overvalued fire at exactly the same bar as before.
  12. Worked screen end to end. Run Margin of Safety % > 20 AND Coverage % >= 75. Pass: the result set is non-empty and every row has a populated β‘  score.

πŸ“‹ Publishing blurb (paste into TradingView release notes)

Fixed: stocks with no fundamental data were printing "0.0" in the β‘’ Valuation Zone column β€” reading as "at fair value" and ranking above genuinely overvalued names. That column is now blank for them, so they drop out of zone screens.

Fixed: "good data" could certify a fair value built from a single metric. Quality now also requires that 75% (or 50% for the looser gate) of the sector profile's intended weight is actually covered. Some low-coverage names will fall off the conviction screens.

Fixed: fair-value bands could be defined by as little as two weeks of listed history. New "Min Samples for Fair-Value Bands" input, default 60 β€” set it to 6 for the old behaviour.

Fixed: a gap-up straight through the 50MA counted as a bottom-fishing pocket pivot. It now fails the same extension check standard pivots use.

Fixed: unticking "Require Price in Uptrend" made the bottom-fishing pivot unreachable instead of just relaxing the filter.

New columns: Upside to High %, Margin of Safety %, Coverage %, and Vol / MaxDownVol β€” all computed for a while, now sortable.

New: pocket pivots are tiered β€” add 0.5 when the pivot's volume was 2Γ— the down-day volume it beat. Filter with >= 2, not = 2.

New: the three band-cross alerts now use a 5-bar EMA of the bands, which kills most of the estimate-revision whipsaw.

Chart users: the zone background tint and the two signal shapes have been removed to fund the new columns (TradingView charges an output slot even for hidden plots). Untick "Screener Build" to bring the price line back.

---

EOD Screener β€” EOD Screener

_The bull-flag setup was mathematically incapable of firing and the BUY gate was tautological β€” both are fixed, plus five new diagnostic columns and a Weinstein-correct extension measure._

⚠️ Behavior changes (read before trusting old readings)

ChangeOldNewWhy it matters
Bull-flag setup (SetupCode 2)Never fired. The breakout level included the current bar's own high, so close could never cross itLevel is taken from the prior bar, exactly like the Stage-2 ignition blockEvery bull-flag breakout was being silently missed. Expect new BUY/ARM rows and "Setup triggered" alerts that never appeared before. The flag's range % now correctly excludes the breakout bar.
BUY gateIncluded TP1(R) >= Min R:R β€” a comparison of two inputs, constant for the whole runRemoved; the gate is now "position size > 0 and stop is not a fallback"At the shipped defaults (TP1 2.0, Min R:R 2.0) nothing changes. If Min R:R was ever set above TP1(R), the screener silently returned zero BUYs across the entire universe. It can now return BUYs.
Extension measure (Ext_%)Measured against the 10-EMA, despite the input being labelled "above support MA"Measured against the 30-period stage-timeframe MA β€” the Weinstein convention the label describesExt_% values are larger now, so at the same 12% default more names flag over-extended and drop out of BUY. If the BUY list thins too much, loosen Max extension above support MA %. The 10-EMA is untouched everywhere else (pullback setup, "Below Key MA" stop).
Relative-strength gateRS > RS-MA and RS > previous RSRS > RS-MA onlyA single flat or soft RS day no longer demotes BUY to ARM. BUY lists widen on choppy-RS names. IPOs are now blocked only by the missing-RS-MA guard, which is visible in the new DataOK column.
Volume policy when volume history is missingBreakout hard-failed; ignition and bull-flag triggers auto-passed; the double-bottom trigger had no volume condition at allAll hard-fail on missing volume; the double-bottom neckline break now requires the same surge multiple as the breakout it shares its crossover withExpect fewer double-bottom signals β€” every surviving one is volume-confirmed. Symbols with under ~50 bars of volume history now fail closed instead of passing by default; DataOK tells you why.
Stage for short-history symbols (IPOs)Reported as Stage 1Reported as na (unknown)The Stage column no longer asserts a stage it cannot know. Open item: the "Entered Stage 2" alert will not fire on a na→2 transition, where the old 1→2 transition did. If first-Stage-2 alerts on young listings matter to you, this needs a decision.
"Require a triggered setup for BUY" set OFFSilently killed the ignition path in the live-Stage-2 test and deadened the Stage-2 ignition alertBoth workOnly visible with the toggle OFF: BUY rows can now include ignition-driven names and the ignition alert fires. Default (ON) behaviour is identical to before. SetupCode and "Setup triggered" remain inert when OFF, by design.

πŸ› Fixes

  • The bull-flag breakout could never trigger. The consolidation high was computed over a window that included the current bar, so a close could not exceed a range containing its own high. Every bull flag in the history of this script was missed.
  • The BUY decision line contained a tautology comparing two inputs β€” harmless at defaults, but a silent zero-BUY failure for anyone who raised Min R:R above TP1(R).
  • IPOs and short-history symbols were labelled Stage 1 because a missing moving average fell through to the "not above the MA" branch.
  • The extension input said one thing and the code measured another β€” "above support MA" against a 10-EMA.
  • Missing-volume handling was inconsistent across setups β€” two triggers hard-failed, two auto-passed, one had no volume test at all.
  • Turning off "Require a triggered setup for BUY" broke more than it relaxed, killing the ignition path and two alerts.
  • A structural stop wider than the max stop distance was silently converted to a percent stop with no indication β€” now flagged by a column.
  • Three separate higher-timeframe data requests where two suffice; the stage-timeframe trail is now returned by the same request as the stage data (numerically identical values, same timeframe, same no-lookahead setting).

✨ New features

EOD confirm only β€” this screener is designed for post-close runs; running it intraday means every trigger evaluates on a developing bar and can repaint. This toggle ANDs a confirmed-bar requirement into all six setup triggers (breakout, Fibonacci hold, ignition, bull flag, double bottom, pullback), and the BUY/ARM/setup/ignition/breakout alerts inherit it. Β· Inputs: EOD confirm only (default OFF β€” shipped behaviour unchanged) Β· What you'll see: with it ON, no trigger fires until the bar closes.

MansRS_% β€” Mansfield-style relative strength as a sortable number, (RS / RS-MA βˆ’ 1) Γ— 100, alongside the existing binary RS_out column. Β· What you'll see: rank the BUY list by relative strength instead of just filtering on it.

StageWeeks β€” how long the symbol has been in Stage 2, counted in stage-timeframe bars, computed inside the stage-timeframe context. The single highest-value Weinstein addition: it separates fresh Stage-2 breakouts from late-stage ones. Β· What you'll see: a number on Stage-2 rows only. Reads na for a symbol that has been Stage 2 across its entire loaded history.

SlClamped β€” 0/1 flag next to Stop_%, marking rows where the structural or method stop was wider than the max stop distance and was silently replaced by the percent stop. Β· What you'll see: a 1 tells you the stop on that row is not the one your stop method chose.

DataOK β€” 0/1 flag confirming that the stage MA, RS MA and volume ratio all had real data. Pairs with the na-stage fix: the new hard-fail volume policy makes short-history rows fail closed, and this column says why. Β· What you'll see: a 0 means the gates ran on missing data β€” treat the whole row as unreliable.

Turnover β€” average rupees traded per bar (close Γ— average volume), beside Vol_x. Slippage is the dominant unmodeled risk with full-capital sizing and 1–3% stops. Β· What you'll see: a liquidity figure you can set a floor on before sizing a position.

βš™οΈ Changed defaults

InputOldNewEffect
Max extension above support MA %12.0, measured against the 10-EMA12.0, measured against the 30-period stage-timeframe MAValue unchanged, meaning corrected. Ext_% readings are larger, so the same 12% rejects more names. This is the retune knob if the BUY list thins too much.
EOD confirm onlyn/a (new)OFFShipped behaviour is unchanged; turn it on if you ever run the screener intraday.

Everything else β€” capital, risk %, stop method, TP1, Min R:R, setup lengths, surge multiple, RS settings β€” keeps its previous default. Existing chart instances keep whatever values you already saved; the new input only appears with its default on a fresh copy or a reset to defaults.

πŸ§ͺ Test plan (before publishing)

  1. Bull flags actually appear. Screen a broad NSE list on the daily and sort by SetupCode. Pass: at least some rows show SetupCode 2 β€” this value was unreachable in every previous build, so zero 2s across a large universe is a fail. Spot-check one on a chart: a pole of at least 18%, a consolidation range under 10%, and a close above the prior bars' consolidation high.
  2. Bull-flag alert path. Set a "Setup triggered" alert on a name currently in a flag. Pass: it fires on the breakout bar with a SetupCode of 2.
  3. BUY gate is no longer tautological. Set Min R:R (TP1) to 3.0 while leaving TP1 (R) at 2.0. Pass: the screener still returns BUY rows. Fail: zero BUYs universe-wide, which was the old behaviour.
  4. Extension retune check β€” do this before publishing. Record the BUY count at Max extension above support MA % = 12.0, then compare against the previous build's BUY count on the same list and date. Pass: the list is thinner but not empty, and the dropped names are visibly extended above their 30-period stage MA. If it is too thin, raise the input (try 15–18) and note the value you settled on in the published description.
  5. New columns present and populated. Open the screener column list. Pass: StageWeeks, MansRS_%, Turnover, SlClamped and DataOK all appear and sort. Spot-check: StageWeeks is blank on non-Stage-2 rows; MansRS_% is positive on names beating the benchmark; Turnover scales with price Γ— volume.
  6. DataOK does its job. Screen a list containing a recent IPO. Pass: DataOK reads 0 on it and no BUY/ARM is issued; the Stage column is blank rather than showing 1.
  7. "Entered Stage 2" gap — decide before publishing. On a young listing that has just crossed into Stage 2, check whether the alert fires. Expected: it does not, because the transition is na→2. Decide whether to accept this or add a follow-up fix, and document whichever you choose.
  8. Double-bottom triggers thinned but confirmed. Compare double-bottom (SetupCode 3) counts against the previous build. Pass: fewer rows, and every surviving one shows Vol_x at or above the breakout surge multiple (1.5 default).
  9. SlClamped catches the wide-stop case. Find a double-bottom row whose structural stop sits below the neckline low by more than the max stop distance. Pass: SlClamped reads 1 and Stop_% equals Max stop distance %.
  10. useSetups OFF path. Untick Require a triggered setup for BUY. Pass: BUY rows now include ignition-driven names and a "Stage-2 ignition" alert fires; SetupCode stays 0. Re-tick it. Pass: results are identical to the previous build.
  11. EOD confirm toggle. During market hours, tick EOD confirm only. Pass: no setup trigger fires on the developing bar; after the close, the same names trigger as with the toggle off.
  12. RS gate widening. Compare BUY counts with Require RS outperformance for BUY ON against the previous build. Pass: more names pass, and the ones that newly qualify have a positive MansRS_% but had a flat or down RS on the most recent bar.
  13. Budget and compile. Pass: the script compiles and loads with 27 plots + 8 alert conditions = 35/64 outputs and 2 higher-timeframe requests (was 3). Confirm the 20-EMA trail values are unchanged from the previous build β€” the request merge should be numerically identical.

πŸ“‹ Publishing blurb (paste into TradingView release notes)

Fixed: the bull-flag setup (SetupCode 2) could never fire β€” the breakout level was computed over a window that included the current bar's own high. Every bull flag was being missed. Expect new setups to show up.

Fixed: the BUY gate contained a comparison between two inputs. Harmless at defaults, but if you raised Min R:R above TP1(R) the screener silently returned zero BUYs.

Fixed: IPOs and short-history symbols were reported as Stage 1. The Stage column now reads blank when there isn't enough history to know.

Fixed: the "Max extension above support MA %" input measured against the 10-EMA, not the support MA. It now measures against the 30-period stage-timeframe MA as labelled β€” extension readings are larger, so the same 12% setting rejects more names. Loosen it if your BUY list gets too thin.

Fixed: missing-volume handling was inconsistent β€” two setups auto-passed and the double-bottom had no volume test at all. All setups now fail closed on missing volume, and double-bottom neckline breaks need the same volume surge as any other breakout. Expect fewer double-bottom signals, all of them confirmed.

Fixed: turning off "Require a triggered setup for BUY" used to kill the Stage-2 ignition path and two alerts.

Improved: the RS gate no longer demotes a stock for one flat day β€” it just needs RS above its own moving average.

New columns: StageWeeks (how fresh the Stage 2 is), MansRS_% (sortable Mansfield relative strength), Turnover (liquidity), SlClamped (your stop got clamped to the max), DataOK (this row's gates ran on missing data).

New: "EOD confirm only" toggle, off by default β€” turn it on if you ever run this intraday, so nothing evaluates on a developing bar.

Under the hood: three higher-timeframe data requests merged into two, with identical values.

---

Position Planner Pro β€” Position Planner Pro

_The planner stops signalling trades it cannot give a real stop to: BUY now requires structure inside your risk cap, weekly charts stage off the 30-week MA, and every taken trade is tracked from entry to exit._

⚠️ Behavior changes (read before trusting old signals)

ChangeOldNewWhy it matters
BUY blocked when the stop was βœ‚-clampedA setup whose structural stop sat beyond the max-stop cap still printed BUY, using the clamped cap price as the stopState shows βŒ› ARM with the reason "no structural stop ≀ cap"; the BUY marker, table BUY state and both BUY alerts are suppressedThis is the biggest change. Expect materially fewer BUY prints β€” historically and live. Every remaining BUY has a genuine structural level inside the cap. New input, default ON; turn it off to restore old behavior
BUY marker follows the decision engineMarker printed on setups the engine rejected (RS lagging, over-extended, clamped stop)Marker prints only when the table actually says BUYFewer markers on history and live; marker and table can no longer disagree
Weekly-chart stage basisA weekly chart auto-mapped the stage timeframe to Monthly β†’ the 30-month SMAWeekly charts stay on Weekly β†’ the 30-week MA. Only above-weekly charts map to MonthlyWeinstein's actual definition. On weekly charts the stage classification, stage shading, trail EMA and stage alerts all change basis β€” weekly stage reads will differ from before
Higher-timeframe stage & trail read confirmed barsStage, Stage-2 shading, BUY confirmation and the trail EMA tracked the developing weekly bar β€” signals could appear mid-week and disappearAll computed from the last closed higher-timeframe barNo more repainting. Stage flips, BUY and the "Entered Stage 2" / "Lost trail EMA" alerts now fire on the first chart bar after the weekly bar closes β€” slightly later, but they stay put. The table's Stage row still shows the live developing stage (display only)
Volume gate on double-bottom and pullbackThese two triggers fired regardless of volumeBoth now require volume at or above averageA dry neckline break is the classic Weinstein trap. Those setups now show as forming/ARM instead of triggering β€” backtests will show fewer of these entries
Bull-flag breakout can fire at allThe flag-high level included the live bar, so the breakout condition was mathematically impossible β€” "Bull flag Β· forming" never convertedFlag high/low measured on completed bars; the breakout firesNew setups, entries and auto-stops appear where the chart previously went quiet
Breakout-setup stop anchorAnchored to the last pivot low, which could be months old β€” so it silently clamped to the percent capAnchors to the more recent of the last pivot low and the 20-bar swing low, minus the bufferBreakout stops are tighter and more structural, so they clamp less often and the new BUY block rejects fewer of them
Stop / target alertsFired off the continuously re-computed live planWith position tracking ON (default) they fire only while a tracked position is OPEN, against the entry/stop/targets frozen at BUYAlerts now refer to the trade you actually took, not to a plan that has moved since

πŸ› Fixes

  • The bull-flag breakout could never trigger β€” the consolidation high was measured including the live bar, so price could never cross it. Fixed; the flag path (and its auto-stop) is live code again.
  • Stage, Stage-2 shading and the trail EMA repainted intraweek: signals and alerts could appear mid-week and vanish by Friday's close. All higher-timeframe reads are now confirmed-bar.
  • Five crossover triggers (breakout, ignition, flag, double-bottom, pullback) and the trail-loss alert sat inside conditional blocks, where Pine v6's short-circuit and skipped their internal state updates β€” producing phantom and missed triggers. All are now evaluated every bar.
  • Plan-zone boxes (stop, TP1–TP3) disappeared permanently after one hide cycle of "Show plan & table only on BUY" β€” their colors were cleared and never restored. They now reappear correctly.
  • The suggested-stop R:R printed the R:R measured at your stop, overstating reward-to-risk on blue-sky setups where the suggested stop is wider. The chart label, the table cell and the cell's color now all use the correct figure.

✨ New features

Clamped-stop BUY block β€” suppresses BUY on any setup whose structural stop sits beyond your max-stop cap, downgrading it to ARM. Β· Inputs: Block BUY when stop is clamped (ON) Β· What you'll see: "βŒ› ARM β€” {setup} β€” no structural stop ≀ cap", and "no structural stop ≀ cap" appears in the blockers list on NO-BUY states.

Position tracking β€” on a confirmed BUY the entry, stop, quantity and TP1–TP3 are frozen; stop-hit and target-hit events are measured against those frozen levels until the position closes (stop-out, TP3, or manual flat). Β· Inputs: Track position (freeze plan on BUY) (ON), Manual flat (clear tracked position) (OFF) Β· What you'll see: a new table row β€” "Position β€” OPEN Β· qty @ entry Β· SL x" or "FLAT". Full table 22 rows, Minimal 9; the row and the counts revert when tracking is off.

Confirmed bars only β€” gates all six triggers to confirmed bar closes. Β· Inputs: Confirmed bars only (OFF) Β· What you'll see: nothing on history (historical bars are always confirmed); live triggers stop flickering intrabar.

Order-ready dynamic alerts β€” JSON payloads fired at bar close. BUY carries symbol, timeframe, entry, stop, quantity, rupee risk and TP1; STOP/TP1/TP2/TP3 carry the level and quantity. Β· Inputs: none β€” create one TradingView alert on "Any alert() function call" Β· What you'll see: structured alert bodies you can route straight to an order handler. All existing named alert conditions are unchanged.

Distance to trigger on ARM β€” the ARM row now appends how far price is from the pending breakout level. Β· Inputs: none Β· What you'll see: "Β· +1.8% to base high" (or flag high / neckline). Omitted when the level does not apply or is already below price.

βš™οΈ Changed defaults

InputOldNewEffect
Max stop distance %8.03.0Matches the hard ≀3% stop rule the tooltip always described. At full-capital sizing an 8% stop is roughly β‚Ή2.3L of risk on a β‚Ή28.4L account. Existing chart instances keep their saved 8% value β€” TradingView only applies a new default to freshly added copies. On live charts you must set this to 3 by hand (or remove and re-add the indicator).

Note on the new inputs above: Block BUY when stop is clamped and Track position both ship ON, and both apply to existing chart instances the moment you update the script, because they are new inputs with no saved value.

πŸ§ͺ Test plan (before publishing)

  1. Max-stop default. Add a fresh copy of the indicator to a clean chart and open Settings β†’ Entry & Stop. Pass: "Max stop distance %" reads 3. Then open an existing saved chart carrying the old copy. Pass (expected): it still reads 8 β€” confirm this, then set it to 3 manually on every live chart. Log which charts you changed.
  2. Clamped-stop BUY block. Find a Stage-2 name in a wide, high-ATR base (any recent NSE breakout with a ~6–10% distance to its swing low). With Block BUY when stop is clamped ON, look for setups where the stop label carries the βœ‚ mark. Pass: those bars show "βŒ› ARM … no structural stop ≀ cap" and print no BUY marker. Toggle the input OFF and reload. Pass: the same bars now print BUY with a βœ‚ stop. Count BUY markers over the last 250 bars in both states β€” ON must be ≀ OFF.
  3. Weekly stage basis. Put the indicator on a weekly chart of a long-trending large-cap (e.g. NSE:RELIANCE, NSE:TCS) with "Auto stage timeframe" ON. Pass: the Stage row and shading agree with a manually plotted 30-period SMA on that weekly chart, not with a 30-month one. Compare against your previous screenshot/knowledge of the same chart β€” a changed stage read here is expected, not a bug.
  4. Bull flag fires. Set the stage/setup engine on, and scan a name that ran hard and then went sideways for 8–15 bars (pole β‰₯18%, consolidation ≀10% range are the shipped thresholds). Pass: at least one "Bull flag" trigger prints where the old build only ever showed "Bull flag Β· forming". Confirm the auto-stop label anchors under the flag low.
  5. Position tracking freezes the plan. With Track position ON, step forward from a confirmed BUY bar. Pass: the Position row reads "OPEN Β· qty @ entry Β· SL x" and the entry/stop/qty in that row do not move as later bars print, even while the live plan above them re-computes. Continue to a stop-out or TP3. Pass: the row flips to FLAT and the stop/target alert fires against the frozen level, not the current one. Tick Manual flat, confirm FLAT, then untick.
  6. Plan-zone boxes survive a hide cycle. Turn Show plan & table only on BUY ON, scroll to a stretch with no BUY (boxes vanish), then scroll back to a BUY bar. Pass: the stop and TP1–TP3 boxes render with their colors and borders again. In the old build they stayed invisible for the rest of the session.
  7. No repaint. Set an alert on "Entered Stage 2" or "BUY (full confirm)" mid-week on a daily chart of a stock whose weekly bar is in progress. Pass: nothing fires until the first daily bar after the weekly close. Confirm the table's Stage row still updates live during the week.

πŸ“‹ Publishing blurb (paste into TradingView release notes)

  • BUY signals now require a real structural stop inside your max-stop cap. If the stop had to be clamped, the planner shows ARM instead of BUY β€” expect fewer, better BUY prints. Toggle it off in Entry & Stop if you prefer the old behavior.
  • Default max stop distance changed from 8% to 3%. Existing charts keep their saved value β€” set it manually if you want the new default.
  • Weekly charts now classify Weinstein stages off the 30-week MA instead of the 30-month MA. Weekly stage reads will differ from before; this is the correct basis.
  • Stage, Stage-2 shading and the trail EMA no longer repaint. Signals confirm one higher-timeframe bar later and stay put. The Stage readout in the table still shows the live developing stage.
  • Bull-flag breakouts can finally trigger β€” the level they had to cross was previously unreachable.
  • The BUY marker now prints only when the decision engine actually says BUY, so marker and table always agree.
  • Double-bottom and pullback triggers now need average-or-better volume, consistent with the other setups.
  • New position tracking: on a BUY the entry, stop, quantity and targets are frozen, and stop/target alerts fire against that trade instead of the moving live plan.
  • New order-ready alerts via "Any alert() function call" with symbol, entry, stop, qty and rupee risk in the payload.
  • New "Confirmed bars only" toggle to stop intrabar flicker on live charts.
  • Fixed: plan-zone boxes no longer disappear permanently after a hide cycle.
  • Fixed: the suggested-stop R:R no longer overstates reward-to-risk on blue-sky setups.

---

Wyckoff Pro+ β€” Wyckoff Trigger

_Structures now have a lifecycle: they retire when the job is done, they stop fabricating secondary tests out of stale state, and their exits can no longer un-fire._

⚠️ Behavior changes (read before trusting old signals)

ChangeOldNewWhy it matters
Fabricated secondary test after a second climaxA pending "distribution AR" pointer survived a fresh buying climax. On the next in-band pivot high the script printed a secondary test that never happened β€” and that phantom test then upgraded the next trigger to "⚑ UTAD β€” PRIMARY SHORT ENTRY"The pointer is cleared on every fresh climaxOn trending distributions with successive lower highs, spurious secondary-test labels and the high-conviction UTAD short they produced no longer print on history. Sequences without stale state are unchanged bar for bar
Structures retireFloors and ceilings lived forever. Months after a markup completed, a deep correction printed "βœ– Acc fail" at a level that had stopped mattering β€” and could chain a bogus high-conviction Shakeout off itAccumulation retires at the measured-move target or N bars past the LPS, printing "Markup βœ“" (mirror: "Markdown βœ“" post-LPSY)Ancient dashed floor/ceiling lines disappear once a structure completes. Late "Acc fail" / "Dist fail" prints and their downstream signals are gone. The dashboard falls back to a trend read instead of a perpetual "Range β€” Accumulation?"
Invalidation events wait for the close"STRUCTURE FAIL β€” exit" alerts and their state teardowns fired on an intrabar dip and could roll back by the close β€” an irrevocable exit that un-happenedAll four invalidation events respect the "Confirm on bar close" settingExit alerts no longer vanish intrabar. No change on historical bars β€” every historical bar is confirmed
Event pivots wait for the closeSC / AR / ST / BC / AR-D / DST / LPS / LPSY labels flickered and their alerts could fire on pivots that never confirmedAll ten now respect the same confirm-on-close gateLive-chart flicker only; historical output is byte-identical
Opposing-climax contaminationA fresh climax on one side left the other side's fail-window state armed, so a Shakeout or Upthrust could re-arm inside the new structureEach climax clears the opposing side's fail-window and lifecycle stateSpurious re-arm prints inside a new structure disappear. Single-sided history is unchanged
LPS must be near the ceilingA pullback pivot 15% into markup could be labelled a creek retestLPS requires the pivot low within a set percentage above the ceiling (mirrored for LPSY below the floor)Far-from-structure "LPS" labels and their alerts disappear. Genuine near-ceiling LPS prints are unchanged

πŸ› Fixes

  • A stale pending-secondary-test pointer survived a fresh climax, letting the script invent a distribution secondary test β€” and upgrade the next trigger to a primary short entry β€” with no real test in the data.
  • Irrevocable "structure fail β€” exit" alerts bypassed the confirm-on-close setting and could fire on an intrabar dip that recovered.
  • Wyckoff event pivots bypassed the same gate, so labels flickered and alerts fired on pivots that never confirmed.
  • The measured-move target disappeared from the dashboard the moment the LPS printed β€” precisely when you need it. The target is now cached at the SOS and survives.
  • A fresh climax on one side did not clear the other side's fail-window memory, allowing cross-contaminated Shakeout/Upthrust re-arms.
  • The active range boundary lines leaked a drawing object per render when both a ceiling and a floor pair were live.

✨ New features

Structure lifecycle / terminal states β€” accumulation retires when the measured-move target is hit or N bars pass the LPS; distribution mirrors it after the LPSY. Β· Inputs: Structure Expiry (bars after LPS / LPSY) (40) Β· What you'll see: a "Markup βœ“" or "Markdown βœ“" label, the floor/ceiling lines removed, and a matching dashboard guidance row ("Cycle complete β€” trail longs, wait for new BC").

Cached measured-move target + target line β€” the target computed at the SOS/SOW is stored and survives the LPS teardown. Β· Inputs: Show Measured-Move Target Line (ON) Β· What you'll see: the dashboard "Target:" row keeps its number through markup, plus an optional dotted target line drawn alongside the range boundaries.

LPS proximity bound β€” an LPS must retest near the ceiling it broke. Β· Inputs: LPS max % above ceiling (5) Β· What you'll see: no more "LPS" labels deep inside a markup leg. Mirrored automatically for LPSY below the floor.

Volume-graded breakouts β€” the SOS/SOW breakout bar is graded against a volume multiple, matching the existing SC/BC/ST grading. Β· Inputs: Breakout Volume Multiple (SOS/SOW β˜…) (1.5) Β· What you'll see: "SOS β˜…" / "SOW β˜…" labels with a tooltip note when the breakout came on strong volume. Grading is cosmetic β€” no signal appears or disappears.

Guaranteed-at-close exit alerts β€” the four invalidation events also fire a dynamic alert at bar close. Β· Inputs: none β€” create one alert on "Any alert() function call" Β· What you'll see: exit notifications regardless of the frequency chosen in the alert dialog. All existing named alert conditions are unchanged.

Configurable failed-breakout retrace β€” the retrace level that defines a failed SOS/SOW was hardcoded at the midpoint. Β· Inputs: Failed-Breakout Retrace Level (0.5) Β· What you'll see: nothing at the default β€” behavior is identical until you change it.

βš™οΈ Changed defaults

InputOldNewEffect
β€”β€”β€”No shipped default changed in this release. Everything above arrives as a new input, which means it takes effect on existing chart instances immediately (there is no saved value to override it). Review Structure Expiry (40 bars) and LPS max % above ceiling (5%) against how you read your usual charts; existing inputs you have customised keep their saved values as normal.

πŸ§ͺ Test plan (before publishing)

  1. No fabricated secondary test. Find a trending distribution with two buying climaxes where the second makes a lower high and no distribution secondary test occurred between them (RSI>70 lower highs on a daily large-cap is the usual habitat). Pass: no secondary-test label prints on the pivot high after the second climax, and no "⚑ UTAD β€” PRIMARY SHORT ENTRY" appears there. Compare against a saved screenshot of the old build β€” the difference should be exactly the removal of that label and its downstream upgrade.
  2. Structures retire. Load a name that completed a full accumulation β†’ markup a year or more ago. Pass: a "Markup βœ“" label prints at the target or ~40 bars past the LPS; the dashed floor and ceiling lines are gone after it; the dashboard's next-step row reads "Cycle complete β€” trail longs, wait for new BC"; and no "βœ– Acc fail" prints during later corrections at the old floor.
  3. Invalidation alerts survive intrabar. Keep Confirm Spring/UTAD/SOS/SOW on bar close ON. On a live chart in an active structure, watch an intrabar dip through the invalidation level that recovers before the close. Pass: no "STRUCTURE FAIL β€” exit" alert fires and the structure state is intact at the close. Confirm history is unchanged: flip the input off and on β€” the historical label set must be identical either way.
  4. Measured-move target survives the LPS. Find a completed SOS β†’ LPS sequence. Pass: the dashboard "Target:" cell shows a number on the LPS bar and every bar after it, until the terminal state. With Show Measured-Move Target Line ON, a dotted line sits at that price.
  5. Volume-graded SOS/SOW. Compare a breakout on a clear volume spike against a quiet one, with Breakout Volume Multiple at 1.5. Pass: the spike prints "SOS β˜…" and the quiet one prints "SOS". Now raise the multiple to 5.0. Pass: all stars disappear but the count of SOS labels is unchanged β€” grading must not add or remove signals.
  6. LPS proximity. Set LPS max % above ceiling to 5, then to 20, on a name in a strong markup. Pass: at 5 there are no LPS labels well above the ceiling; at 20 the far ones return. Near-ceiling LPS labels must be present in both.
  7. No orphan lines. Sit on a live chart in an active range for a few minutes with Show Active Range Boundaries ON. Pass: exactly one ceiling and one floor line, with no stacking or ghosting as ticks arrive.
  8. Compile check. Run /pine-check (fast regression) before syncing β€” no compile was performed in the fix session.

πŸ“‹ Publishing blurb (paste into TradingView release notes)

  • Fixed a state bug that could fabricate a distribution secondary test after a second climax β€” and upgrade the next trigger to a "PRIMARY SHORT ENTRY" that was never earned. Those labels disappear from history.
  • Structures now retire. Once a markup or markdown completes, the script prints "Markup βœ“" / "Markdown βœ“" and removes the old floor and ceiling.
  • No more months-late "Acc fail" / "Dist fail" prints at levels that stopped mattering, and no bogus high-conviction Shakeouts chained off them.
  • Exit alerts no longer un-fire: the four structure-invalidation events now respect confirm-on-close, and also fire a guaranteed alert at bar close.
  • Event pivots (SC, AR, ST, BC, AR-D, DST, LPS, LPSY) respect confirm-on-close too β€” no more live-chart label flicker. Historical output is unchanged.
  • The measured-move target no longer disappears the moment the LPS prints. It is cached at the SOS and shown through markup, with an optional dotted target line.
  • New LPS proximity bound: a pullback 15% into markup can no longer be labelled a creek retest.
  • SOS/SOW breakouts are now volume-graded with a β˜…, matching the existing climax grading. Cosmetic only β€” no signal changes.
  • The failed-breakout retrace level is now an input instead of a hardcoded midpoint.
  • Fixed a drawing leak on the active range boundary lines.

---

Lock In Expiry β€” Lock In Expiry

_Unlock dates get the SEBI rule right, stop landing on days the market is shut, and the dashboard finally tells you how much rupee supply is coming._

⚠️ Behavior changes (read before trusting old signals)

ChangeOldNewWhy it matters
Capex toggle and the non-promoter unlockTicking "issue mainly for capex" pushed the non-promoter unlock out to 12 months on post-Aug-2021 mainboard IPOsThe capex carve-out applies to promoter tranches only; non-promoter stays at 6 monthsThe date moves 6 months EARLIER on every capex-flagged post-2021 mainboard IPO. Re-check any position you have sized or timed around that unlock. Promoter legs are unchanged
Allotment date can no longer land on a weekendListing minus N calendar days could fall on a Saturday or Sunday, and all six month-anniversary expiries inherited the skewThe allotment snaps back to the preceding trading dayWherever this happened, all six expiry dates shift 1–2 days earlier (then snap forward off non-trading days as before)
Anchor 50/50 split is regime-gatedThe 30-day/90-day anchor split was applied to every IPO, including pre-Apr-2022 ones that had no such splitPre-regime allotments show a single "βš“ Anchor 100%" tranche at 30 days and no 90-day lineVisible if you relax the max-age filter onto older IPOs: the phantom 90-day supply event disappears and the 30-day overhang doubles to its correct weight
Days-of-ADV overhangComputed from chart-timeframe volume β€” a 5-minute chart overstated it by roughly 75Γ—, a weekly chart understated it ~5Γ—Always computed from daily average volume, whatever chart you are onThe Γ—ADV figure in labels, the NEXT row and every tranche row is now comparable across timeframes
Alerts only on eligible symbolsAlert conditions ignored the eligibility filter, so unlock alerts could be created on a US stock or a decade-old listingAll eight alert conditions require the symbol to be Indian and inside the max-age windowYou can leave the indicator enabled globally without generating meaningless alerts
Weekly/monthly alert timingLanding and window alerts triggered one full higher-timeframe bar lateThey trigger on the bar that actually contains the unlockUp to 7 days earlier on weekly, a month on monthly. The impact scorecard's baseline price/volume re-latch with it, so measured post-unlock returns, relative performance, volume and drawdown on weekly/monthly charts will differ. Daily and intraday pick the same bar as before
Countdown is a calendar-date difference"0 days left" appeared from about 09:16 the day before expiryCounted midnight-to-midnight in exchange timeEvery countdown can read one day higher intraday; "0 days left" now appears only on the expiry date itself. Alert timing is unaffected
SME classification needs consecutive evidenceSix scattered odd-lot prints in the detection window permanently collapsed the lot GCD and silently reclassified an SME as Mainboard β€” changing every lock-in durationA collapse must be confirmed by N consecutive prints; a genuine migration still commits, now with a table warningPreviously misclassified charts revert to SME, which changes the non-promoter and promoter-minimum durations and therefore every expiry date on those charts
Future-dated listing/allotmentA future manual date passed eligibility and drew far-future expiriesThe indicator goes silent insteadTurn on the diagnostics row to see why

πŸ› Fixes

  • The capex toggle wrongly shifted the non-promoter expiry six months late β€” SEBI's capex carve-out is a promoter-tranche rule.
  • The allotment date could land on a weekend, putting a 1–2 day skew into all six month-anniversary expiries.
  • Days-of-ADV was computed on chart-timeframe volume, making the overhang figure wildly wrong on anything other than a daily chart.
  • Alert conditions ignored the eligibility filter, so unlock alerts could be armed on non-Indian symbols and long-listed stocks.
  • The anchor 50/50 split was applied to pre-Apr-2022 IPOs that never had one, drawing a phantom 90-day tranche and halving the 30-day weight.
  • On weekly and monthly charts, landing and window events fired one bar late, which also skewed the impact scorecard's measured returns.
  • The countdown floored instead of using calendar dates, showing "0 days left" from the previous morning.
  • A handful of stray odd-lot prints could permanently and silently reclassify an SME as Mainboard, changing every lock-in duration with no warning.
  • Labels advertised the requested impact window ("20d") even on chart timeframes where it was clamped much shorter.

✨ New features

Rupee unlock value column β€” how much stock is unlocking, in β‚Ή crore (shares Γ— close). Β· Inputs: none β€” appears when supply percentages and shares outstanding are known Β· What you'll see: a new "β‚Ή Cr" column in the dashboard between Γ—ADV and impact, filled for the NEXT row and every tranche row; "β€”" when the inputs are missing.

Exchange holiday list β€” unlock dates snap off listed holidays as well as weekends, in both directions. Β· Inputs: NSE holidays (DD-MM-YYYY, comma-separated) (empty) Β· What you'll see: with the list filled in, no unlock line lands on a closed day, even across festival clusters that run into a weekend. Empty means weekend-only snapping, exactly as before.

Trading-days countdown β€” calendar days and sessions, side by side. Β· Inputs: uses the holiday list above Β· What you'll see: the banner reads "N days Β· M trading", the NEXT row reads "Nd / Mtd", and each pending tranche's Days cell carries both. Without a holiday list it is a weekday count; the list makes it exact.

Explicit allotment date β€” skip the listing-minus-N-days estimate when you know the real date. Β· Inputs: Override allotment date (OFF), Allotment date Β· What you'll see: nothing until you switch it on; the offset method is bit-identical to before. Both paths snap backward off weekends and listed holidays.

Editable SME durations β€” the SME lock-in periods are now gazette-correctable like the mainboard regimes. Β· Inputs: SME non-promoter lock-in (months) (12), SME promoter minimum lock-in (months) (36) Β· What you'll see: identical output at the defaults ("1 Year" / "3 Years").

Anchor split regime date β€” third regulatory regime input alongside the existing two. Β· Inputs: Anchor 50/50 split from (01-Apr-2022) Β· What you'll see: pre-regime IPOs show "βš“ Anchor 100%" at 30 days and no 90-day tranche.

Classification-change warning β€” flags a genuine SMEβ†’Mainboard migration inside the detection window. Β· Inputs: GCD collapse needs N consecutive odd prints (3) Β· What you'll see: "⚠️ classification changed in window" appended to the dashboard's first row.

Diagnostics row β€” tells you why the indicator is silent. Β· Inputs: One-line reason when staying silent (OFF) Β· What you'll see: "πŸ’€ Lock-in inactive Β· no listing data / not an Indian symbol / listing date is in the future / IPO too old β€” Nd, max Md". Default off so it does not put a row on every non-Indian chart.

Effective impact window β€” labels print the window actually used after clamping. Β· Inputs: none Β· What you'll see: "6.7d impact" on a 5-minute chart, "42d impact" on monthly, unchanged "20d" on daily and weekly.

βš™οΈ Changed defaults

InputOldNewEffect
Lot-detection windowtitle: "(days after listing)"title: "(trading days after listing)"Title and tooltip only β€” the value (250) and the behavior are unchanged. It always counted daily bars; the label now says so. Existing chart instances keep every saved value they have.

No numeric default changed in this release. Every item above arrives as a new input, so it applies to existing chart instances immediately β€” in particular, check Anchor 50/50 split from and GCD collapse needs N consecutive odd prints if you run this on older or thinly-traded listings.

πŸ§ͺ Test plan (before publishing)

  1. Capex / non-promoter date β€” the one to check first. Open a post-Aug-2021 mainboard IPO chart on which you have "Mainboard: issue mainly for capex" ticked. Note the current Non-Promoter expiry date, then update the script. Pass: the date moves exactly 6 months earlier, and the promoter tranche dates do not move. Do this on every capex-flagged chart you own and write down the old and new dates before you trust any positioning around them.
  2. Weekend allotment snapping. Use Override listing date to set a listing that falls on a Monday or Tuesday with the default 2-day allotment offset, so listing-minus-2 lands on a weekend. Pass: the allotment resolves to the preceding Friday and all six expiry dates shift with it. Repeat with a listing where the offset lands mid-week. Pass: no change versus the old build.
  3. Holiday list. Enter a few real NSE holidays (e.g. 26-01-2026, 14-03-2026, 21-10-2026) and pick a chart where an unlock lands on or next to one. Pass: no unlock line sits on a listed holiday, and a festival-cluster date that runs into a weekend still resolves to a valid trading day. Clear the field. Pass: output reverts to the weekend-only dates.
  4. Trading-day countdown. With the holiday list filled and a pending unlock more than a month out. Pass: the banner shows "N days Β· M trading" with M < N; the NEXT row shows "Nd / Mtd"; and M matches a manual weekday count minus the listed holidays in the interval.
  5. β‚Ή-crore column. On a recent IPO, fill in the supply-sizing percentages. Pass: the dashboard shows seven columns with "β‚Ή Cr" between Γ—ADV and impact, the NEXT row and each tranche row carry a figure, and it reconciles with (supply % Γ— shares outstanding Γ— current price)/10^7. Clear the supply percentages. Pass: the cells show "β€”" rather than a wrong number.
  6. Alert eligibility. Try to create each unlock alert on a US symbol (e.g. NASDAQ:AAPL) and on an Indian stock listed more than the max-age window ago. Pass: none of the eight conditions fire. Repeat on an in-window Indian IPO. Pass: they fire normally.
  7. Days of ADV is timeframe-stable. Note the Γ—ADV figure for the next unlock on a daily chart. Switch to 5-minute, then weekly. Pass: the figure is the same on all three (previously it inflated ~75Γ— intraday and shrank ~5Γ— on weekly).
  8. Countdown boundary. On the trading day before an expiry, check the banner during market hours. Pass: it reads "1 day", not "0 days left". On the expiry date itself. Pass: "0 days left".
  9. Higher-timeframe alert bar. Put the indicator on a weekly chart of a stock with a past unlock. Pass: the landing event marks the weekly bar that contains the unlock date, not the one after it. Note that impact-scorecard numbers on weekly/monthly will differ from your previous readings β€” expected.
  10. SME classification. Load an SME listing that previously displayed as Mainboard. Pass: it now reads SME, the durations revert to the SME periods, and expiry dates change accordingly. On a genuine SMEβ†’Mainboard migration. Pass: the collapse still commits and the first dashboard row appends "⚠️ classification changed in window".
  11. Diagnostics. Turn on One-line reason when staying silent and load a US symbol, then an old Indian listing. Pass: one muted row explaining each case. Turn it off. Pass: the chart is clean again.

πŸ“‹ Publishing blurb (paste into TradingView release notes)

  • Important: on post-Aug-2021 mainboard IPOs with "issue mainly for capex" ticked, the non-promoter unlock date moves 6 months earlier. SEBI's capex carve-out applies to promoter tranches only. Recheck any dates you have positioned around.
  • Allotment dates no longer land on weekends. Where they used to, all six expiry dates shift 1–2 days earlier.
  • New optional NSE holiday list β€” unlock dates now snap off listed holidays as well as weekends, in both directions.
  • New trading-days countdown alongside calendar days: "N days Β· M trading" in the banner, "Nd / Mtd" in the table.
  • New β‚Ή-crore unlock value column, so you can see the rupee size of the supply, not just the percentage.
  • Days-of-ADV now always uses daily volume β€” the figure was badly wrong on intraday and weekly charts.
  • Unlock alerts can no longer be created on non-Indian symbols or stocks past the age filter.
  • On weekly and monthly charts, unlock alerts now fire on the bar that contains the unlock instead of the one after it.
  • Countdowns are calendar-date based: "0 days left" appears on the expiry date itself, not from the previous morning.
  • SME detection now needs consecutive confirming prints, so a few stray odd lots can no longer silently reclassify an SME and change all its lock-in durations. Genuine migrations are flagged in the table.
  • New optional explicit allotment-date input, editable SME durations, an anchor-split regime date, and a diagnostics row that explains why the indicator is staying silent.

---

Defensive Asset Screener β€” Defensive Asset Screener

_Runs on any timeframe again, on a score that finally means what it says, with sector benchmarks that match the stock._

⚠️ Behavior changes (read before trusting old signals)

ChangeOldNewWhy it matters
Chart timeframeEvery rolling statistic silently used chart bars β€” a 15-minute chart massively understated volatility then annualised it by √252; a weekly chart's "252-day" window was really five years. A mid-cycle fix then made the script refuse to run outside dailyA daily sampling engine feeds correlation, volatility, 52-week high/low, drawdown and the downturn tally, so the script runs on any chart timeframe againIntraday and hourly charts now show the same correlation, volatility, 52-week and downturn stats as the daily chart. Daily-chart values are equivalent to before. Honest limits: above-daily charts sample once per chart bar, and short-history intraday charts show N/A until enough daily samples accumulate rather than showing something wrong
Score scaleComponents summed to 135, not the documented 100, and a Γ—1.5 regime multiplier saturated everything above ~67 to 100Each component is gated by its method toggle, the maximum accumulates only enabled components, and the score is normalised to a true 0–100Every score changes. With all methods enabled, scores rescale by roughly 100/135 β€” an old 81 reads about 60. Retune your alert thresholds. The default threshold stays at 60, but 60 now means something different
Regime no longer moves the scoreThe volatility/drawdown regime multiplied the score, so a VIX spike could flip an asset "defensive" with no change in the asset itselfThe score is regime-independent; the regime is a separate badge with its own four alerts"Asset Became / No Longer Defensive" alerts now fire on genuine asset changes only. Asset rankings are stable across regimes
Verdict ruleThe five detection-method toggles fed nothing visible β€” only the adjusted score drove the verdictVerdict = manual override OR score β‰₯ threshold OR at least 2 methods firedThe Detection Methods toggles now visibly matter. Some assets flip verdict without any change in score
Beta windowBeta mixed a 252-day correlation with a 20-day volatility ratio β€” neither fast nor slowCorrelation and both volatilities use the same lookback windowDisplayed volatility ratio and annualised volatility shift from 20-day-reactive to 252-day-stable, and the beta score component moves with them
Sector benchmarkingA bare "IT" substring matched UTILITIES and HOSPITALITY, so Indian utilities were benchmarked against an IT index; "Health Technology" hit the technology branch before pharma, sending healthcare to IT (US: to QQQ, never XLV); FMCG tokens never matched "Consumer Non-Durables"Branch order and tokens rebuilt on TradingView's actual sector vocabulary; industry is consulted for REITs and precious metalsSector 1-year comparisons are against the right index. Four previously unreachable defensive-sector score bonuses can now fire
Downturn engineInteger division made the outperformance ratio binary β€” 0 or 1 β€” so the score component was all-or-nothing and the table could show "0.0% (13/27d)"True fractional ratioScore component β‘€ is continuous and the "outperformed in downturns" method can fire on a partial record
Keyword matchingSubstring matching flagged SHYAMMETL ("SHY"), TIPSINDLTD ("TIPS") and every USDT/USDC pair as defensiveDescriptive tokens stay substrings; ambiguous short tokens require whole-ticker equality; stablecoin tokens match only as the bare symbol or a crypto base currencyThose false positives are gone. GOLDBEES, GDXJ and INDIAVIX still match; BTCUSDT, ETHUSDC, USDTRY and USDCAD no longer do
Sector detection no longer clobbersThe sector branch overwrote earlier keyword or manual detectionsIt contributes to the classification instead of replacing itKeyword and manual detections survive a sector miss

πŸ› Fixes

  • Every rolling statistic was chart-timeframe dependent despite being labelled "daily" β€” the fix wave made the script error out on non-daily charts, and this release replaces that with a proper daily sampling engine so it works everywhere.
  • Integer division reduced the downturn-outperformance ratio to 0 or 1, breaking a whole score component and producing self-contradicting table cells.
  • A bare "IT" substring routed Indian utilities and hospitality to an IT benchmark; "Health Technology" was captured by the technology branch before pharma, so healthcare never reached the healthcare sector index.
  • Ticker keyword matching produced false positives on ordinary stocks (SHYAMMETL, TIPSINDLTD) and on every stablecoin-quoted crypto and USD forex pair.
  • The sector branch assigned rather than accumulated the defensive flag, wiping out keyword and manual detections.
  • The five detection methods were computed but never reached the visible verdict.
  • The 0–100 score plots rendered on the price scale of an overlay indicator, drawing a flat line near zero on index charts; they now default to hidden and can be re-enabled from the Style tab.
  • Adaptive table colors and emoji ignored your correlation and beta threshold inputs and used hardcoded bands.
  • Telecom stocks were benchmarked against a media index, and India had no utilities/power branch at all.

✨ New features

Detection-method checklist row β€” see exactly which of the five methods fired. Β· Inputs: the existing πŸ›‘οΈ Detection Methods toggles Β· What you'll see: a new table row "Methods n/5" with βœ… fired Β· βœ– enabled but quiet Β· ⊘ disabled per method, each with a tooltip showing the current value against its threshold. Table grew to 13 rows.

Verdict wiring β€” the verdict is now score OR β‰₯2 methods. Β· Inputs: Defensive Score Threshold (60) Β· What you'll see: the chart label, chart background and table verdict all follow the same rule; two new data-window exports, "Verdict Defensive" and "Methods Fired".

Confirmed daily bar mode β€” compute everything from the previous confirmed daily bar. Β· Inputs: Confirmed Daily Bar (OFF) Β· What you'll see: no change until you enable it; then alerts stop firing intraday on values that can still move, at the cost of a one-day lag.

India power/utilities benchmark and honest telecom β€” utilities, power and electric map to a power index; telecom maps to the broad market rather than a media index. Β· Inputs: none Β· What you'll see: correct sector 1-year comparisons for Indian utilities and telecom names. An unresolvable sector proxy now degrades those cells to N/A instead of erroring the script.

Threshold-aware colors β€” table cell backgrounds and the 🟒/🟑/πŸ”΄ markers for long-term correlation, short-term correlation and beta key off your own threshold inputs. Β· Inputs: Inverse Correlation Threshold (-0.3), Negative Beta Threshold (-0.2) Β· What you'll see: the green band moves when you move the threshold, and the tooltips' band tables follow.

βš™οΈ Changed defaults

InputOldNewEffect
Defensive Score Threshold60 on a 0–135-ish scale inflated by a Γ—1.5 regime multiplier60 on a true 0–100 scaleThe number is the same but the scale beneath it is not. Existing chart instances keep their saved threshold β€” and that saved value now means something different. Expect to retune it, and to retune any alerts built on it
Plot Defense Score / Threshold plotsDrawn on the price scaleDefault to hiddenThey rendered as a flat line near zero on index charts. Re-enable from the Style tab after pinning to a separate scale

Everything else keeps its saved value on existing chart instances as normal.

πŸ§ͺ Test plan (before publishing)

  1. Timeframe invariance β€” the headline check. Load a liquid ETF or large-cap (e.g. NSE:GOLDBEES, NSE:NIFTY, or AMEX:GLD) on a daily chart and note the long-term correlation, beta, annualised volatility, 52-week high/low and downturn rate. Switch to 60-minute, then 15-minute. Pass: the same values, within rounding. Switch to weekly and monthly. Pass: the script runs (no runtime error) β€” remember those timeframes sample once per chart bar, so a 252-window is 252 weeks there. On a fresh intraday chart with little history. Pass: long-window cells read N/A rather than a wrong number.
  2. Score renormalisation and threshold retune. With all five detection methods enabled, note the score on three assets you know well. Pass: each is roughly 100/135 of its old value (an old 81 lands near 60), the score tooltip shows "raw points / enabled max / normalized", and the score never exceeds 100. Now disable two methods. Pass: the score stays on a 0–100 scale rather than shrinking. Then re-set your alert thresholds on every existing alert built on this script and record the new values.
  3. Regime is decoupled. Watch an asset across a VIX spike (or lower VIX Risk Threshold to force High Risk). Pass: the regime badge flips but the score does not move, and no "Asset Became Defensive" alert fires from the regime change alone.
  4. Sector detection. Load an Indian utility or power name (e.g. NSE:NTPC, NSE:POWERGRID). Pass: the sector benchmark reads the power index, not an IT index. Load an Indian pharma name (e.g. NSE:SUNPHARMA) and a US healthcare name (e.g. NYSE:JNJ). Pass: pharma/health routes to the health branch, not to IT/QQQ. Load an Indian telecom name (e.g. NSE:BHARTIARTL). Pass: benchmarked against the broad market, not a media index.
  5. Keyword false positives. Load NSE:SHYAMMETL and NSE:TIPSINDLTD. Pass: neither is flagged defensive by the keyword method. Load BINANCE:BTCUSDT and a USD forex pair such as FX:USDCAD. Pass: not flagged. Load NSE:GOLDBEES and AMEX:GDXJ. Pass: still flagged.
  6. Methods checklist row. With mixed toggles (say correlation and beta on, downturns off). Pass: the "Methods n/5" row shows βœ… for what fired, βœ– for enabled-but-quiet and ⊘ for the disabled one; the count matches the label's "Methods n/5"; and an asset with 2 methods fired but a sub-threshold score is still called DEFENSIVE.
  7. Downturn engine. Find an asset with a partial downturn record (at least 20 down-days, outperforming on some of them). Pass: the downturn rate shows an intermediate percentage, not 0.0% or 100.0%, and the table no longer contradicts itself (no "0.0% (13/27d)").
  8. Single-window beta. Pass: the beta tooltip states that correlation and both volatilities use the same lookback, and the Vol Ratio tooltip no longer claims a 20-day rolling window.
  9. Confirmed daily bar. Turn on Confirmed Daily Bar intraday. Pass: all stats freeze at yesterday's close and do not move with the developing session.
  10. Compile check. Run /pine-check before syncing β€” no compile was performed in the fix session. Expect score values and non-daily stats to differ by design.

πŸ“‹ Publishing blurb (paste into TradingView release notes)

  • The screener works on any chart timeframe again. All statistics are now computed from true daily samples, so a 15-minute chart shows the same correlation, beta, volatility and 52-week numbers as the daily chart.
  • The defense score is now a real 0–100. It used to sum to 135 and then get multiplied by a regime factor that saturated everything above ~67. Expect every score to change β€” an old 81 now reads about 60. Please retune your alert thresholds.
  • The market regime no longer moves the score. It is a separate badge with its own alerts, so a VIX spike can no longer flip an asset "defensive" with zero change in the asset.
  • The Detection Methods toggles finally matter: an asset is Defensive when the score clears your threshold or at least 2 methods fire.
  • New Methods checklist row in the table β€” βœ… fired, βœ– enabled but quiet, ⊘ disabled, with per-method tooltips.
  • Sector benchmarking fixed. Indian utilities were being compared against an IT index because "UTILITIES" contains "IT"; healthcare was routed to technology before it ever reached the health branch.
  • New India power/utilities benchmark, and telecom now benchmarks against the broad market instead of a media index.
  • Keyword detection no longer flags SHYAMMETL, TIPSINDLTD or stablecoin-quoted crypto and USD forex pairs as defensive. Gold, VIX and bond tickers still match.
  • The downturn-performance engine was returning only 0% or 100% because of an integer division. It is now a real fraction.
  • Beta uses a single consistent window for correlation and both volatilities.
  • Table colors and emoji now follow your own correlation and beta threshold inputs.
  • New optional "Confirmed Daily Bar" mode for alerts that do not move intraday.

---

MFMSI Pro β€” US Market Sentiment - Multi-Factor Indicator

_Three factors that were quietly dead or lying are now live, and the composite tells you honestly when a feed has gone dark._

⚠️ Behavior changes (read before trusting old signals)

ChangeOldNewWhy it matters
RSI divergence factorStructurally dead β€” the detector compared a pivot against itself, so the divergence score sat permanently at neutral 50 and its two alerts could never fireThe pivot store is updated after detection, so a new pivot is compared against the stored previous oneThe divergence factor now moves, the composite shifts with it, and the two RSI-divergence alerts become fireable for the first time
Dead feedsA dead or unavailable feed silently scored a neutral 50 at full weight, diluting the composite toward 50 with no indicationA dead feed's weight is dropped from the total and the remaining live factors renormalise to 100%The composite reflects only what it can actually see. If every weighted factor is dead it holds at neutral 50 instead of printing 0 (max bearish). Notable: on the benchmark itself (e.g. SPY) the relative-strength weight is now dropped entirely rather than pinned at 50
Percentile readoutsInteger division meant every percentile showed only 0th or 100thCorrect float arithmetic, now via the built-in percentile rankPercentile cells span the full range. Ties rank marginally higher than before, and the warmup period shows NaN instead of a bogus 0
Percentile windows on intraday charts"252 bars" meant chart bars β€” about two weeks on an hourly chartThe PCR and VIX percentile and 52-week windows are anchored to daily dataA true trading year on any chart timeframe. Side benefit: dynamic PCR levels are valid from the first bar intraday instead of blanking for 252 bars. The composite's own percentile stays chart-local by design and says so in its tooltip
McClellan OscillatorBuilt on raw net advances, which drift with the exchange's issue countRatio-adjusted: net advances as a share of total issuesImmune to issue-count drift. All thresholds are preserved, but the values differ from raw-net, so breadth-thrust timings can shift on historical bars
Price momentum in the compositeBolted on after normalisation as an unweighted Β±15 with an unbounded ROC kicker β€” the "sentiment" reading became a momentum chaser on volatile namesA properly weighted factor inside the normalisationAt the default 5% weight, momentum now moves the composite by at most about Β±2.4 points instead of Β±15. Readings on trending names will be meaningfully less momentum-chased
VIX and TRIN scoringStep functions that produced plateaus and jumpsContinuous: VIX maps its daily percentile through the old anchors; TRIN is scored from a daily log z-score, contrarian to Β±2Οƒ then flipping toward the old reversal extremesSmoother factor texture. TRIN also changes level, not just texture β€” it now measures relative to its own year rather than absolute bands
Adaptive PCR thresholdsThe dynamic branch pulled the upper (fear) zone inward as volatility rose β€” the opposite of what the tooltip promisedBoth extreme zones move toward the 52-week extremes as volatility rises, widening the neutral bandFewer extreme PCR signals in high-volatility regimes, which is the documented intent. The static path already behaved correctly and is unchanged
PCR extreme signalsCrossed raw PCR against the thresholds; the "PCR EMA Length" input was computed and never usedCross the smoothed PCR signal line, as the input tooltip always describedSlightly later but far less whipsawy PCR extreme signals and alerts. The dashboard still shows raw PCR against the thresholds
Flow score with toggles offDisabled flow components still added 50 to the numerator while the denominator counted only enabled ones β€” MFI-only could push flow above 100 straight into the compositeDisabled components contribute nothingLatent under all-on defaults; it detonated the moment you turned a flow component off. No change at defaults
Sector auto-detectionUsed GICS/Morningstar names TradingView does not emit, so most stocks silently fell back to the broad-market ETF β€” counting the index twice while the dashboard implied a sectorMatches TradingView's actual sector taxonomy first, with the legacy names as fallbacksAuto-detected symbols now get a real sector ETF, which changes the relative-strength factor on most stocks
Blank composite on new chartsSeveral routes let one na value poison the whole composite β€” most visibly, dynamic levels blanked the score for the first ~252 bars of every chartGuarded to neutral where a feed is genuinely absentThe score prints where it previously left a gap

πŸ› Fixes

  • The RSI divergence detector was structurally dead: it updated its pivot store before comparing, so it always compared a value to itself. The factor was permanently neutral and its two alerts could never fire.
  • Percentile calculations used integer division, so every percentile readout could only be 0th or 100th.
  • A dead or unavailable data feed scored neutral 50 at full weight, silently dragging the composite toward the middle with no indication anything was wrong.
  • With any flow component toggled off, the flow score could exceed 100 and feed that inflated value straight into the composite.
  • Several na routes blanked the whole composite, including a dynamic-levels path that blanked the score for the first ~252 bars of every chart by default, a zero-range bar poisoning money flow for 20 bars, and a degenerate self-ratio blanking the score on the benchmark itself.
  • Candle-ratio integer truncation distorted the price/volume score's branch thresholds.
  • A standard-deviation call sat inside a loop, executing many times per bar and corrupting its own rolling window.
  • Adaptive PCR thresholds narrowed the fear zone in high volatility β€” the inverse of the documented behavior.
  • The price-momentum bolt-on was unweighted and unbounded, letting it dominate a composite that advertised weighted factors.
  • Sector auto-detection used a taxonomy TradingView does not emit, so most symbols fell through to the broad-market ETF.
  • Feed symbols were unprefixed with invalid-symbol errors suppressed, so a wrong or unavailable symbol degraded silently.
  • Two dead inputs (an unused OBV rate-of-change and a signal-size control that could never apply) were removed, and a third β€” PCR EMA length β€” was wired up as documented.

✨ New features

Data-health row β€” the dashboard tells you when a feed has gone dark. Β· Inputs: none Β· What you'll see: a "⚠️ DATA:" row listing the dead feeds, with a tooltip showing the sum of live factor weights after renormalisation.

True renormalisation β€” dead feeds drop out of the weight total instead of scoring neutral at full weight. Β· Inputs: the existing per-factor weight inputs Β· What you'll see: a composite built only from live factors; neutral 50 held if everything weighted is dead.

Price trend as a real weighted factor β€” momentum is normalised and blended through its own weight. Β· Inputs: Price Trend Weight (%) (5) Β· What you'll see: a much smaller momentum contribution. The raw momentum balance still drives the dashboard's NEUTRAL-BULL / NEUTRAL-BEAR tilt.

Continuous VIX and TRIN scoring β€” percentile and z-score based instead of step functions. Β· Inputs: existing VIX threshold inputs still drive dashboard status and alerts Β· What you'll see: no more score plateaus or jumps; TRIN measured against its own trailing year, with absolute bands as a fallback until enough history accumulates.

Ratio-adjusted McClellan β€” computed as a share of total issues. Β· Inputs: none Β· What you'll see: the same threshold scale, values immune to issue-count drift.

Daily-anchored percentile windows β€” PCR and VIX percentiles and 52-week ranges pull from daily data. Β· Inputs: Percentile Lookback (bars) (252) Β· What you'll see: a true trading year on any chart timeframe, and dynamic PCR levels valid from the first intraday bar.

Confirmed bars only β€” gates every signal, alert and state transition to confirmed closes. Β· Inputs: Confirmed bars only (OFF) Β· What you'll see: no change until you switch it on; then no intrabar flicker across all 20 alert conditions, the signal labels and the signal-state chain.

βš™οΈ Changed defaults

InputOldNewEffect
PCR Type menuincluded "PCCA" and "PCCP"PCCE / PCC / PCCI / CUSTOMThose two options never existed in the live catalog. A saved "PCCA" or "PCCP" selection falls back to PCCE silently β€” open Settings on existing charts and confirm your PCR type
Custom PCR SymbolunprefixedUSI:PCCEAll feed symbols now carry explicit exchange prefixes (USI: and CBOE:), so a bad symbol shows up in the new data-health row instead of degrading silently
Price Trend Weight (%)did not exist β€” momentum was an unweighted Β±15 addend5New input. Momentum's influence on the composite drops from up to Β±15 points to roughly Β±2.4 at the default
Component score plotsdrawn on the price scaledefault to hidden0–100 series cannot render usefully on an overlay indicator's price scale. Re-enable individually from the Style tab
Multi-Timeframe Contextpresented as an active featureretitled "(currently inactive)"The setting is computed but not wired into the composite or the signals. The title and tooltip now say so

Existing chart instances keep their saved values for every pre-existing input; the new ones take effect immediately.

πŸ§ͺ Test plan (before publishing)

  1. RSI divergence is alive. Put the indicator on a US large-cap with a clear recent divergence (e.g. NASDAQ:AAPL or NASDAQ:NVDA, daily). Open the dashboard's RSI divergence cell and step across the divergence. Pass: the divergence score moves off 50 and the status changes from a permanent NEUTRAL. Create the two RSI-divergence alerts. Pass: they can be armed and they fire on the divergence bar (previously impossible).
  2. Percentiles span the range. With Show Percentile Rankings on and Percentile Lookback at 252, check the composite, PCR and VIX percentile cells across several days. Pass: they show intermediate values (e.g. 34th, 67th) and not only 0th/100th. During warmup. Pass: NaN rather than a bogus 0.
  3. Dead feeds drop weight. Load a chart during a session when at least one breadth feed is unavailable, or temporarily point Custom PCR Symbol at a nonsense ticker with CUSTOM selected. Pass: the "⚠️ DATA:" row appears naming the dead feed, its tooltip reports the live-weight sum, and the composite does not drift toward 50 from that feed. Then load the benchmark itself (AMEX:SPY). Pass: relative strength is reported as dropped, not scored at neutral 50.
  4. McClellan is ratio-adjusted. Compare breadth-thrust markers on a long history against your previous screenshots. Pass: thresholds are unchanged (Β±50 thrust, Β±100 extremes) but some thrust timings differ β€” expected β€” and the input and dashboard tooltips describe the ratio-adjusted calculation.
  5. Momentum is demoted. Take a strongly trending, volatile name and note the composite. Set Price Trend Weight (%) to 0, then back to 5, then to 15. Pass: the composite moves by only a couple of points between 0 and 5, and the reading on the trending name is visibly less momentum-driven than the old build. The dashboard's NEUTRAL-BULL / NEUTRAL-BEAR tilt still responds.
  6. Percentile windows on intraday. Load a 60-minute chart with Dynamic Historical Levels on. Pass: the dynamic PCR levels and the PCR/VIX percentiles are populated from the very first bars, and the values match the daily chart's. Previously they blanked for 252 bars and, once populated, covered about two weeks.
  7. PCR type menu. Open Settings on an existing chart that had PCCA or PCCP saved. Pass: the menu shows PCCE / PCC / PCCI / CUSTOM and the selection has fallen back to PCCE β€” set it deliberately and note the change.
  8. Adaptive thresholds widen. With Adaptive Thresholds and Dynamic Historical Levels on, compare a calm period against a high-volatility one. Pass: in high volatility both extreme zones sit closer to the 52-week extremes and the neutral band is wider, producing fewer extreme signals.
  9. PCR signals use the smoothed line. Turn on Show PCR Extreme Signals and compare against the old build. Pass: signals arrive slightly later and there are fewer rapid reversals. The dashboard's PCR status still shows raw PCR against the thresholds.
  10. Flow score with toggles off. Disable CMF and OBV, leaving MFI only. Pass: the flow score stays within 0–100 and the composite does not jump. Re-enable both. Pass: the composite returns to its all-on value.
  11. Sector detection. Load several US names across sectors (e.g. NYSE:JNJ, NYSE:XOM, NASDAQ:MSFT, NYSE:PG). Pass: each reports a sector ETF appropriate to its sector rather than falling back to the broad-market ETF.
  12. Confirmed bars only. Enable it on a live chart. Pass: signal labels and alert conditions stop changing intrabar and settle at the close. Historical output is unchanged.

πŸ“‹ Publishing blurb (paste into TradingView release notes)

  • The RSI divergence factor was structurally dead β€” it compared a pivot against itself, so it sat at a permanent neutral and its two alerts could never fire. It now works, and the composite shifts accordingly.
  • Percentile readouts could only ever show 0th or 100th because of an integer division. They now span the full range.
  • A dead data feed used to score a silent neutral 50 at full weight. Dead feeds now drop their weight entirely, the live factors renormalise, and a "⚠️ DATA:" row on the dashboard names what went dark.
  • The McClellan Oscillator is now ratio-adjusted, so it survives changes in the exchange's issue count. Thresholds are unchanged but some historical thrust timings differ.
  • Price momentum was bolted on after normalisation as an unweighted Β±15 with an unbounded kicker β€” the sentiment score was chasing momentum on volatile names. It is now a proper weighted factor at 5% by default.
  • PCR and VIX percentile windows are anchored to daily data, so "252" means a trading year on any chart timeframe β€” not two weeks on an hourly chart. Dynamic levels are valid from the first intraday bar.
  • VIX and TRIN are scored continuously instead of in steps. TRIN is now measured against its own trailing year rather than absolute bands.
  • Adaptive PCR thresholds now widen in high volatility as the tooltip always promised (the fear zone used to narrow), and PCR extreme signals now use the smoothed PCR line the "PCR EMA Length" input described: later, but far less whipsawy.
  • Fixed a latent bug where turning off a flow component pushed the flow score above 100 and into the composite.
  • Sector auto-detection rebuilt on TradingView's actual taxonomy β€” most stocks used to silently fall back to the broad-market ETF.
  • The PCR menu now lists only the symbols that exist (PCCE / PCC / PCCI / CUSTOM). If you had "PCCA" or "PCCP" saved, please re-select your PCR type.
  • New "Confirmed bars only" toggle to stop intrabar flicker across all signals and alerts.

---

29 July 2026 wave β€” IN Analytics Pro v2.3 Β· US ANALYTICS

_The cheat entry, and the end of frictionless backtest numbers._

⚠️ Behavior changes (read before trusting old signals)

ChangeOld behaviorNew behaviorWhy it matters
Backtest is no longer frictionlessWin rate and average PnL assumed zero costEvery closed trade is charged a full statutory + brokerage + slippage round trip (India β‰ˆ 0.22% + DP + slippage; US β‰ˆ SEC 31 + FINRA TAF + slippage)Win rate and average both drop. On some symbols an average that was positive turns into a losing compounded chain β€” that gap was always there, it just wasn't shown
New "Backtest Risk" rowOnly win% Β· avg Β· nAdds the compounded Γ—multiple, max drawdown, and best/worst single tradeThe Γ—multiple is the honest answer to "what would I have?". (1 + avg)^n is arithmetic and always overstates it β€” the tooltip now prints both side by side so the gap is visible
New CHEAT BUY entry class (ON)Three entry classesFourth class: a Stage-2 advance pulling back into its 40-week (200-day) EMA on dry volumeMore entries, all of them continuation setups with a stop a fraction of an ATR away rather than a base-depth
Campaign trims need confluence (default ON)Either the ATR-extension or the volume-stop factor trimmed a trancheBoth must be live on the same barFar fewer trims. A lone factor on a pyramided campaign (β‰₯2 tranches) now does nothing at all β€” no trim and no full SELL β€” so the core rides to the structural SELL. Set the toggle OFF to restore the old behavior
S1 / S2 relabelled by sequenceS1 = "ATR-extension trim", S2 = "volume-stop trim" β€” cause labels, while P1/P2 were sequence labelsS1 = the campaign's first trim, S2 = every later oneA campaign whose trims were all volume-driven printed S2, S2, S2 and never an S1, and a campaign's very first trim could read "S2". The cause is not lost β€” the hover tooltip names it
"Current PnL%" during a campaign (IN only)Open leg only, gross β€” a campaign that trimmed at +30% could read +5% while actually being +20%, then jump at the final SELLBanked trims plus the open leg, net of costs β€” exactly what the campaign-ending SELL will bookThe live cell and the realized booking can no longer disagree. US already worked this way
"Last 3 PnL%" and "Current PnL%" are netGrossNet of the cost modelConsistently lower, and consistent with the backtest row

πŸ› Fixes

  • S1/S2 were cause labels masquerading as sequence labels (IN only β€” US was already correct). S1 meant "ATR-extension trim" and S2 meant "volume-stop trim", while P1/P2 meant first add / second add. On any name whose trims were volume-driven you would never see an S1 in your life, and the first trim of a campaign could appear as "S2". Now sequential, with the trigger named in the tooltip.
  • Trim tooltip named the wrong witness. The cause lines keyed off the factors' rising edges. In confluence mode a trim fires on the both-active edge, by which point one factor's own edge is already history β€” so the tooltip could report a volume-stop when the extension was the live condition. Both lines now read the level conditions and print together on a confluence trim.

✨ New features

CHEAT BUY β€” the 40-week EMA bounce. Weinstein's continuation entry, and the tightest-stop setup in the model. Fires when a Stage-2 advance pulls all the way back into its 40-week (200-day) EMA. All six conditions required:

  • the bar's low reaches within 0.5 ATR of the MA, and the close doesn't end more than that below it
  • the close sits in the upper half of the bar's range β€” buyers took the MA back the same bar
  • volume ≀ 1.5Γ— the 20-bar average: a dry rest, not distribution
  • the 40-week MA itself is rising over 10 bars
  • a live Stage 2 was read within the last 60 bars β€” beyond that the advance is stale and the touch is just a downtrend passing through
  • relative strength positive (Mansfield on IN, ratio-vs-SPX on US)

It only arms after price has traded β‰₯2 ATRs above the MA, so the setup must come down to the MA out of an advance rather than grinding sideways on it β€” and the arm is consumed on entry, giving exactly one CHEAT BUY per pullback rather than a string of them. Timeframe-aware: 200 bars on daily, 40 on weekly, 10 on monthly.

CHEAT CLOSE β€” the invalidation. Armed only for positions a cheat entry opened (a TREND BUY does not get a 40-week-MA stop). A close below the MA minus 0.75 ATR exits in full, bypassing every churn gate, never as a partial trim β€” a broken 40-week MA invalidates the whole thesis. On IN it also overrides the webhook stop, so a cheat trade routes with the MA stop instead of the generic ATR stop. A cheat position closed by score/extension/volume instead is labelled CHEAT SELL, so a cheat round trip always reads as a pair.

Real-world cost model (new "Backtest Costs" input group).

India (IN Analytics), rates current 29 Jul 2026:

LegSTTStampExchangeSEBIGSTDP
Buy0.100%0.015%0.00297%0.0001%18% on brok+exch+SEBIβ€”
Sell0.100%β€”0.00297%0.0001%18% on brok+exch+SEBIβ‚Ή12.50 + GST

Presets: Dhan delivery (β‚Ή0 brokerage, default) Β· Discount broker (β‚Ή20/order) Β· Custom Β· Off. Round trip β‰ˆ 0.222% + DP + slippage; slippage defaults to 5 bps per side.

US (US ANALYTICS):

ChargeRateSide
SEC Section 310.00206% ($20.60 per million, effective 4 Apr 2026)Sell only
FINRA TAF$0.000166/share, capped $8.30/tradeSell only
Commission$0 retail, or IBKR Pro $0.005/share ($1 min, 1% max)Both
Slippage3 bps defaultBoth

No stamp duty, no transaction tax, no depository charge β€” the US stack is dominated by slippage rather than statute. Note that TAF is per share, so as a percentage it is 0.000166 / price: a $10 ticker pays roughly 40Γ— what a $400 ticker pays in percentage terms. Capital-gains tax is deliberately not modelled β€” it is assessed on your annual net position, not per trade, so folding it in would double-count against losers.

Sell-side levies are charged on exit turnover, so a bigger winner correctly pays more. Campaign trims are netted at their own weight, so a pyramided campaign pays exactly one round trip on committed capital β€” no more, no less.

"Backtest Risk" row. Γ—3.4 Β· maxDD 18.2% Β· best +41% / worst βˆ’12%. The Γ—multiple chains every closed trade in sequence, net of costs. Max drawdown is the deepest peak-to-trough fall of that same curve β€” the pain you would have had to sit through to collect the multiple. Best/worst expose a multiple carried by a single outlier.

"40W EMA / Cheat" row. Distance to the 40-week EMA in ATRs plus live machine state: ARMED / not armed / stage-2 stale / cheat position with its live stop.

Trim-mode toggle. "Trim needs BOTH exit factors (confluence)", default ON. OFF restores either-factor trimming and labels the marker by cause: S[ATR], S[VS], S[A+V]. Alerts and the webhook stay sequence-based in both modes (s1/s2), so flipping a display preference never changes what a downstream router receives.

βš™οΈ Changed defaults

  • Backtest Costs = ON (Dhan delivery on IN, zero-commission retail on US). Set the model to "Off (frictionless)" to reproduce the old numbers exactly.
  • Slippage 5 bps/side (IN), 3 bps/side (US). On IN this is auto-netted against the legacy "Backtest slippage" input, so slippage can never be counted twice.
  • Assumed capital per trade β‚Ή1,00,000 (IN) / $10,000 (US) β€” the only place trade size enters a percentage-based backtest. Set it to what you actually deploy: on a β‚Ή25k trade a β‚Ή15 DP charge is 0.06%, on β‚Ή5L it is 0.003%.
  • CHEAT BUY = ON, Trim confluence = ON.

πŸ§ͺ Test plan (before publishing)

  1. Costs actually bite. Note the Model Backtest cell, then set Cost model to "Off (frictionless)". Pass: the average rises and the cell's suffix flips from "(net)" to "(gross)". Set it back β€” the numbers return exactly.
  2. The compounding gap is visible. Hover Model Backtest. Pass: the tooltip states the naive (1 + avg)^n figure and the real chained Γ—multiple, and they differ. On a symbol with a positive average but a Γ—multiple below 1.0, that is the feature working, not a bug.
  3. Drawdown is real. Pass: Backtest Risk maxDD is > 0 on any symbol with more than a couple of closed trades, and best β‰₯ worst.
  4. Cheat arms and fires. On a Stage-2 name, watch the "40W EMA / Cheat" cell. Pass: it reads ARMED only after price has been β‰₯2 ATRs above the 40W EMA, and a violet CHEAT triangle appears only on a bar whose low reaches the MA band with a close in the upper half of the range on ≀1.5Γ— volume.
  5. One cheat per pullback. Pass: price hugging the MA for several bars produces exactly one CHEAT marker, not one per bar.
  6. Cheat stop works. With a cheat position open, the cell shows "cheat position β€” exit under {level}". Pass: a close below that level prints a violet CHEAT CLOSE, and it fires even inside the min-hold window (structural exits bypass the churn gates).
  7. Every exit has a marker. Scan full history. Pass: every entry marker of any class is followed by exactly one exit label β€” SELL, TREND SELL, CAP SELL, CHEAT SELL or CHEAT CLOSE β€” before the next entry. Zero unlabelled exits.
  8. S1 actually appears. With Campaign Mode ON and the trim toggle OFF, find a campaign with β‰₯2 tranches and two trims. Pass: the first trim is S[ATR] or S[VS] per its cause; toggle confluence ON and Pass: the first trim of a campaign reads S1, never S2.
  9. Confluence really restricts. Toggle ON. Pass: trim markers become markedly rarer, and a bar with only an extension (no volume stop) produces no trim and no SELL while β‰₯2 tranches are open. This is expected β€” confirm you are comfortable with it before leaving it on.
  10. Alerts unchanged by the toggle. Fire an S1 alert in each mode. Pass: the alert fires on the campaign's first trim in both, regardless of which label the chart drew.
  11. Campaign PnL agrees with itself (IN). With a campaign open that has already trimmed. Pass: "Current PnL%" includes the banked trim, and does not jump when the final SELL prints.
  12. Weekly/monthly sanity. Switch to a weekly chart. Pass: the 40W EMA cell still reads sensible values (the length rescales to 40 on weekly, 10 on monthly) and cheat markers remain plausible.

Cheat entry v2 β€” same-day rework (29 Jul, after a live MANINDS review)

The first cut of the cheat entry shipped and was reviewed on a live chart the same day. Two things

were wrong, and both are corrected in the build being published:

Entry was too loose. The arm never expired, so ANY later brush of the 40-week MA could fire β€”

including a sideways chart drifting along the line. It is now a leg state machine: price must trade

clear above the MA (a real advance), the FIRST touch of that leg opens a short bounce window, and

when the window closes the leg is spent. A second visit is not a cheat entry β€” it is the MA failing

as support β€” and the setup must re-arm from a fresh advance. A new stage-banked counter additionally

requires real Stage-2 time before any touch qualifies.

Exit defeated the thesis. A cheat entry is a CONTINUATION trade, but it was being closed by the

ordinary score SELL β€” which only fires once the composite has decayed, long after price has rolled

over. Live review showed cheat trades round-tripping most of their gain. Three fixes:

  • cheat positions are now HELD THROUGH score SELLs entirely (default ON)
  • a chandelier trail releases the trade a fixed ATR distance below the highest high since entry β€”

catching the top of a thrust by construction rather than by the score noticing late

  • a momentum-fade exit closes on a return under the EMA21 while in profit, typically several bars

ahead of the chandelier on a slow fade

  • the stop ratchets to breakeven, then trails the EMA50; it never moves down

Exits are now labelled by OUTCOME: CHEAT TRAIL (green β€” released in profit near the high) versus

CHEAT CLOSE (violet β€” stopped out, the 40-week thesis broke).

Verdict icons on the dashboard rows

Every gate row now carries the verdict inline instead of leaving it to be computed: βœ… supports

acting Β· ⚠️ works with a caveat Β· ❌ do not act Β· βšͺ neutral or too thin Β· ⏳ warming up or held Β·

πŸ”’ held by weekly structure Β· 🎯 live cheat position. Edge is judged on the COMPOUNDED multiple,

never the average; under 20 trades the cell is βšͺ and marked "thin"; a 🎲one-trade tag appears when

a single trade is worth more than half the entire summed edge.

πŸ“‹ Publishing blurb (paste into TradingView release notes)

New CHEAT BUY entry class: a Stage-2 advance pulling back into its 40-week (200-day) EMA on drying volume, with the close reclaiming the average on the same bar. It only arms after price has traded well above the MA, so the setup has to come down to it out of an advance β€” one entry per pullback, not a string of them.

CHEAT CLOSE is its invalidation: a close below the 40-week EMA exits in full and bypasses every hold gate. That is the point of the setup β€” the stop sits at the moving average, a fraction of an ATR away instead of a base-depth below.

The self-backtest is no longer frictionless. Every closed trade is now charged a real round trip β€” STT, stamp duty, exchange and SEBI fees, GST, DP charge and slippage on the India build; SEC Section 31, FINRA TAF and slippage on the US build β€” with presets for zero-brokerage and discount tiers. Sell-side levies are charged on exit turnover, so bigger winners correctly pay more.

New Backtest Risk row: the compounded multiple, the maximum drawdown of that equity curve, and the best and worst single trades. The multiple chains the actual sequence of trades, which is the honest answer to "what would I have?" β€” the average per trade never was, and hovering the row now shows both numbers together so the difference is visible.

Campaign trims can now require confluence: by default a tranche is trimmed only when the ATR-extension and stopping-volume factors are both live on the same bar. Turn it off to restore either-factor trimming, in which case the marker names the cause: S[ATR], S[VS] or S[A+V].

S1 and S2 now mean first trim and later trims, matching P1 and P2. They previously named which factor fired, which meant that on names whose trims were volume-driven an S1 never appeared at all.

Fixed: while a pyramided campaign was open, the current-PnL cell showed only the open leg and ignored partials already banked, so it understated the position and jumped at the final exit.

A cheat trade is now held through ordinary score exits and released by its own trailing stop instead β€” a chandelier a fixed ATR distance below the highest high since entry, a momentum-fade exit on a return under the EMA21 while in profit, and a ratchet to breakeven that never moves down. Exits are labelled CHEAT TRAIL when released in profit and CHEAT CLOSE when stopped out.

Cheat entries only fire on the FIRST touch of the 40-week average after a genuine Stage-2 advance. A later revisit is the average failing as support, not a setup, and must re-arm from a fresh advance.

Dashboard rows now carry a verdict icon so each read is legible without arithmetic.

Recommended: set "Assumed capital per trade" in the Backtest Costs group to the size you actually deploy β€” flat charges like the DP fee are a very different percentage on a small position than a large one.

---

---

30–31 July 2026 wave β€” IN Analytics Pro 3 Β· US ANALYTICS Β· Valuations ++ v5.3

⚠️ Behavior changes (read before trusting old readings)

ChangeEffect
Circular valuation fallbacks removed (IN Γ—3, US Γ—2)Symbols with no usable multiple history previously showed a fabricated fair value β‰ˆ price β†’ ratio 1.00 "fairly valued", and counted as a working method. You will now see some symbols move from 4m to 3m/2m confidence, and some valuations go from a confident number to N/A. That is the fix working β€” a silent wrong answer became a visible gap.
US coverage lossUS has no P/B leg and its P/S leg already contributed 0, so a US symbol with no usable P/E history now rests on EV/EBITDA alone or reports N/A. Real loss of coverage, deliberately accepted.
Classification rebuilt (IN + V++)Weights per company change. Most visible on banks/NBFCs (EV/EBITDA now 0, P/B 0.55) and profitable small-caps (were valued as startups at P/E weight 0.1, now 0.40–0.50).
Multiple sampling is now timeframe-aware (IN)On weekly charts the "3-year" P/E window previously spanned ~14 years. Fair values on weekly charts will shift, in some cases materially.
Volume-stop is location-gatedFewer exits near lows; positions hold longer through post-entry volatility. Winners may exit later than before.
Normalized Scoring ON by default (IN)Score and thresholds move to the Οƒ scale. Entries and exits differ from the raw path. Will not engage below 500 bars β€” ~2y daily but ~10y weekly.
Aggressive mode ON by default (IN + US)CAP BUY may now fire in confirmed downtrends. That is where genuine capitulation reclaims happen, and also where knives are.

πŸ› Fixes

  • Whipsaw on SONACOMS. The volume-stop's location filter had a branch requiring nothing about where price was β€” any red bar taking out the prior high qualified. Five bars after a capitulation-low entry on 3.16Γ— volume it closed a good campaign at +0.78%, forcing a re-entry 23 points higher. Now requires the bar to have traded above the reference EMA.
  • Move hurdle was symmetric. A trade 2 ATR into profit waived its own 10-bar minimum hold and became eligible for an early score exit. Now adverse-only.
  • "Early Stage" misclassification. Every profitable small-cap under β‚Ή5,000 Cr was classified a pre-revenue startup, because size was tested before stability. Found by questioning the label on a sixty-year-old pharma company.
  • Entry @ Price now shows the individual tranche fills beside the blend β€” 417.15 (3t @ 377.70 / 410.20 / 503.10) β€” which explains why a winning campaign can show a modest percentage.
  • CE10235 compile error (if/else return-type mismatch) and CE10117 compiled-token ceiling, both resolved.

✨ New features

Edge by Entry Class (IN + US) β€” splits the same closed campaigns by the class that opened each one:

BUY 52%Β·+28.9%Β·n11   TRD 60%Β·+1.3%Β·n5   CHT 0%Β·-8.4%Β·n1

The pooled backtest cannot tell you which entry path carries the model and which drags it. Read this before tuning any entry filter.

Two new company classes (IN + V++):

  • Lender β€” for a bank or NBFC debt is raw material, not leverage, so EV/EBITDA is meaningless. Weight now 0.00, with P/B at 0.55. Previously every bank got a 0.3–0.6 EV weight.
  • Cyclical β€” P/E inverts across a cycle: lowest at the earnings peak when the stock is most dangerous. De-emphasised, with EV/EBITDA and P/B anchoring. Cyclicals also take the full P/E history window, since a 3–5 year window can sit entirely inside one leg of a cycle.

External fair value bridge (IN ← V++) β€” point IN at Valuations++'s πŸ”— Fair Value (bridge export) plot and IN inherits its percentile bands, winsorized sampling, CV-derived weights and stationarity gate, with no duplicated maths. Default OFF, guarded, silent fallback β€” a free-tier user running IN alone under the 2-indicator cap is never affected.

Auto (Company Type) preset (V++) β€” classifies instead of making you pick Value/Growth/GARP/Income. Wired as a prior, so CV blending still refines it: Auto: Stable Value [CV-blended].

Volume-stop: min bars held (IN + US) β€” -1 = auto by timeframe (monthly 0 / weekly 1 / daily 2 / intraday 6).

βš™οΈ Changed defaults

SettingOldNewScript
Use Normalized ScoringOFFONIN
Normalization lookback200500IN
Aggressive modeOFFONIN + US
Volume-stop: min bars heldβ€”βˆ’1 (auto)IN + US

TradingView keys saved values by title, so charts you have already saved keep their old values. Set these by hand once, then Defaults β†’ Save as Default.

πŸ§ͺ Test plan (before publishing)

  1. SONACOMS daily β€” the spurious second SELL should be gone. Then set volStopMinBars to 0: if it stays gone, the location guard alone is sufficient and you keep the bull-trap exit intact.
  2. PANACEABIO β€” IN and V++ must now agree on company type (Loss-making). If they disagree, one paste didn't take.
  3. Any bank/NBFC β€” confirm the class reads Lender and EV/EBITDA weight is 0. Industry-string matching will miss oddly-named NBFCs.
  4. A profitable β‚Ή2,000–5,000 Cr small-cap β€” must no longer read as a startup; expect Quality Compounder or Steady.
  5. Weekly chart of a 10+ year name β€” fair value will differ from before. That is the sampling fix, not a regression.
  6. A symbol with no earnings history β€” valuation should read N/A, not a confident number.
  7. Bridge β€” enable it, confirm IN's Composite Value matches V++'s median exactly. If it doesn't move, the guard is rejecting the source; re-point at πŸ”— Fair Value (bridge export), not 🎯.
  8. Free-tier simulation β€” remove V++ from the chart with the bridge still enabled. IN must fall back silently with no error.
  9. Edge by Entry Class across 3–5 names before acting on any single reading β€” per-class n is small.
  10. Model Backtest / Backtest Risk before vs after on a few names. Gating the volume-stop means winners exit later; if maxDD worsens materially, trim minHoldBars rather than reverting.

πŸ“‹ Publishing blurb (paste into TradingView release notes)

Fixes and upgrades to the valuation and exit engines.

β€’ Valuation no longer falls back to a price-derived estimate when a stock's own
  multiple history is unusable. Those cases now report N/A with a reduced
  confidence count instead of a fabricated "fairly valued" reading.
β€’ Historical multiples are now sampled at a consistent quarterly cadence on any
  timeframe. Previously a weekly chart sampled every ~14 months, so the
  "3-year" window spanned far more than three years.
β€’ Company classification rebuilt into seven classes, adding Lender (EV/EBITDA
  is meaningless for a bank β€” P/B anchored instead) and Cyclical (P/E inverts
  across a cycle, so it is de-emphasised). Profitable small-caps are no longer
  classified as pre-revenue startups.
β€’ The stopping-volume exit now requires price to have traded above its
  reference average, so it fires on distribution rather than on ordinary
  volatility shortly after an entry.
β€’ The early-exit valve on the minimum-hold gate is now adverse-only: a trade
  running into profit no longer unlocks its own early exit.
β€’ New "Edge by Entry Class" row splits the self-backtest by the entry type that
  opened each campaign.
β€’ Optional external fair-value source, for use alongside Valuations ++.

Defaults changed: normalized scoring on, lookback 500, aggressive mode on.
TradingView keeps saved settings per chart, so existing charts retain their
previous values β€” set them by hand if you want the new behaviour.

πŸ“Œ Known limits carried forward

  • IN Analytics is at ~100,071 of the 100,256 compiled-token ceiling (~185 spare). The next feature requires removing something. Candidates by approximate compiled cost: Eco/Fundamental table ~8,000 Β· Regime table ~3,600 Β· Risk table ~2,100 Β· signal-tooltip subsystem.
  • US has not received the classification rework. It does not carry IN's size-outranks-stability bug (it keys on history depth, which was always right), but it lacks Lender and Cyclical β€” so US banks and commodity names are still mis-weighted. Porting needs a 3-column weight table since US has no P/B leg.
  • Lender detection is industry-string matching and will miss oddly-named NBFCs.
  • IN and V++ can disagree on Cyclical vs Quality β€” V++ measures a true stdev of realised growth, IN only a one-period estimate-vs-actual gap.
  • volStopMinBars has a real cost: a fast bull trap (TREND BUY failing on climax volume within 2 bars) loses its volume-stop exit. 2 on daily / 0 on weekly recommended.
INDICATOR
29 Jul
2026
WYCKOFF_PRO_PLUS_PUBLICATION β€” Indicator

Wyckoff Pro+ β€” TradingView publication description

Paste the block below into the TradingView description field.
Publish as OPEN-SOURCE β€” see the licence note at the bottom of this file.

---

Wyckoff Pro+ marks up the full Wyckoff cycle on your chart β€” climax, range, test, breakout, retest and completion β€” and tells you which step comes next.

Rather than firing an opinion on every bar, it tracks one structure at a time through its lifecycle: a climax establishes a trading range, the range gets tested, a breakout either confirms or traps, and the structure finally retires when the move it predicted has played out. Everything you see on the chart is a stage in that sequence.

── CREDIT AND WHAT IS DIFFERENT ──

Built on the open-source Wyckoff indicator by faytterro (Mozilla Public License 2.0), which supplied the original climax-and-range concept. This is a rewrite rather than a tweak, and adds:

β€’ Structural Spring and UTAD detection β€” the classic definition of a probe below the range floor (or above the ceiling) that fails to hold and closes back inside, rather than an oscillator threshold. Early "Spg?" and "UT?" watch labels flag the setup before it confirms.

β€’ SOS / SOW breakout detection with the LPS / LPSY retest that follows β€” the leg of the cycle where the classic low-risk entry actually sits.

β€’ A structure lifecycle. Accumulation retires at its measured-move target or a set number of bars after the LPS, printing "Markup βœ“" and clearing its boundary lines. Distribution mirrors it. Without this, floors and ceilings live forever and the script keeps flagging failures at levels that stopped mattering months ago.

β€’ Volume grading. Climaxes, secondary tests and breakouts that occur on genuinely expanded volume are marked with a β˜…. Grading is cosmetic β€” it never adds or removes a signal, it only tells you how well-supported one is.

β€’ Shakeout and Upthrust re-arming. When a structure fails, a bounded window opens in which the failure itself can become the trade β€” a false breakdown that snaps back is the highest-quality Wyckoff entry there is.

β€’ Failed-breakout (trap) detection. An SOS that sinks back into the range, or an SOW that recovers into it, prints an explicit failure and fires an exit alert.

β€’ A dashboard that names the current phase, the last event, the range boundaries, relative volume, the measured-move target, and β€” most usefully β€” the specific event to wait for next.

β€’ O(1) range tracking and realtime-safe state, so the script does not slow down on long histories and labels do not flicker intrabar.

── WHAT YOU SEE ON THE CHART ──

Accumulation events: SC (Selling Climax), AR (Automatic Rally), ST (Secondary Test), Spring, SOS (Sign of Strength), LPS (Last Point of Support).

Distribution events: BC (Buying Climax), AR-D (Automatic Reaction), DST (Distribution Secondary Test), UTAD (Upthrust After Distribution), SOW (Sign of Weakness), LPSY (Last Point of Supply).

Failure and trap events: "βœ– Acc fail" / "βœ– Dist fail" when a range is lost, "βœ– SOS fail" / "βœ– SOW fail" when a breakout reverses, and the "βš‘πŸŒ€ Shakeout" / "⚑ Upthrust" re-entries those failures can produce.

Completion: "Markup βœ“" / "Markdown βœ“" when the cycle finishes.

Shaded boxes mark the accumulation or distribution range, dashed lines mark the live ceiling and floor, and a dotted line marks the measured-move target projected from the breakout.

── THE DASHBOARD ──

Phase β€” where the current structure stands.

Last Event β€” the most recent confirmed Wyckoff event.

Next Step β€” the event to wait for, in plain language ("Wait for LPS pullback (best entry)", "Wait for Spring or SOS breakout", "Cycle complete β€” trail longs, wait for new BC").

Range Ceiling / Range Floor β€” the live boundaries.

20-bar Volume β€” current volume against its recent average.

Target β€” the measured move projected at the breakout, cached so it survives the LPS.

── HOW TO USE IT ──

Read the Next Step row first. The script is a roadmap, not a signal generator β€” its value is in telling you what has already happened and therefore what to watch for, so you are waiting at the level rather than chasing the move.

The two classic entries are the Spring (a failed breakdown out of accumulation) and the LPS (the first pullback after an SOS breakout). Their mirrors are the UTAD and the LPSY. The events in between β€” AR, ST, DST β€” are context, not triggers.

Stops come from the structure: below the Spring low, below the LPS pivot, above the UTAD high, above the LPSY pivot. That is the point of trading a range β€” the invalidation level is defined before you enter.

Works on any market and any timeframe, though Wyckoff structure is most legible on daily and weekly charts where a range takes weeks or months to build.

── SETTINGS WORTH KNOWING ──

Pivot Length β€” how much structure a swing must have to count as an event. Raise it for cleaner, rarer events.

Use Volume Confirmation and Climax Volume Multiple β€” how demanding the β˜… grading is.

Confirm Spring/UTAD/SOS/SOW on bar close β€” ON prevents intrabar flicker and un-firing alerts. Recommended.

Structure Expiry (bars after LPS/LPSY) β€” how long a completed structure stays on the chart before retiring.

LPS max % above ceiling β€” how close a pullback must come back to the broken ceiling to count as a genuine retest.

Detect SOS/SOW breakouts + LPS/LPSY β€” turn the whole breakout leg off if you only want range work.

── ALERTS ──

Sixteen named alert conditions cover every event, each with a message describing what happened and what it implies. The four structure-invalidation events additionally fire a guaranteed alert at bar close, so an exit notification cannot be missed because of the frequency setting chosen in the alert dialog.

── LIMITATIONS ──

Wyckoff is a framework for reading supply and demand, not a mechanical system. Events are identified from price and volume structure and can be revised as new bars arrive β€” the confirm-on-close setting exists for that reason. Ranges that never resolve, low-volume instruments, and illiquid sessions all degrade the reading. The measured-move target is a projection, not a forecast.

This script is a charting and research tool. It does not provide financial advice, and nothing in it should be treated as a recommendation to buy or sell.

---

Publication checklist (not part of the description)

  1. Publish as OPEN-SOURCE. The source carries a Mozilla Public License 2.0 header from faytterro's original. MPL 2.0 is file-level copyleft: a modified version of an MPL-licensed file must stay under MPL and its source must remain available. Publishing this as Protected or Invite-only would breach that licence. Keep the existing // Β© faytterro and MPL header lines in the code exactly as they are.
  2. Keep the credit paragraph. TradingView's House Rules require scripts based on another author's open-source work to credit the original and explain what is meaningfully different. The "CREDIT AND WHAT IS DIFFERENT" section above is written to satisfy that β€” do not trim it.
  3. Chart on publish. Use a clean chart showing only this indicator, on a symbol with a clear completed accumulation β†’ markup cycle so SC / AR / ST / Spring / SOS / LPS / Markup βœ“ are all visible in one view. TradingView rejects publications whose chart is cluttered with other indicators.
  4. No performance claims. The description above deliberately makes none. Do not add backtest results, win rates, or profit language in the description or the chart annotations.
  5. Title. "Wyckoff Pro+" is fine. Avoid adding words like "best", "profitable" or "signals" to the title.
INDICATOR
27 Jul
2026
SCREENER_PLAYBOOK β€” Indicator

Screener Playbook β€” Valuations PP β†’ Buffer β†’ EOD

The funnel logic: the two screeners answer different questions. Don't ask either to do the other's job.

StageScriptQuestion it answersCadence
1 Β· DiscoveryπŸ’° Valuations Screener πŸ’° (PP v4.1)"What deserves my attention?" β€” cheap + waking upWeekend + midweek
2 Β· TimingEOD Screener"Is today the day, and at what stop?"Daily after close
BufferTV watchlist "BUFFER"Holding pen between the twoContinuous

A name can sit in the buffer for weeks. PP finds it early; EOD tells you when it's actionable. That gap is the edge β€” you're pre-positioned on names before the breakout, instead of chasing scans on the day.

---

Setup (both screens)

  • Timeframe: 1D. Pocket pivots are defined on daily data; other TFs are meaningless here.
  • Run AFTER market close. On the live bar, volume is partial β€” pivots only turn true late in the session and crosses flicker until the bar confirms.
  • Universe for Stage 1: all NSE equity, or your preferred cap filter. Add a liquidity floor early β€” see "Liquidity gate" below.
  • Universe for Stage 2: the BUFFER watchlist only.
  • Known limit: PineScreener loads only ~500 bars, so percentile bands use ~2 years, not 5. Treat percentile columns as directional, not absolute.
  • Column direction (memorise these two): β‘  Valuation Score = price Γ· fair value β†’ below 1 = cheap. β‘’ Valuation Zone: negative = cheap, βˆ’2 = below the low band, +2 = above the high band.

---

STAGE 1 β€” The scan menu

Run these as separate saved screens. Each answers a different question; overlap between them is a strength signal, not a duplicate.

Family A β€” Ready now (value + volume + trend aligned)

These are most likely to pass the EOD gates soon. Highest priority into the buffer.

A1 Β· Flagship conviction

πŸš€ Accumulation Signal = 1

Pivot + value zone + ADX turning up, all at once. Usually the shortest list β€” take every name.

A2 Β· Strong conviction (fundamentals-confirmed)

πŸ”₯ Strong Conviction = 1

Undervalued + good data + pocket pivot + up-trend.

A3 Β· Score-ranked

β˜… Conviction Score > 70    β†’ sort β˜… descending

Use when A1/A2 return too few. Lower to 60 in thin markets, never below 50.

A4 Β· Value breakout

πŸ’₯ Value Breakout = 1

Pivot while undervalued in a confirmed uptrend β€” the cleanest single-column scan.

Family B β€” Early / building (buffer for weeks)

Cheap and turning, but not yet technically ready. This is your buffer's core inventory.

B1 Β· Cheap and starting to move

🟩 Pocket Pivot >= 1  AND  🎯 Near Low FV Band = 1

B2 Β· Value + technical quality

🟩 Pocket Pivot >= 1  AND  β‘  Valuation Score < 0.9  AND  Tech Score >= 2

B3 Β· Early trend change at value (ADX)

πŸ”Ό Trend Building = 1  AND  β‘  Valuation Score < 1.0

B4 Β· Pattern signals β†’ these deserve their own section; see "The pattern engine" below.

Family C β€” Deep value watch (monthly review, low urgency)

No technical confirmation yet. These wait for stage 2 to arrive; some never do.

C1 Β· Fundamentally cheap, data-backed

β‘  Valuation Score < 0.9  AND  Data Quality >= 3  AND  Coverage % >= 75

Coverage % is the v4.1 honesty column: it's the share of the fair-value model actually populated. Data Quality counts metrics; Coverage weights them. DQ 3 + Coverage 40% = a "fair value" resting on one ratio β€” skip it.

C2 Β· Margin-of-safety screen

Margin of Safety % > 20  AND  Coverage % >= 75    β†’ sort MoS descending

C3 Β· Percentile cheapness

β‘‘ Upside to FV % > 20  AND  ⑨ Avg Percentile < 30

Family D β€” Specialty

D1 Β· Bottom-fishing reversal (earlier, higher risk β€” always pair with value)

🟩 Pocket Pivot >= 2  AND  🎯 Near Low FV Band = 1

Column encoding: 1 / 1.5 = standard pivot in the 10MA pocket Β· 2 / 2.5 = bottom-fish reclaiming the 50MA. The .5 tier means pivot volume β‰₯ 2Γ— the largest down-day volume β€” sort Vol / MaxDownVol descending to rank pivots by force.

D2 Β· Crash reversal

πŸ”„ 30% Fall Reversal + PP @ FV = 1

D3 Β· State alerts (always-true conditions, scannable any day)

🟒 Deep Value Β· πŸ’Ž Deep Value Opportunity Β· 🚨 Extreme Overvaluation (avoid-list)

---

The pattern engine β€” base breakout Β· FVR rebound Β· fall reversal

These are the most demanding signals in the script: each stacks valuation + structure + trend + volume into one flag. They're also the ones worth understanding precisely, because each maps to a different market situation.

πŸ“¦ Long Base Breakout Β· πŸš€ Long Base Breakout + Pocket Pivot

What it detects: a Darvas/Weinstein base break with a valuation floor.

Every condition must hold:

  • Tight base β€” the last 30 bars span ≀ 18% high-to-low
  • Base sits at or above value β€” close β‰₯ 97% of the low fair-value band. This is the clever part: it rejects bases built below fair value (broken stocks going sideways) and keeps bases built on top of value.
  • Clean break β€” close > base high + 1.5% buffer (kills marginal pokes)
  • Bullish bar, DI+ > DIβˆ’, and trend up or building

Why it works for you: this is the closest thing in the suite to a pure stage-2 entry β€” a tight base resolving upward on a name that isn't expensive. Expect these to convert to EOD BUY fastest (they map to EOD SetupCode 1 base-breakout / 4 resistance-breakout).

Use: πŸš€ Long Base Breakout + Pocket Pivot as your primary β€” the volume-confirmed version. The plain πŸ“¦ is for a wider net when the market is quiet.

↗️ FVR Pullback Rebound Β· 🟒 FVR Rebound + Pocket Pivot

What it detects: price dipped into the fair-value floor and is bouncing with a structural reclaim β€” a buy-the-pullback-to-value, explicitly not a falling knife.

  • Recent value test β€” within the last 12 bars, price either touched within 3% of the low band, or traded in the bottom 35% of the lowβ†’fair range
  • Rebounding now β€” bullish bar, above prior close, back above the fast MA, DI+ > DIβˆ’
  • Plus a reclaim β€” MA crossover, or takes out the recent swing high, or crosses back above the low band
  • Not extended β€” still below the high band, so the move has room

Why it works: the reclaim requirement is what separates this from catching knives. Price must prove the bounce by reclaiming something structural, not merely stop falling.

Use: 🟒 FVR Rebound + Pocket Pivot. Buffer these β€” they're often early, and EOD will tell you when stage 2 actually arrives.

πŸ”„ 30% Fall Reversal + PP @ FV

The most stringent signal in the script β€” five independent confirmations:

  1. Crashed β€” down β‰₯ 30% from the 120-bar peak
  2. Landed on value β€” now within 5% of the low band or the median fair value
  3. Pocket pivot β€” the volume signature
  4. Reversal bar β€” up close, above prior close, closing in the top 65% of its range
  5. Reclaim or turn β€” takes out the 10-bar swing high, or the trend is genuinely turning

Why it works: a crash that has landed on fair value and turned on volume is a fundamentally different animal from a crash still falling. That said, this is the earliest and highest-risk of the three β€” the wound is fresh.

Use: buffer, don't rush. Let EOD confirm stage 2 before committing, or take a starter position with a stop under the reversal bar's low.

πŸ”₯ Pattern Conviction β€” the umbrella

(FVR Rebound + PP) OR (Base Breakout + PP), plus minimum data and a trend that's up or building. One screen that catches both patterns, already volume- and data-confirmed. If you only run one pattern scan, run this.

Tuning them (Inputs β†’ "Pattern Signals" / "Reversal Patterns")

InputDefaultTurn it…
Require Pocket Pivot For Main Pattern FlagsoffON to make the plain πŸ“¦/↗️ columns volume-strict β€” then you don't need the separate +PP columns at all
Base Tightness %18↓ 10–12 for VCP-tight bases Β· ↑ 22–25 for volatile smallcaps
Base Breakout Buffer %1.5↑ 2–3 to reject marginal breaks Β· ↓ for earlier entries
Long Base Lookback30↑ 50–60 for genuinely long bases (fewer, better)
Pullback Lookback Bars12↑ if you want rebounds from older dips to still count
FVR Touch Threshold %3.0↑ 5 if the low band is rarely touched cleanly
Minimum Prior Fall %30↑ 40–50 for genuine washouts only
FV Zone Tolerance %5.0how close to fair value the reversal must land

Where each lands in the funnel

SignalUrgencyWhere it goes
πŸš€ Base Breakout + PPHighest β€” often EOD-actionable within daysBuffer, check EOD daily
🟒 FVR Rebound + PPMedium β€” early by designBuffer, wait for EOD stage 2
πŸ”„ 30% Fall ReversalLowest β€” earliest, highest riskBuffer, starter only or wait
πŸ”₯ Pattern ConvictionCovers the first twoRun this if you run only one

---

STAGE 1 β€” Scanning by alertcondition

PineScreener evaluates only the last bar. A raw event alert would therefore be true for exactly one day β€” scan on Saturday and you'd see nothing that fired Monday–Thursday. This script solves that with a scan window, and that single input is the most important dial in your workflow.

The two alert types

STATE alerts β€” true for as long as the condition holds. Scan any day, no window needed.

🟒 Deep Value Β· πŸ’Ž Deep Value Opportunity Β· 🚨 Extreme Overvaluation

EVENT alerts β€” the other 18. Each is wrapped so it stays true for Event Scan Window bars after the event (ta.barssince(cond) < window).

The Event Scan Window dial

SettingMeansUse for
5 (default)"signaled this week"Weekend scanning β€” the right default for you
1Event bar onlyStrict "today only" scan; also correct for real live alerts
10"signaled this fortnight"Slower cadence, or widening a thin list

Saved screens store their own inputs β€” so keep one screen at 5 for the weekend sweep and another at 1 for a daily "fresh today" pass.

Alert recipes by family

Family A β€” ready now

πŸš€ Accumulation Signal   Β·   πŸ”₯ Strong Conviction Buy   Β·   πŸ’₯ Value Breakout

Family B β€” early / building

🟩 Pocket Pivot Β· πŸ”Ό Value Trend Turn Β· πŸ”„ Bullish Trend Change Β· πŸ“Ά Up-Trend Strengthening
🟒 FVR Rebound + Pocket Pivot Β· πŸ“¦ Long Base Breakout Β· πŸš€ Long Base Breakout + Pocket Pivot
πŸ”₯ Pattern Conviction Β· πŸ”„ 30% Fall Reversal + PP @ FV

Family C β€” deep value (state, scan anytime)

🟒 Deep Value   Β·   πŸ’Ž Deep Value Opportunity

The transition alerts β€” your best buffer-fillers

These fire the moment a name enters your zone, which is exactly what a buffer wants:

AlertWhat just happenedAction
πŸ“ Became UndervaluedCrossed below fair valueThe single best buffer-filler β€” new candidates, weekly
πŸ“ Dropped Below Low BandNow below the low bandDeep-value bucket; needs a pivot before it matters
πŸ“ Reclaimed Fair ValueRe-rating starting from belowHigh-value: the market is beginning to agree

Exit / risk scans β€” run on your HOLDINGS watchlist

The alerts aren't only for discovery. Point these at what you own:

🚨 Extreme Overvaluation (state)  Β·  πŸ“ Became Overvalued  Β·  πŸ“ Lost Fair Value  Β·  πŸ”» Bearish Trend Change

Stacking alerts with columns β€” the highest-value combination

An alert says "this happened"; a column says "and it's worth acting on". Combine them:

🟩 Pocket Pivot = true  AND  β‘  Valuation Score < 0.9  AND  Coverage % >= 75
πŸš€ Accumulation Signal = true  AND  Vol / MaxDownVol >= 2
πŸ“ Became Undervalued = true  AND  Data Quality >= 3  AND  Coverage % >= 75

To OR several alerts: run them as separate saved screens and merge into the buffer. That's not just a workaround β€” it preserves which family sourced each name, which is how you learn what actually pays.

---

Triage β†’ buffer

For every hit, glance at three columns before adding:

  1. Coverage % β‰₯ 75 β€” else the valuation is thin air. (< 50 = reject outright.)
  2. β‘’ Valuation Zone β€” is it cheap because it's cheap, or cheap because it's broken? Zone βˆ’2 with no pivot is a falling knife.
  3. Vol / MaxDownVol β€” pivot force. Below 1.5 is a weak pivot.

Tag the name in the buffer with its source family (A/B/C/D). When it eventually triggers in EOD, you'll know whether your discovery edge was value, volume, or pattern β€” that's how the funnel teaches you which family actually pays.

Buffer hygiene: cap it at ~40–60 names. Drop anything that has sat 3 months without an EOD ARM, or where β‘  has drifted above 1.2 (the thesis got priced in while you waited).

---

STAGE 2 β€” EOD Screener on the buffer

Universe = BUFFER watchlist. Run daily after close.

⚠️ EOD alerts work differently from PP alerts

This asymmetry will bite you if you carry the PP habit across:

PP ScreenerEOD Screener
Alert typeWindowed β€” true for 5 bars after the eventEdge-triggered β€” true on the transition bar ONLY
Weekend scanCatches the whole weekCatches only Friday's transitions
Best practiceScan by alertScan by column, use alerts for "new today"

So on EOD, prefer the columns: BUY = 1 and ARM = 1 are level-based β€” they stay 1 for as long as the condition holds, which is what you want for a daily actionable list.

Use EOD alerts for a different job β€” isolating what changed today, so you don't re-read names you already triaged:

βœ… BUY (full confirm)   βŒ› ARM (setup coiling)   Setup triggered
Entered Stage 2         Quality score β‰₯ 5

(Stage-2 ignition and Volume breakout are the two level-based exceptions β€” they behave like columns.)

The daily read

Ready today

BUY = 1  AND  DataOK = 1
β†’ sort Score descending

Setting up (tomorrow's candidates)

ARM = 1  AND  DataOK = 1
β†’ sort Score descending

Your discipline filters β€” the part that matters

Add these to every EOD screen; they enforce your own rules mechanically:

SlClamped = 0        ← structural stop intact (NOT an arbitrary % cap)
Stop_% <= 3          ← your hard rule
RR >= 2              ← reward justifies the risk
Turnover >= [floor]  ← slippage protection

SlClamped is the single most valuable column for you. 1 means the structural stop was wider than your cap, so the script clamped it to a percentage β€” there is no real structure beneath that stop. A clamped stop is a fake stop. Filter them out.

Turnover floor: set it to at least 100Γ— your intended position size in β‚Ή. With full-capital deployment, slippage on illiquid names is your largest unmodeled risk β€” this column exists specifically for that.

Reading a candidate row

ColumnWhat you're checking
Stage / StageWeeksStage 2, and freshly so β€” low StageWeeks = early in the advance, the highest-value Weinstein entries
MansRS_%Mansfield RS β€” positive and rising = leadership. Sort by it to rank a crowded BUY list
SetupCode1 Base-breakout Β· 2 Bull-flag Β· 3 Double-bottom Β· 4 Resistance-breakout Β· 11 tight base forming Β· 12/13/16 pre-trigger states
Vol_xVolume expansion on the trigger β€” thin breakouts fail
Entry / Stop / TP1 / QtyThe plan, pre-computed at your sizing
SugStop_% / SugRRThe alternative if the structural stop is too tight to be safe
Ext_%Extension above the stage MA β€” high = chasing
NextResOverhead supply β€” a wall right above kills the R:R
DataOK0 = short history, gates ran on incomplete data. Never trade a 0.

Ranking a crowded list

Sort Score desc β†’ break ties with MansRS_% desc β†’ prefer low StageWeeks (fresh stage 2) and low Ext_% (not extended). Cross-reference back to the PP screener: if the name also shows πŸš€ Accumulation Signal = 1, both engines agree β€” that's your highest-conviction bucket.

---

Weekly rhythm

WhenDo
SatRun Family A + B fully (alert screens at Event Scan Window = 5 = "signaled this week") + πŸ“ Became Undervalued; refresh buffer; drop stale names. Pairs with your iList weekly review. Also run the exit-scan set on holdings.
SunFamily C monthly-ish; note which buffer names are approaching stage 2.
Daily after closeEOD on buffer β†’ BUY list (act) + ARM list (tomorrow's watch).
Midweek (Wed)Quick A1/A4 re-run to catch fresh pivots between weekends.

Pitfalls

  • Intraday runs lie. Partial volume breaks every volume-gated column in both screens β€” and pocket-pivot alerts only turn true late in the session.
  • A blank alert scan usually means the window, not the market. If an event-alert screen returns nothing, check Event Scan Window before concluding there are no setups β€” at 1, a Saturday scan only sees Friday.
  • Don't scan EOD by alert on weekends. Edge-triggered: you'd only catch Friday. Use BUY = 1 / ARM = 1 columns instead.
  • Don't skip Coverage %. The C1 fix means no-data names now show blank rather than a fake "fair value" β€” but a thin-coverage name still looks confident. Coverage is the tell.
  • A clamped stop is not a stop. SlClamped = 1 β†’ the βœ‚ cap replaced real structure.
  • DataOK = 0 / blank Stage = recent listing with insufficient history. The gates ran on na.
  • Extension is measured against the 30-period stage MA (v4.1 corrected this from the 10-EMA). It reads stricter than before β€” if your BUY list thins noticeably, loosen maxExtPct rather than ignoring the column.
  • The buffer is the asset. The scans are just how you fill it. Most of the compounding comes from being already watching a name on the day it breaks out.
INDICATOR
27 Jul
2026
03_others β€” Indicator

Position Planner Pro β€” Position Planner Pro

_The planner stops signalling trades it cannot give a real stop to: BUY now requires structure inside your risk cap, weekly charts stage off the 30-week MA, and every taken trade is tracked from entry to exit._

⚠️ Behavior changes (read before trusting old signals)

ChangeOldNewWhy it matters
BUY blocked when the stop was βœ‚-clampedA setup whose structural stop sat beyond the max-stop cap still printed BUY, using the clamped cap price as the stopState shows βŒ› ARM with the reason "no structural stop ≀ cap"; the BUY marker, table BUY state and both BUY alerts are suppressedThis is the biggest change. Expect materially fewer BUY prints β€” historically and live. Every remaining BUY has a genuine structural level inside the cap. New input, default ON; turn it off to restore old behavior
BUY marker follows the decision engineMarker printed on setups the engine rejected (RS lagging, over-extended, clamped stop)Marker prints only when the table actually says BUYFewer markers on history and live; marker and table can no longer disagree
Weekly-chart stage basisA weekly chart auto-mapped the stage timeframe to Monthly β†’ the 30-month SMAWeekly charts stay on Weekly β†’ the 30-week MA. Only above-weekly charts map to MonthlyWeinstein's actual definition. On weekly charts the stage classification, stage shading, trail EMA and stage alerts all change basis β€” weekly stage reads will differ from before
Higher-timeframe stage & trail read confirmed barsStage, Stage-2 shading, BUY confirmation and the trail EMA tracked the developing weekly bar β€” signals could appear mid-week and disappearAll computed from the last closed higher-timeframe barNo more repainting. Stage flips, BUY and the "Entered Stage 2" / "Lost trail EMA" alerts now fire on the first chart bar after the weekly bar closes β€” slightly later, but they stay put. The table's Stage row still shows the live developing stage (display only)
Volume gate on double-bottom and pullbackThese two triggers fired regardless of volumeBoth now require volume at or above averageA dry neckline break is the classic Weinstein trap. Those setups now show as forming/ARM instead of triggering β€” backtests will show fewer of these entries
Bull-flag breakout can fire at allThe flag-high level included the live bar, so the breakout condition was mathematically impossible β€” "Bull flag Β· forming" never convertedFlag high/low measured on completed bars; the breakout firesNew setups, entries and auto-stops appear where the chart previously went quiet
Breakout-setup stop anchorAnchored to the last pivot low, which could be months old β€” so it silently clamped to the percent capAnchors to the more recent of the last pivot low and the 20-bar swing low, minus the bufferBreakout stops are tighter and more structural, so they clamp less often and the new BUY block rejects fewer of them
Stop / target alertsFired off the continuously re-computed live planWith position tracking ON (default) they fire only while a tracked position is OPEN, against the entry/stop/targets frozen at BUYAlerts now refer to the trade you actually took, not to a plan that has moved since

πŸ› Fixes

  • The bull-flag breakout could never trigger β€” the consolidation high was measured including the live bar, so price could never cross it. Fixed; the flag path (and its auto-stop) is live code again.
  • Stage, Stage-2 shading and the trail EMA repainted intraweek: signals and alerts could appear mid-week and vanish by Friday's close. All higher-timeframe reads are now confirmed-bar.
  • Five crossover triggers (breakout, ignition, flag, double-bottom, pullback) and the trail-loss alert sat inside conditional blocks, where Pine v6's short-circuit and skipped their internal state updates β€” producing phantom and missed triggers. All are now evaluated every bar.
  • Plan-zone boxes (stop, TP1–TP3) disappeared permanently after one hide cycle of "Show plan & table only on BUY" β€” their colors were cleared and never restored. They now reappear correctly.
  • The suggested-stop R:R printed the R:R measured at your stop, overstating reward-to-risk on blue-sky setups where the suggested stop is wider. The chart label, the table cell and the cell's color now all use the correct figure.

✨ New features

Clamped-stop BUY block β€” suppresses BUY on any setup whose structural stop sits beyond your max-stop cap, downgrading it to ARM. Β· Inputs: Block BUY when stop is clamped (ON) Β· What you'll see: "βŒ› ARM β€” {setup} β€” no structural stop ≀ cap", and "no structural stop ≀ cap" appears in the blockers list on NO-BUY states.

Position tracking β€” on a confirmed BUY the entry, stop, quantity and TP1–TP3 are frozen; stop-hit and target-hit events are measured against those frozen levels until the position closes (stop-out, TP3, or manual flat). Β· Inputs: Track position (freeze plan on BUY) (ON), Manual flat (clear tracked position) (OFF) Β· What you'll see: a new table row β€” "Position β€” OPEN Β· qty @ entry Β· SL x" or "FLAT". Full table 22 rows, Minimal 9; the row and the counts revert when tracking is off.

Confirmed bars only β€” gates all six triggers to confirmed bar closes. Β· Inputs: Confirmed bars only (OFF) Β· What you'll see: nothing on history (historical bars are always confirmed); live triggers stop flickering intrabar.

Order-ready dynamic alerts β€” JSON payloads fired at bar close. BUY carries symbol, timeframe, entry, stop, quantity, rupee risk and TP1; STOP/TP1/TP2/TP3 carry the level and quantity. Β· Inputs: none β€” create one TradingView alert on "Any alert() function call" Β· What you'll see: structured alert bodies you can route straight to an order handler. All existing named alert conditions are unchanged.

Distance to trigger on ARM β€” the ARM row now appends how far price is from the pending breakout level. Β· Inputs: none Β· What you'll see: "Β· +1.8% to base high" (or flag high / neckline). Omitted when the level does not apply or is already below price.

βš™οΈ Changed defaults

InputOldNewEffect
Max stop distance %8.03.0Matches the hard ≀3% stop rule the tooltip always described. At full-capital sizing an 8% stop is roughly β‚Ή2.3L of risk on a β‚Ή28.4L account. Existing chart instances keep their saved 8% value β€” TradingView only applies a new default to freshly added copies. On live charts you must set this to 3 by hand (or remove and re-add the indicator).

Note on the new inputs above: Block BUY when stop is clamped and Track position both ship ON, and both apply to existing chart instances the moment you update the script, because they are new inputs with no saved value.

πŸ§ͺ Test plan (before publishing)

  1. Max-stop default. Add a fresh copy of the indicator to a clean chart and open Settings β†’ Entry & Stop. Pass: "Max stop distance %" reads 3. Then open an existing saved chart carrying the old copy. Pass (expected): it still reads 8 β€” confirm this, then set it to 3 manually on every live chart. Log which charts you changed.
  2. Clamped-stop BUY block. Find a Stage-2 name in a wide, high-ATR base (any recent NSE breakout with a ~6–10% distance to its swing low). With Block BUY when stop is clamped ON, look for setups where the stop label carries the βœ‚ mark. Pass: those bars show "βŒ› ARM … no structural stop ≀ cap" and print no BUY marker. Toggle the input OFF and reload. Pass: the same bars now print BUY with a βœ‚ stop. Count BUY markers over the last 250 bars in both states β€” ON must be ≀ OFF.
  3. Weekly stage basis. Put the indicator on a weekly chart of a long-trending large-cap (e.g. NSE:RELIANCE, NSE:TCS) with "Auto stage timeframe" ON. Pass: the Stage row and shading agree with a manually plotted 30-period SMA on that weekly chart, not with a 30-month one. Compare against your previous screenshot/knowledge of the same chart β€” a changed stage read here is expected, not a bug.
  4. Bull flag fires. Set the stage/setup engine on, and scan a name that ran hard and then went sideways for 8–15 bars (pole β‰₯18%, consolidation ≀10% range are the shipped thresholds). Pass: at least one "Bull flag" trigger prints where the old build only ever showed "Bull flag Β· forming". Confirm the auto-stop label anchors under the flag low.
  5. Position tracking freezes the plan. With Track position ON, step forward from a confirmed BUY bar. Pass: the Position row reads "OPEN Β· qty @ entry Β· SL x" and the entry/stop/qty in that row do not move as later bars print, even while the live plan above them re-computes. Continue to a stop-out or TP3. Pass: the row flips to FLAT and the stop/target alert fires against the frozen level, not the current one. Tick Manual flat, confirm FLAT, then untick.
  6. Plan-zone boxes survive a hide cycle. Turn Show plan & table only on BUY ON, scroll to a stretch with no BUY (boxes vanish), then scroll back to a BUY bar. Pass: the stop and TP1–TP3 boxes render with their colors and borders again. In the old build they stayed invisible for the rest of the session.
  7. No repaint. Set an alert on "Entered Stage 2" or "BUY (full confirm)" mid-week on a daily chart of a stock whose weekly bar is in progress. Pass: nothing fires until the first daily bar after the weekly close. Confirm the table's Stage row still updates live during the week.

πŸ“‹ Publishing blurb (paste into TradingView release notes)

  • BUY signals now require a real structural stop inside your max-stop cap. If the stop had to be clamped, the planner shows ARM instead of BUY β€” expect fewer, better BUY prints. Toggle it off in Entry & Stop if you prefer the old behavior.
  • Default max stop distance changed from 8% to 3%. Existing charts keep their saved value β€” set it manually if you want the new default.
  • Weekly charts now classify Weinstein stages off the 30-week MA instead of the 30-month MA. Weekly stage reads will differ from before; this is the correct basis.
  • Stage, Stage-2 shading and the trail EMA no longer repaint. Signals confirm one higher-timeframe bar later and stay put. The Stage readout in the table still shows the live developing stage.
  • Bull-flag breakouts can finally trigger β€” the level they had to cross was previously unreachable.
  • The BUY marker now prints only when the decision engine actually says BUY, so marker and table always agree.
  • Double-bottom and pullback triggers now need average-or-better volume, consistent with the other setups.
  • New position tracking: on a BUY the entry, stop, quantity and targets are frozen, and stop/target alerts fire against that trade instead of the moving live plan.
  • New order-ready alerts via "Any alert() function call" with symbol, entry, stop, qty and rupee risk in the payload.
  • New "Confirmed bars only" toggle to stop intrabar flicker on live charts.
  • Fixed: plan-zone boxes no longer disappear permanently after a hide cycle.
  • Fixed: the suggested-stop R:R no longer overstates reward-to-risk on blue-sky setups.

---

Wyckoff Pro+ β€” Wyckoff Trigger

_Structures now have a lifecycle: they retire when the job is done, they stop fabricating secondary tests out of stale state, and their exits can no longer un-fire._

⚠️ Behavior changes (read before trusting old signals)

ChangeOldNewWhy it matters
Fabricated secondary test after a second climaxA pending "distribution AR" pointer survived a fresh buying climax. On the next in-band pivot high the script printed a secondary test that never happened β€” and that phantom test then upgraded the next trigger to "⚑ UTAD β€” PRIMARY SHORT ENTRY"The pointer is cleared on every fresh climaxOn trending distributions with successive lower highs, spurious secondary-test labels and the high-conviction UTAD short they produced no longer print on history. Sequences without stale state are unchanged bar for bar
Structures retireFloors and ceilings lived forever. Months after a markup completed, a deep correction printed "βœ– Acc fail" at a level that had stopped mattering β€” and could chain a bogus high-conviction Shakeout off itAccumulation retires at the measured-move target or N bars past the LPS, printing "Markup βœ“" (mirror: "Markdown βœ“" post-LPSY)Ancient dashed floor/ceiling lines disappear once a structure completes. Late "Acc fail" / "Dist fail" prints and their downstream signals are gone. The dashboard falls back to a trend read instead of a perpetual "Range β€” Accumulation?"
Invalidation events wait for the close"STRUCTURE FAIL β€” exit" alerts and their state teardowns fired on an intrabar dip and could roll back by the close β€” an irrevocable exit that un-happenedAll four invalidation events respect the "Confirm on bar close" settingExit alerts no longer vanish intrabar. No change on historical bars β€” every historical bar is confirmed
Event pivots wait for the closeSC / AR / ST / BC / AR-D / DST / LPS / LPSY labels flickered and their alerts could fire on pivots that never confirmedAll ten now respect the same confirm-on-close gateLive-chart flicker only; historical output is byte-identical
Opposing-climax contaminationA fresh climax on one side left the other side's fail-window state armed, so a Shakeout or Upthrust could re-arm inside the new structureEach climax clears the opposing side's fail-window and lifecycle stateSpurious re-arm prints inside a new structure disappear. Single-sided history is unchanged
LPS must be near the ceilingA pullback pivot 15% into markup could be labelled a creek retestLPS requires the pivot low within a set percentage above the ceiling (mirrored for LPSY below the floor)Far-from-structure "LPS" labels and their alerts disappear. Genuine near-ceiling LPS prints are unchanged

πŸ› Fixes

  • A stale pending-secondary-test pointer survived a fresh climax, letting the script invent a distribution secondary test β€” and upgrade the next trigger to a primary short entry β€” with no real test in the data.
  • Irrevocable "structure fail β€” exit" alerts bypassed the confirm-on-close setting and could fire on an intrabar dip that recovered.
  • Wyckoff event pivots bypassed the same gate, so labels flickered and alerts fired on pivots that never confirmed.
  • The measured-move target disappeared from the dashboard the moment the LPS printed β€” precisely when you need it. The target is now cached at the SOS and survives.
  • A fresh climax on one side did not clear the other side's fail-window memory, allowing cross-contaminated Shakeout/Upthrust re-arms.
  • The active range boundary lines leaked a drawing object per render when both a ceiling and a floor pair were live.

✨ New features

Structure lifecycle / terminal states β€” accumulation retires when the measured-move target is hit or N bars pass the LPS; distribution mirrors it after the LPSY. Β· Inputs: Structure Expiry (bars after LPS / LPSY) (40) Β· What you'll see: a "Markup βœ“" or "Markdown βœ“" label, the floor/ceiling lines removed, and a matching dashboard guidance row ("Cycle complete β€” trail longs, wait for new BC").

Cached measured-move target + target line β€” the target computed at the SOS/SOW is stored and survives the LPS teardown. Β· Inputs: Show Measured-Move Target Line (ON) Β· What you'll see: the dashboard "Target:" row keeps its number through markup, plus an optional dotted target line drawn alongside the range boundaries.

LPS proximity bound β€” an LPS must retest near the ceiling it broke. Β· Inputs: LPS max % above ceiling (5) Β· What you'll see: no more "LPS" labels deep inside a markup leg. Mirrored automatically for LPSY below the floor.

Volume-graded breakouts β€” the SOS/SOW breakout bar is graded against a volume multiple, matching the existing SC/BC/ST grading. Β· Inputs: Breakout Volume Multiple (SOS/SOW β˜…) (1.5) Β· What you'll see: "SOS β˜…" / "SOW β˜…" labels with a tooltip note when the breakout came on strong volume. Grading is cosmetic β€” no signal appears or disappears.

Guaranteed-at-close exit alerts β€” the four invalidation events also fire a dynamic alert at bar close. Β· Inputs: none β€” create one alert on "Any alert() function call" Β· What you'll see: exit notifications regardless of the frequency chosen in the alert dialog. All existing named alert conditions are unchanged.

Configurable failed-breakout retrace β€” the retrace level that defines a failed SOS/SOW was hardcoded at the midpoint. Β· Inputs: Failed-Breakout Retrace Level (0.5) Β· What you'll see: nothing at the default β€” behavior is identical until you change it.

βš™οΈ Changed defaults

InputOldNewEffect
β€”β€”β€”No shipped default changed in this release. Everything above arrives as a new input, which means it takes effect on existing chart instances immediately (there is no saved value to override it). Review Structure Expiry (40 bars) and LPS max % above ceiling (5%) against how you read your usual charts; existing inputs you have customised keep their saved values as normal.

πŸ§ͺ Test plan (before publishing)

  1. No fabricated secondary test. Find a trending distribution with two buying climaxes where the second makes a lower high and no distribution secondary test occurred between them (RSI>70 lower highs on a daily large-cap is the usual habitat). Pass: no secondary-test label prints on the pivot high after the second climax, and no "⚑ UTAD β€” PRIMARY SHORT ENTRY" appears there. Compare against a saved screenshot of the old build β€” the difference should be exactly the removal of that label and its downstream upgrade.
  2. Structures retire. Load a name that completed a full accumulation β†’ markup a year or more ago. Pass: a "Markup βœ“" label prints at the target or ~40 bars past the LPS; the dashed floor and ceiling lines are gone after it; the dashboard's next-step row reads "Cycle complete β€” trail longs, wait for new BC"; and no "βœ– Acc fail" prints during later corrections at the old floor.
  3. Invalidation alerts survive intrabar. Keep Confirm Spring/UTAD/SOS/SOW on bar close ON. On a live chart in an active structure, watch an intrabar dip through the invalidation level that recovers before the close. Pass: no "STRUCTURE FAIL β€” exit" alert fires and the structure state is intact at the close. Confirm history is unchanged: flip the input off and on β€” the historical label set must be identical either way.
  4. Measured-move target survives the LPS. Find a completed SOS β†’ LPS sequence. Pass: the dashboard "Target:" cell shows a number on the LPS bar and every bar after it, until the terminal state. With Show Measured-Move Target Line ON, a dotted line sits at that price.
  5. Volume-graded SOS/SOW. Compare a breakout on a clear volume spike against a quiet one, with Breakout Volume Multiple at 1.5. Pass: the spike prints "SOS β˜…" and the quiet one prints "SOS". Now raise the multiple to 5.0. Pass: all stars disappear but the count of SOS labels is unchanged β€” grading must not add or remove signals.
  6. LPS proximity. Set LPS max % above ceiling to 5, then to 20, on a name in a strong markup. Pass: at 5 there are no LPS labels well above the ceiling; at 20 the far ones return. Near-ceiling LPS labels must be present in both.
  7. No orphan lines. Sit on a live chart in an active range for a few minutes with Show Active Range Boundaries ON. Pass: exactly one ceiling and one floor line, with no stacking or ghosting as ticks arrive.
  8. Compile check. Run /pine-check (fast regression) before syncing β€” no compile was performed in the fix session.

πŸ“‹ Publishing blurb (paste into TradingView release notes)

  • Fixed a state bug that could fabricate a distribution secondary test after a second climax β€” and upgrade the next trigger to a "PRIMARY SHORT ENTRY" that was never earned. Those labels disappear from history.
  • Structures now retire. Once a markup or markdown completes, the script prints "Markup βœ“" / "Markdown βœ“" and removes the old floor and ceiling.
  • No more months-late "Acc fail" / "Dist fail" prints at levels that stopped mattering, and no bogus high-conviction Shakeouts chained off them.
  • Exit alerts no longer un-fire: the four structure-invalidation events now respect confirm-on-close, and also fire a guaranteed alert at bar close.
  • Event pivots (SC, AR, ST, BC, AR-D, DST, LPS, LPSY) respect confirm-on-close too β€” no more live-chart label flicker. Historical output is unchanged.
  • The measured-move target no longer disappears the moment the LPS prints. It is cached at the SOS and shown through markup, with an optional dotted target line.
  • New LPS proximity bound: a pullback 15% into markup can no longer be labelled a creek retest.
  • SOS/SOW breakouts are now volume-graded with a β˜…, matching the existing climax grading. Cosmetic only β€” no signal changes.
  • The failed-breakout retrace level is now an input instead of a hardcoded midpoint.
  • Fixed a drawing leak on the active range boundary lines.

---

Lock In Expiry β€” Lock In Expiry

_Unlock dates get the SEBI rule right, stop landing on days the market is shut, and the dashboard finally tells you how much rupee supply is coming._

⚠️ Behavior changes (read before trusting old signals)

ChangeOldNewWhy it matters
Capex toggle and the non-promoter unlockTicking "issue mainly for capex" pushed the non-promoter unlock out to 12 months on post-Aug-2021 mainboard IPOsThe capex carve-out applies to promoter tranches only; non-promoter stays at 6 monthsThe date moves 6 months EARLIER on every capex-flagged post-2021 mainboard IPO. Re-check any position you have sized or timed around that unlock. Promoter legs are unchanged
Allotment date can no longer land on a weekendListing minus N calendar days could fall on a Saturday or Sunday, and all six month-anniversary expiries inherited the skewThe allotment snaps back to the preceding trading dayWherever this happened, all six expiry dates shift 1–2 days earlier (then snap forward off non-trading days as before)
Anchor 50/50 split is regime-gatedThe 30-day/90-day anchor split was applied to every IPO, including pre-Apr-2022 ones that had no such splitPre-regime allotments show a single "βš“ Anchor 100%" tranche at 30 days and no 90-day lineVisible if you relax the max-age filter onto older IPOs: the phantom 90-day supply event disappears and the 30-day overhang doubles to its correct weight
Days-of-ADV overhangComputed from chart-timeframe volume β€” a 5-minute chart overstated it by roughly 75Γ—, a weekly chart understated it ~5Γ—Always computed from daily average volume, whatever chart you are onThe Γ—ADV figure in labels, the NEXT row and every tranche row is now comparable across timeframes
Alerts only on eligible symbolsAlert conditions ignored the eligibility filter, so unlock alerts could be created on a US stock or a decade-old listingAll eight alert conditions require the symbol to be Indian and inside the max-age windowYou can leave the indicator enabled globally without generating meaningless alerts
Weekly/monthly alert timingLanding and window alerts triggered one full higher-timeframe bar lateThey trigger on the bar that actually contains the unlockUp to 7 days earlier on weekly, a month on monthly. The impact scorecard's baseline price/volume re-latch with it, so measured post-unlock returns, relative performance, volume and drawdown on weekly/monthly charts will differ. Daily and intraday pick the same bar as before
Countdown is a calendar-date difference"0 days left" appeared from about 09:16 the day before expiryCounted midnight-to-midnight in exchange timeEvery countdown can read one day higher intraday; "0 days left" now appears only on the expiry date itself. Alert timing is unaffected
SME classification needs consecutive evidenceSix scattered odd-lot prints in the detection window permanently collapsed the lot GCD and silently reclassified an SME as Mainboard β€” changing every lock-in durationA collapse must be confirmed by N consecutive prints; a genuine migration still commits, now with a table warningPreviously misclassified charts revert to SME, which changes the non-promoter and promoter-minimum durations and therefore every expiry date on those charts
Future-dated listing/allotmentA future manual date passed eligibility and drew far-future expiriesThe indicator goes silent insteadTurn on the diagnostics row to see why

πŸ› Fixes

  • The capex toggle wrongly shifted the non-promoter expiry six months late β€” SEBI's capex carve-out is a promoter-tranche rule.
  • The allotment date could land on a weekend, putting a 1–2 day skew into all six month-anniversary expiries.
  • Days-of-ADV was computed on chart-timeframe volume, making the overhang figure wildly wrong on anything other than a daily chart.
  • Alert conditions ignored the eligibility filter, so unlock alerts could be armed on non-Indian symbols and long-listed stocks.
  • The anchor 50/50 split was applied to pre-Apr-2022 IPOs that never had one, drawing a phantom 90-day tranche and halving the 30-day weight.
  • On weekly and monthly charts, landing and window events fired one bar late, which also skewed the impact scorecard's measured returns.
  • The countdown floored instead of using calendar dates, showing "0 days left" from the previous morning.
  • A handful of stray odd-lot prints could permanently and silently reclassify an SME as Mainboard, changing every lock-in duration with no warning.
  • Labels advertised the requested impact window ("20d") even on chart timeframes where it was clamped much shorter.

✨ New features

Rupee unlock value column β€” how much stock is unlocking, in β‚Ή crore (shares Γ— close). Β· Inputs: none β€” appears when supply percentages and shares outstanding are known Β· What you'll see: a new "β‚Ή Cr" column in the dashboard between Γ—ADV and impact, filled for the NEXT row and every tranche row; "β€”" when the inputs are missing.

Exchange holiday list β€” unlock dates snap off listed holidays as well as weekends, in both directions. Β· Inputs: NSE holidays (DD-MM-YYYY, comma-separated) (empty) Β· What you'll see: with the list filled in, no unlock line lands on a closed day, even across festival clusters that run into a weekend. Empty means weekend-only snapping, exactly as before.

Trading-days countdown β€” calendar days and sessions, side by side. Β· Inputs: uses the holiday list above Β· What you'll see: the banner reads "N days Β· M trading", the NEXT row reads "Nd / Mtd", and each pending tranche's Days cell carries both. Without a holiday list it is a weekday count; the list makes it exact.

Explicit allotment date β€” skip the listing-minus-N-days estimate when you know the real date. Β· Inputs: Override allotment date (OFF), Allotment date Β· What you'll see: nothing until you switch it on; the offset method is bit-identical to before. Both paths snap backward off weekends and listed holidays.

Editable SME durations β€” the SME lock-in periods are now gazette-correctable like the mainboard regimes. Β· Inputs: SME non-promoter lock-in (months) (12), SME promoter minimum lock-in (months) (36) Β· What you'll see: identical output at the defaults ("1 Year" / "3 Years").

Anchor split regime date β€” third regulatory regime input alongside the existing two. Β· Inputs: Anchor 50/50 split from (01-Apr-2022) Β· What you'll see: pre-regime IPOs show "βš“ Anchor 100%" at 30 days and no 90-day tranche.

Classification-change warning β€” flags a genuine SMEβ†’Mainboard migration inside the detection window. Β· Inputs: GCD collapse needs N consecutive odd prints (3) Β· What you'll see: "⚠️ classification changed in window" appended to the dashboard's first row.

Diagnostics row β€” tells you why the indicator is silent. Β· Inputs: One-line reason when staying silent (OFF) Β· What you'll see: "πŸ’€ Lock-in inactive Β· no listing data / not an Indian symbol / listing date is in the future / IPO too old β€” Nd, max Md". Default off so it does not put a row on every non-Indian chart.

Effective impact window β€” labels print the window actually used after clamping. Β· Inputs: none Β· What you'll see: "6.7d impact" on a 5-minute chart, "42d impact" on monthly, unchanged "20d" on daily and weekly.

βš™οΈ Changed defaults

InputOldNewEffect
Lot-detection windowtitle: "(days after listing)"title: "(trading days after listing)"Title and tooltip only β€” the value (250) and the behavior are unchanged. It always counted daily bars; the label now says so. Existing chart instances keep every saved value they have.

No numeric default changed in this release. Every item above arrives as a new input, so it applies to existing chart instances immediately β€” in particular, check Anchor 50/50 split from and GCD collapse needs N consecutive odd prints if you run this on older or thinly-traded listings.

πŸ§ͺ Test plan (before publishing)

  1. Capex / non-promoter date β€” the one to check first. Open a post-Aug-2021 mainboard IPO chart on which you have "Mainboard: issue mainly for capex" ticked. Note the current Non-Promoter expiry date, then update the script. Pass: the date moves exactly 6 months earlier, and the promoter tranche dates do not move. Do this on every capex-flagged chart you own and write down the old and new dates before you trust any positioning around them.
  2. Weekend allotment snapping. Use Override listing date to set a listing that falls on a Monday or Tuesday with the default 2-day allotment offset, so listing-minus-2 lands on a weekend. Pass: the allotment resolves to the preceding Friday and all six expiry dates shift with it. Repeat with a listing where the offset lands mid-week. Pass: no change versus the old build.
  3. Holiday list. Enter a few real NSE holidays (e.g. 26-01-2026, 14-03-2026, 21-10-2026) and pick a chart where an unlock lands on or next to one. Pass: no unlock line sits on a listed holiday, and a festival-cluster date that runs into a weekend still resolves to a valid trading day. Clear the field. Pass: output reverts to the weekend-only dates.
  4. Trading-day countdown. With the holiday list filled and a pending unlock more than a month out. Pass: the banner shows "N days Β· M trading" with M < N; the NEXT row shows "Nd / Mtd"; and M matches a manual weekday count minus the listed holidays in the interval.
  5. β‚Ή-crore column. On a recent IPO, fill in the supply-sizing percentages. Pass: the dashboard shows seven columns with "β‚Ή Cr" between Γ—ADV and impact, the NEXT row and each tranche row carry a figure, and it reconciles with (supply % Γ— shares outstanding Γ— current price)/10^7. Clear the supply percentages. Pass: the cells show "β€”" rather than a wrong number.
  6. Alert eligibility. Try to create each unlock alert on a US symbol (e.g. NASDAQ:AAPL) and on an Indian stock listed more than the max-age window ago. Pass: none of the eight conditions fire. Repeat on an in-window Indian IPO. Pass: they fire normally.
  7. Days of ADV is timeframe-stable. Note the Γ—ADV figure for the next unlock on a daily chart. Switch to 5-minute, then weekly. Pass: the figure is the same on all three (previously it inflated ~75Γ— intraday and shrank ~5Γ— on weekly).
  8. Countdown boundary. On the trading day before an expiry, check the banner during market hours. Pass: it reads "1 day", not "0 days left". On the expiry date itself. Pass: "0 days left".
  9. Higher-timeframe alert bar. Put the indicator on a weekly chart of a stock with a past unlock. Pass: the landing event marks the weekly bar that contains the unlock date, not the one after it. Note that impact-scorecard numbers on weekly/monthly will differ from your previous readings β€” expected.
  10. SME classification. Load an SME listing that previously displayed as Mainboard. Pass: it now reads SME, the durations revert to the SME periods, and expiry dates change accordingly. On a genuine SMEβ†’Mainboard migration. Pass: the collapse still commits and the first dashboard row appends "⚠️ classification changed in window".
  11. Diagnostics. Turn on One-line reason when staying silent and load a US symbol, then an old Indian listing. Pass: one muted row explaining each case. Turn it off. Pass: the chart is clean again.

πŸ“‹ Publishing blurb (paste into TradingView release notes)

  • Important: on post-Aug-2021 mainboard IPOs with "issue mainly for capex" ticked, the non-promoter unlock date moves 6 months earlier. SEBI's capex carve-out applies to promoter tranches only. Recheck any dates you have positioned around.
  • Allotment dates no longer land on weekends. Where they used to, all six expiry dates shift 1–2 days earlier.
  • New optional NSE holiday list β€” unlock dates now snap off listed holidays as well as weekends, in both directions.
  • New trading-days countdown alongside calendar days: "N days Β· M trading" in the banner, "Nd / Mtd" in the table.
  • New β‚Ή-crore unlock value column, so you can see the rupee size of the supply, not just the percentage.
  • Days-of-ADV now always uses daily volume β€” the figure was badly wrong on intraday and weekly charts.
  • Unlock alerts can no longer be created on non-Indian symbols or stocks past the age filter.
  • On weekly and monthly charts, unlock alerts now fire on the bar that contains the unlock instead of the one after it.
  • Countdowns are calendar-date based: "0 days left" appears on the expiry date itself, not from the previous morning.
  • SME detection now needs consecutive confirming prints, so a few stray odd lots can no longer silently reclassify an SME and change all its lock-in durations. Genuine migrations are flagged in the table.
  • New optional explicit allotment-date input, editable SME durations, an anchor-split regime date, and a diagnostics row that explains why the indicator is staying silent.

---

Defensive Asset Screener β€” Defensive Asset Screener

_Runs on any timeframe again, on a score that finally means what it says, with sector benchmarks that match the stock._

⚠️ Behavior changes (read before trusting old signals)

ChangeOldNewWhy it matters
Chart timeframeEvery rolling statistic silently used chart bars β€” a 15-minute chart massively understated volatility then annualised it by √252; a weekly chart's "252-day" window was really five years. A mid-cycle fix then made the script refuse to run outside dailyA daily sampling engine feeds correlation, volatility, 52-week high/low, drawdown and the downturn tally, so the script runs on any chart timeframe againIntraday and hourly charts now show the same correlation, volatility, 52-week and downturn stats as the daily chart. Daily-chart values are equivalent to before. Honest limits: above-daily charts sample once per chart bar, and short-history intraday charts show N/A until enough daily samples accumulate rather than showing something wrong
Score scaleComponents summed to 135, not the documented 100, and a Γ—1.5 regime multiplier saturated everything above ~67 to 100Each component is gated by its method toggle, the maximum accumulates only enabled components, and the score is normalised to a true 0–100Every score changes. With all methods enabled, scores rescale by roughly 100/135 β€” an old 81 reads about 60. Retune your alert thresholds. The default threshold stays at 60, but 60 now means something different
Regime no longer moves the scoreThe volatility/drawdown regime multiplied the score, so a VIX spike could flip an asset "defensive" with no change in the asset itselfThe score is regime-independent; the regime is a separate badge with its own four alerts"Asset Became / No Longer Defensive" alerts now fire on genuine asset changes only. Asset rankings are stable across regimes
Verdict ruleThe five detection-method toggles fed nothing visible β€” only the adjusted score drove the verdictVerdict = manual override OR score β‰₯ threshold OR at least 2 methods firedThe Detection Methods toggles now visibly matter. Some assets flip verdict without any change in score
Beta windowBeta mixed a 252-day correlation with a 20-day volatility ratio β€” neither fast nor slowCorrelation and both volatilities use the same lookback windowDisplayed volatility ratio and annualised volatility shift from 20-day-reactive to 252-day-stable, and the beta score component moves with them
Sector benchmarkingA bare "IT" substring matched UTILITIES and HOSPITALITY, so Indian utilities were benchmarked against an IT index; "Health Technology" hit the technology branch before pharma, sending healthcare to IT (US: to QQQ, never XLV); FMCG tokens never matched "Consumer Non-Durables"Branch order and tokens rebuilt on TradingView's actual sector vocabulary; industry is consulted for REITs and precious metalsSector 1-year comparisons are against the right index. Four previously unreachable defensive-sector score bonuses can now fire
Downturn engineInteger division made the outperformance ratio binary β€” 0 or 1 β€” so the score component was all-or-nothing and the table could show "0.0% (13/27d)"True fractional ratioScore component β‘€ is continuous and the "outperformed in downturns" method can fire on a partial record
Keyword matchingSubstring matching flagged SHYAMMETL ("SHY"), TIPSINDLTD ("TIPS") and every USDT/USDC pair as defensiveDescriptive tokens stay substrings; ambiguous short tokens require whole-ticker equality; stablecoin tokens match only as the bare symbol or a crypto base currencyThose false positives are gone. GOLDBEES, GDXJ and INDIAVIX still match; BTCUSDT, ETHUSDC, USDTRY and USDCAD no longer do
Sector detection no longer clobbersThe sector branch overwrote earlier keyword or manual detectionsIt contributes to the classification instead of replacing itKeyword and manual detections survive a sector miss

πŸ› Fixes

  • Every rolling statistic was chart-timeframe dependent despite being labelled "daily" β€” the fix wave made the script error out on non-daily charts, and this release replaces that with a proper daily sampling engine so it works everywhere.
  • Integer division reduced the downturn-outperformance ratio to 0 or 1, breaking a whole score component and producing self-contradicting table cells.
  • A bare "IT" substring routed Indian utilities and hospitality to an IT benchmark; "Health Technology" was captured by the technology branch before pharma, so healthcare never reached the healthcare sector index.
  • Ticker keyword matching produced false positives on ordinary stocks (SHYAMMETL, TIPSINDLTD) and on every stablecoin-quoted crypto and USD forex pair.
  • The sector branch assigned rather than accumulated the defensive flag, wiping out keyword and manual detections.
  • The five detection methods were computed but never reached the visible verdict.
  • The 0–100 score plots rendered on the price scale of an overlay indicator, drawing a flat line near zero on index charts; they now default to hidden and can be re-enabled from the Style tab.
  • Adaptive table colors and emoji ignored your correlation and beta threshold inputs and used hardcoded bands.
  • Telecom stocks were benchmarked against a media index, and India had no utilities/power branch at all.

✨ New features

Detection-method checklist row β€” see exactly which of the five methods fired. Β· Inputs: the existing πŸ›‘οΈ Detection Methods toggles Β· What you'll see: a new table row "Methods n/5" with βœ… fired Β· βœ– enabled but quiet Β· ⊘ disabled per method, each with a tooltip showing the current value against its threshold. Table grew to 13 rows.

Verdict wiring β€” the verdict is now score OR β‰₯2 methods. Β· Inputs: Defensive Score Threshold (60) Β· What you'll see: the chart label, chart background and table verdict all follow the same rule; two new data-window exports, "Verdict Defensive" and "Methods Fired".

Confirmed daily bar mode β€” compute everything from the previous confirmed daily bar. Β· Inputs: Confirmed Daily Bar (OFF) Β· What you'll see: no change until you enable it; then alerts stop firing intraday on values that can still move, at the cost of a one-day lag.

India power/utilities benchmark and honest telecom β€” utilities, power and electric map to a power index; telecom maps to the broad market rather than a media index. Β· Inputs: none Β· What you'll see: correct sector 1-year comparisons for Indian utilities and telecom names. An unresolvable sector proxy now degrades those cells to N/A instead of erroring the script.

Threshold-aware colors β€” table cell backgrounds and the 🟒/🟑/πŸ”΄ markers for long-term correlation, short-term correlation and beta key off your own threshold inputs. Β· Inputs: Inverse Correlation Threshold (-0.3), Negative Beta Threshold (-0.2) Β· What you'll see: the green band moves when you move the threshold, and the tooltips' band tables follow.

βš™οΈ Changed defaults

InputOldNewEffect
Defensive Score Threshold60 on a 0–135-ish scale inflated by a Γ—1.5 regime multiplier60 on a true 0–100 scaleThe number is the same but the scale beneath it is not. Existing chart instances keep their saved threshold β€” and that saved value now means something different. Expect to retune it, and to retune any alerts built on it
Plot Defense Score / Threshold plotsDrawn on the price scaleDefault to hiddenThey rendered as a flat line near zero on index charts. Re-enable from the Style tab after pinning to a separate scale

Everything else keeps its saved value on existing chart instances as normal.

πŸ§ͺ Test plan (before publishing)

  1. Timeframe invariance β€” the headline check. Load a liquid ETF or large-cap (e.g. NSE:GOLDBEES, NSE:NIFTY, or AMEX:GLD) on a daily chart and note the long-term correlation, beta, annualised volatility, 52-week high/low and downturn rate. Switch to 60-minute, then 15-minute. Pass: the same values, within rounding. Switch to weekly and monthly. Pass: the script runs (no runtime error) β€” remember those timeframes sample once per chart bar, so a 252-window is 252 weeks there. On a fresh intraday chart with little history. Pass: long-window cells read N/A rather than a wrong number.
  2. Score renormalisation and threshold retune. With all five detection methods enabled, note the score on three assets you know well. Pass: each is roughly 100/135 of its old value (an old 81 lands near 60), the score tooltip shows "raw points / enabled max / normalized", and the score never exceeds 100. Now disable two methods. Pass: the score stays on a 0–100 scale rather than shrinking. Then re-set your alert thresholds on every existing alert built on this script and record the new values.
  3. Regime is decoupled. Watch an asset across a VIX spike (or lower VIX Risk Threshold to force High Risk). Pass: the regime badge flips but the score does not move, and no "Asset Became Defensive" alert fires from the regime change alone.
  4. Sector detection. Load an Indian utility or power name (e.g. NSE:NTPC, NSE:POWERGRID). Pass: the sector benchmark reads the power index, not an IT index. Load an Indian pharma name (e.g. NSE:SUNPHARMA) and a US healthcare name (e.g. NYSE:JNJ). Pass: pharma/health routes to the health branch, not to IT/QQQ. Load an Indian telecom name (e.g. NSE:BHARTIARTL). Pass: benchmarked against the broad market, not a media index.
  5. Keyword false positives. Load NSE:SHYAMMETL and NSE:TIPSINDLTD. Pass: neither is flagged defensive by the keyword method. Load BINANCE:BTCUSDT and a USD forex pair such as FX:USDCAD. Pass: not flagged. Load NSE:GOLDBEES and AMEX:GDXJ. Pass: still flagged.
  6. Methods checklist row. With mixed toggles (say correlation and beta on, downturns off). Pass: the "Methods n/5" row shows βœ… for what fired, βœ– for enabled-but-quiet and ⊘ for the disabled one; the count matches the label's "Methods n/5"; and an asset with 2 methods fired but a sub-threshold score is still called DEFENSIVE.
  7. Downturn engine. Find an asset with a partial downturn record (at least 20 down-days, outperforming on some of them). Pass: the downturn rate shows an intermediate percentage, not 0.0% or 100.0%, and the table no longer contradicts itself (no "0.0% (13/27d)").
  8. Single-window beta. Pass: the beta tooltip states that correlation and both volatilities use the same lookback, and the Vol Ratio tooltip no longer claims a 20-day rolling window.
  9. Confirmed daily bar. Turn on Confirmed Daily Bar intraday. Pass: all stats freeze at yesterday's close and do not move with the developing session.
  10. Compile check. Run /pine-check before syncing β€” no compile was performed in the fix session. Expect score values and non-daily stats to differ by design.

πŸ“‹ Publishing blurb (paste into TradingView release notes)

  • The screener works on any chart timeframe again. All statistics are now computed from true daily samples, so a 15-minute chart shows the same correlation, beta, volatility and 52-week numbers as the daily chart.
  • The defense score is now a real 0–100. It used to sum to 135 and then get multiplied by a regime factor that saturated everything above ~67. Expect every score to change β€” an old 81 now reads about 60. Please retune your alert thresholds.
  • The market regime no longer moves the score. It is a separate badge with its own alerts, so a VIX spike can no longer flip an asset "defensive" with zero change in the asset.
  • The Detection Methods toggles finally matter: an asset is Defensive when the score clears your threshold or at least 2 methods fire.
  • New Methods checklist row in the table β€” βœ… fired, βœ– enabled but quiet, ⊘ disabled, with per-method tooltips.
  • Sector benchmarking fixed. Indian utilities were being compared against an IT index because "UTILITIES" contains "IT"; healthcare was routed to technology before it ever reached the health branch.
  • New India power/utilities benchmark, and telecom now benchmarks against the broad market instead of a media index.
  • Keyword detection no longer flags SHYAMMETL, TIPSINDLTD or stablecoin-quoted crypto and USD forex pairs as defensive. Gold, VIX and bond tickers still match.
  • The downturn-performance engine was returning only 0% or 100% because of an integer division. It is now a real fraction.
  • Beta uses a single consistent window for correlation and both volatilities.
  • Table colors and emoji now follow your own correlation and beta threshold inputs.
  • New optional "Confirmed Daily Bar" mode for alerts that do not move intraday.

---

MFMSI Pro β€” US Market Sentiment - Multi-Factor Indicator

_Three factors that were quietly dead or lying are now live, and the composite tells you honestly when a feed has gone dark._

⚠️ Behavior changes (read before trusting old signals)

ChangeOldNewWhy it matters
RSI divergence factorStructurally dead β€” the detector compared a pivot against itself, so the divergence score sat permanently at neutral 50 and its two alerts could never fireThe pivot store is updated after detection, so a new pivot is compared against the stored previous oneThe divergence factor now moves, the composite shifts with it, and the two RSI-divergence alerts become fireable for the first time
Dead feedsA dead or unavailable feed silently scored a neutral 50 at full weight, diluting the composite toward 50 with no indicationA dead feed's weight is dropped from the total and the remaining live factors renormalise to 100%The composite reflects only what it can actually see. If every weighted factor is dead it holds at neutral 50 instead of printing 0 (max bearish). Notable: on the benchmark itself (e.g. SPY) the relative-strength weight is now dropped entirely rather than pinned at 50
Percentile readoutsInteger division meant every percentile showed only 0th or 100thCorrect float arithmetic, now via the built-in percentile rankPercentile cells span the full range. Ties rank marginally higher than before, and the warmup period shows NaN instead of a bogus 0
Percentile windows on intraday charts"252 bars" meant chart bars β€” about two weeks on an hourly chartThe PCR and VIX percentile and 52-week windows are anchored to daily dataA true trading year on any chart timeframe. Side benefit: dynamic PCR levels are valid from the first bar intraday instead of blanking for 252 bars. The composite's own percentile stays chart-local by design and says so in its tooltip
McClellan OscillatorBuilt on raw net advances, which drift with the exchange's issue countRatio-adjusted: net advances as a share of total issuesImmune to issue-count drift. All thresholds are preserved, but the values differ from raw-net, so breadth-thrust timings can shift on historical bars
Price momentum in the compositeBolted on after normalisation as an unweighted Β±15 with an unbounded ROC kicker β€” the "sentiment" reading became a momentum chaser on volatile namesA properly weighted factor inside the normalisationAt the default 5% weight, momentum now moves the composite by at most about Β±2.4 points instead of Β±15. Readings on trending names will be meaningfully less momentum-chased
VIX and TRIN scoringStep functions that produced plateaus and jumpsContinuous: VIX maps its daily percentile through the old anchors; TRIN is scored from a daily log z-score, contrarian to Β±2Οƒ then flipping toward the old reversal extremesSmoother factor texture. TRIN also changes level, not just texture β€” it now measures relative to its own year rather than absolute bands
Adaptive PCR thresholdsThe dynamic branch pulled the upper (fear) zone inward as volatility rose β€” the opposite of what the tooltip promisedBoth extreme zones move toward the 52-week extremes as volatility rises, widening the neutral bandFewer extreme PCR signals in high-volatility regimes, which is the documented intent. The static path already behaved correctly and is unchanged
PCR extreme signalsCrossed raw PCR against the thresholds; the "PCR EMA Length" input was computed and never usedCross the smoothed PCR signal line, as the input tooltip always describedSlightly later but far less whipsawy PCR extreme signals and alerts. The dashboard still shows raw PCR against the thresholds
Flow score with toggles offDisabled flow components still added 50 to the numerator while the denominator counted only enabled ones β€” MFI-only could push flow above 100 straight into the compositeDisabled components contribute nothingLatent under all-on defaults; it detonated the moment you turned a flow component off. No change at defaults
Sector auto-detectionUsed GICS/Morningstar names TradingView does not emit, so most stocks silently fell back to the broad-market ETF β€” counting the index twice while the dashboard implied a sectorMatches TradingView's actual sector taxonomy first, with the legacy names as fallbacksAuto-detected symbols now get a real sector ETF, which changes the relative-strength factor on most stocks
Blank composite on new chartsSeveral routes let one na value poison the whole composite β€” most visibly, dynamic levels blanked the score for the first ~252 bars of every chartGuarded to neutral where a feed is genuinely absentThe score prints where it previously left a gap

πŸ› Fixes

  • The RSI divergence detector was structurally dead: it updated its pivot store before comparing, so it always compared a value to itself. The factor was permanently neutral and its two alerts could never fire.
  • Percentile calculations used integer division, so every percentile readout could only be 0th or 100th.
  • A dead or unavailable data feed scored neutral 50 at full weight, silently dragging the composite toward the middle with no indication anything was wrong.
  • With any flow component toggled off, the flow score could exceed 100 and feed that inflated value straight into the composite.
  • Several na routes blanked the whole composite, including a dynamic-levels path that blanked the score for the first ~252 bars of every chart by default, a zero-range bar poisoning money flow for 20 bars, and a degenerate self-ratio blanking the score on the benchmark itself.
  • Candle-ratio integer truncation distorted the price/volume score's branch thresholds.
  • A standard-deviation call sat inside a loop, executing many times per bar and corrupting its own rolling window.
  • Adaptive PCR thresholds narrowed the fear zone in high volatility β€” the inverse of the documented behavior.
  • The price-momentum bolt-on was unweighted and unbounded, letting it dominate a composite that advertised weighted factors.
  • Sector auto-detection used a taxonomy TradingView does not emit, so most symbols fell through to the broad-market ETF.
  • Feed symbols were unprefixed with invalid-symbol errors suppressed, so a wrong or unavailable symbol degraded silently.
  • Two dead inputs (an unused OBV rate-of-change and a signal-size control that could never apply) were removed, and a third β€” PCR EMA length β€” was wired up as documented.

✨ New features

Data-health row β€” the dashboard tells you when a feed has gone dark. Β· Inputs: none Β· What you'll see: a "⚠️ DATA:" row listing the dead feeds, with a tooltip showing the sum of live factor weights after renormalisation.

True renormalisation β€” dead feeds drop out of the weight total instead of scoring neutral at full weight. Β· Inputs: the existing per-factor weight inputs Β· What you'll see: a composite built only from live factors; neutral 50 held if everything weighted is dead.

Price trend as a real weighted factor β€” momentum is normalised and blended through its own weight. Β· Inputs: Price Trend Weight (%) (5) Β· What you'll see: a much smaller momentum contribution. The raw momentum balance still drives the dashboard's NEUTRAL-BULL / NEUTRAL-BEAR tilt.

Continuous VIX and TRIN scoring β€” percentile and z-score based instead of step functions. Β· Inputs: existing VIX threshold inputs still drive dashboard status and alerts Β· What you'll see: no more score plateaus or jumps; TRIN measured against its own trailing year, with absolute bands as a fallback until enough history accumulates.

Ratio-adjusted McClellan β€” computed as a share of total issues. Β· Inputs: none Β· What you'll see: the same threshold scale, values immune to issue-count drift.

Daily-anchored percentile windows β€” PCR and VIX percentiles and 52-week ranges pull from daily data. Β· Inputs: Percentile Lookback (bars) (252) Β· What you'll see: a true trading year on any chart timeframe, and dynamic PCR levels valid from the first intraday bar.

Confirmed bars only β€” gates every signal, alert and state transition to confirmed closes. Β· Inputs: Confirmed bars only (OFF) Β· What you'll see: no change until you switch it on; then no intrabar flicker across all 20 alert conditions, the signal labels and the signal-state chain.

βš™οΈ Changed defaults

InputOldNewEffect
PCR Type menuincluded "PCCA" and "PCCP"PCCE / PCC / PCCI / CUSTOMThose two options never existed in the live catalog. A saved "PCCA" or "PCCP" selection falls back to PCCE silently β€” open Settings on existing charts and confirm your PCR type
Custom PCR SymbolunprefixedUSI:PCCEAll feed symbols now carry explicit exchange prefixes (USI: and CBOE:), so a bad symbol shows up in the new data-health row instead of degrading silently
Price Trend Weight (%)did not exist β€” momentum was an unweighted Β±15 addend5New input. Momentum's influence on the composite drops from up to Β±15 points to roughly Β±2.4 at the default
Component score plotsdrawn on the price scaledefault to hidden0–100 series cannot render usefully on an overlay indicator's price scale. Re-enable individually from the Style tab
Multi-Timeframe Contextpresented as an active featureretitled "(currently inactive)"The setting is computed but not wired into the composite or the signals. The title and tooltip now say so

Existing chart instances keep their saved values for every pre-existing input; the new ones take effect immediately.

πŸ§ͺ Test plan (before publishing)

  1. RSI divergence is alive. Put the indicator on a US large-cap with a clear recent divergence (e.g. NASDAQ:AAPL or NASDAQ:NVDA, daily). Open the dashboard's RSI divergence cell and step across the divergence. Pass: the divergence score moves off 50 and the status changes from a permanent NEUTRAL. Create the two RSI-divergence alerts. Pass: they can be armed and they fire on the divergence bar (previously impossible).
  2. Percentiles span the range. With Show Percentile Rankings on and Percentile Lookback at 252, check the composite, PCR and VIX percentile cells across several days. Pass: they show intermediate values (e.g. 34th, 67th) and not only 0th/100th. During warmup. Pass: NaN rather than a bogus 0.
  3. Dead feeds drop weight. Load a chart during a session when at least one breadth feed is unavailable, or temporarily point Custom PCR Symbol at a nonsense ticker with CUSTOM selected. Pass: the "⚠️ DATA:" row appears naming the dead feed, its tooltip reports the live-weight sum, and the composite does not drift toward 50 from that feed. Then load the benchmark itself (AMEX:SPY). Pass: relative strength is reported as dropped, not scored at neutral 50.
  4. McClellan is ratio-adjusted. Compare breadth-thrust markers on a long history against your previous screenshots. Pass: thresholds are unchanged (Β±50 thrust, Β±100 extremes) but some thrust timings differ β€” expected β€” and the input and dashboard tooltips describe the ratio-adjusted calculation.
  5. Momentum is demoted. Take a strongly trending, volatile name and note the composite. Set Price Trend Weight (%) to 0, then back to 5, then to 15. Pass: the composite moves by only a couple of points between 0 and 5, and the reading on the trending name is visibly less momentum-driven than the old build. The dashboard's NEUTRAL-BULL / NEUTRAL-BEAR tilt still responds.
  6. Percentile windows on intraday. Load a 60-minute chart with Dynamic Historical Levels on. Pass: the dynamic PCR levels and the PCR/VIX percentiles are populated from the very first bars, and the values match the daily chart's. Previously they blanked for 252 bars and, once populated, covered about two weeks.
  7. PCR type menu. Open Settings on an existing chart that had PCCA or PCCP saved. Pass: the menu shows PCCE / PCC / PCCI / CUSTOM and the selection has fallen back to PCCE β€” set it deliberately and note the change.
  8. Adaptive thresholds widen. With Adaptive Thresholds and Dynamic Historical Levels on, compare a calm period against a high-volatility one. Pass: in high volatility both extreme zones sit closer to the 52-week extremes and the neutral band is wider, producing fewer extreme signals.
  9. PCR signals use the smoothed line. Turn on Show PCR Extreme Signals and compare against the old build. Pass: signals arrive slightly later and there are fewer rapid reversals. The dashboard's PCR status still shows raw PCR against the thresholds.
  10. Flow score with toggles off. Disable CMF and OBV, leaving MFI only. Pass: the flow score stays within 0–100 and the composite does not jump. Re-enable both. Pass: the composite returns to its all-on value.
  11. Sector detection. Load several US names across sectors (e.g. NYSE:JNJ, NYSE:XOM, NASDAQ:MSFT, NYSE:PG). Pass: each reports a sector ETF appropriate to its sector rather than falling back to the broad-market ETF.
  12. Confirmed bars only. Enable it on a live chart. Pass: signal labels and alert conditions stop changing intrabar and settle at the close. Historical output is unchanged.

πŸ“‹ Publishing blurb (paste into TradingView release notes)

  • The RSI divergence factor was structurally dead β€” it compared a pivot against itself, so it sat at a permanent neutral and its two alerts could never fire. It now works, and the composite shifts accordingly.
  • Percentile readouts could only ever show 0th or 100th because of an integer division. They now span the full range.
  • A dead data feed used to score a silent neutral 50 at full weight. Dead feeds now drop their weight entirely, the live factors renormalise, and a "⚠️ DATA:" row on the dashboard names what went dark.
  • The McClellan Oscillator is now ratio-adjusted, so it survives changes in the exchange's issue count. Thresholds are unchanged but some historical thrust timings differ.
  • Price momentum was bolted on after normalisation as an unweighted Β±15 with an unbounded kicker β€” the sentiment score was chasing momentum on volatile names. It is now a proper weighted factor at 5% by default.
  • PCR and VIX percentile windows are anchored to daily data, so "252" means a trading year on any chart timeframe β€” not two weeks on an hourly chart. Dynamic levels are valid from the first intraday bar.
  • VIX and TRIN are scored continuously instead of in steps. TRIN is now measured against its own trailing year rather than absolute bands.
  • Adaptive PCR thresholds now widen in high volatility as the tooltip always promised (the fear zone used to narrow), and PCR extreme signals now use the smoothed PCR line the "PCR EMA Length" input described: later, but far less whipsawy.
  • Fixed a latent bug where turning off a flow component pushed the flow score above 100 and into the composite.
  • Sector auto-detection rebuilt on TradingView's actual taxonomy β€” most stocks used to silently fall back to the broad-market ETF.
  • The PCR menu now lists only the symbols that exist (PCCE / PCC / PCCI / CUSTOM). If you had "PCCA" or "PCCP" saved, please re-select your PCR type.
  • New "Confirmed bars only" toggle to stop intrabar flicker across all signals and alerts.
INDICATOR