OPEN-SOURCE SCRIPT
Aggiornato

WCI - World Crisis Composite Indicator

494
WCI — World Crisis Composite Indicator v2.3

28 global feeds → one 0–100 threat score → one clear action.
Equities, FX, volatility, credit, commodities, yield curve — all real time. Tells you what to do at every crisis stage, including when and how much to re-enter.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ACTION SIGNAL
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

12-rule decision cascade. WCI score → momentum direction → Δ7 streak confirmation → ChartScore gate. Dynamic sizing: always min(Exposure%, signal ceiling).

EXIT ALL WCI > 70. Liquidate immediately.
REDUCE 10% WCI 55–70, momentum hostile.
WATCHLIST WCI 55–70, conditions met — observe only.
WAIT Streak or momentum not confirmed yet.
PILOT 25% First re-entry. WCI 40–55, COOLING, streak ✓.
SCALE IN 50% WCI 40–55 RETREATING or 28–40 COOLING.
ADD 75% WCI 28–40, RETREATING, streak ✓.
FULL DEPLOY WCI < 28. Crisis over.

Per-stock action word overlaid: BUY / WATCH / SKIP / AVOID / SELL.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
FIVE SCORING MODULES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

M1 Global Shock (0–25)
Equity sync crashes across SPX/NKY/DAX/SHC/SOX. Copper triple-method scoring (Z + ROC50 + SMA) catches both crash and supply-panic spike.

M2 FX Panic (0–20)
JPY/CHF/AUD/DXY + crude (200-SMA persistence + 52-wk high proximity + volume). Wheat food-crisis scoring (Z + ROC20 + breakout).

M3 Fear Gauge (0–20)
VIX complex (level + spike + term structure) + VVIX + SKEW + MOVE bond volatility.

M4 Haven Flow (0–20)
Detects both Safe Haven Rush (gold + bonds surging) AND Safe Haven Failure (gold crashing while equities fall — the 2008 pattern). Adaptive gate: gold crash > 8% in 3 days overrides equity threshold.

M5 Panic Index (0–15)
Failed bounces, put/call ratio, HYG credit stress + yield curve recession signal (inversion depth, duration, un-inversion detection, 2Y ROC).

Convergence multiplier: 3 modules = +15%, 4 = +30%, 5 = +50%.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Z-NORMALIZED GLOBAL PULSE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

7 indices: SPX · NKY · DAX · HSI · SOX · EEM · IDX (your local benchmark).

Each move measured against its own 1-year standard deviation — not raw percentages. SOX down 1.2% shows gray (routine), SPX down 1.2% shows red (unusual for SPX). Every index gets one fair vote regardless of native volatility.

Pulse label cell: color shifts red → amber → gray → green based on z-normalized breadth across all indices.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DASHBOARD
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

8-row compact table. Colored label cells, white detail cells.

WCI Score + crisis level (color = severity)
Signal Action + size + momentum (merged from 2 rows)
7-Bar Sparkline trend + Δ7/Δ1 values
Exposure Current % + direction + signal cap + streak
Driver Dominant module + score + crisis feeds active
Mood Two-line situational read (observation + reaction)
Chart ChartScore: per-stock structural assessment
Pulse 7 global indices, z-normalized, individually colored

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CHART LABELS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Placed at crisis onset transitions. 3-line compressed format:
Line 1: WCI score + action word (BUY/SELL/WATCH/AVOID/SKIP)
Line 2: Stock snapshot (drawdown, volume, relative strength)
Line 3: Trend structure (SMA position + direction)

After 7 bars: ATR-relative validation grade appended (A/B/C/D/F). Thresholds adapt per stock — A on a $5 stock ≠ A on SPY.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
28 DATA FEEDS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Equities: SPX, NKY, DAX, SHC, SOX, HSI, EEM
FX: USD/JPY, USD/CHF, AUD/USD, DXY
Volatility: VIX, VIX9D, VVIX, SKEW, VIX3M, MOVE
Credit: HYG, LQD
Havens: GLD, TLT
Commodities: Crude Oil, Copper, Wheat
Rates: US 2Y, US 10Y
Sentiment: Put/Call Ratio + your local index

Works on any chart, any timeframe (daily recommended). 5 configurable alerts — set once with "Any alert() function call".
Note di rilascio
WCI — World Crisis Composite Indicator v2.4

28 global feeds → one 0–100 threat score → one clear action.
Equities, FX, volatility, credit, commodities, yield curve — all real time. Tells you what to do at every crisis stage, including when and how much to re-enter.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ACTION SIGNAL
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

12-rule decision cascade. WCI score → momentum → Δ7 streak → ChartScore gate. Size = min(Exposure%, signal ceiling).

EXIT ALL WCI > 70. Liquidate immediately.
REDUCE 10% WCI 55–70, momentum hostile.
WATCHLIST WCI 55–70, conditions met — observe only.
WAIT Streak or momentum not confirmed yet.
PILOT 25% First re-entry. WCI 40–55, COOLING, streak ✓.
SCALE IN 50% WCI 40–55 RETREATING or 28–40 COOLING.
ADD 75% WCI 28–40, RETREATING, streak ✓.
FULL DEPLOY WCI < 28. Crisis over.

Per-stock overlay: BUY / WATCH / SKIP / AVOID / SELL.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
FIVE SCORING MODULES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

M1 Global Shock (0–25)
Equity sync crashes: SPX/NKY/DAX/SHC/SOX. Copper triple-method (Z + ROC50 + SMA) — catches both recession crash and supply-panic spike.

M2 FX Panic (0–20)
JPY/CHF/AUD/DXY with multi-timeframe memory (1/3/5-bar ROC, decaying 100%/80%/60%). Crude persistence (200-SMA + 52-wk high + volume). Wheat food-crisis scoring (Z + ROC20 + breakout). FX panic that lasted 3 days doesn't vanish on day 4.

M3 Fear Gauge (0–20)
VIX triple-benchmark (absolute + 20-SMA ratio + 50-SMA ratio). 50-SMA prevents "new normal" adaptation during prolonged crisis. VIX9D term structure, VVIX, SKEW, MOVE bond vol.

M4 Haven Flow (0–20)
Safe Haven Rush (gold + bonds surging) AND Safe Haven Failure (gold crashing while equities fall — the 2008 pattern). Gold crash override: if gold drops ≥8% in 3 days, equity gate loosens from -3% to -1.5%.

M5 Panic Index (0–15)
Failed bounces, put/call ratio, HYG credit stress, yield curve (inversion depth + duration + un-inversion detection + 2Y ROC).

Convergence: 3 modules = +15%, 4 = +30%, 5 = +50%.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Z-NORMALIZED GLOBAL PULSE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

7 indices: SPX · NKY · DAX · HSI · SOX · EEM · IDX (your local benchmark).

Each move measured against its own 1-year standard deviation — not raw %. SOX -1.2% = gray (routine). SPX -1.2% = red (unusual). Every index gets one fair vote. Pulse label color: red → amber → gray → green by z-normalized breadth.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DASHBOARD
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

8-row table. Colored title cells, white detail cells with borders.

WCI Score + crisis level
Signal Action + size + momentum + stock action
7-Bar Sparkline + Δ7/Δ1
Exposure Current % ▲▼ + signal cap + Δ7 streak
Driver Top module + score + active crisis feeds (Cu/Wh/Oil/YC)
Mood Two-line situational read
Chart Per-stock structural grade
Pulse 7 indices, z-normalized, per-cell colored

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CHART LABELS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

At crisis transitions. 3 lines: WCI + action, stock snapshot, trend structure. After 7 bars: ATR-relative grade (A/B/C/D/F) adapts per stock.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
28 DATA FEEDS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Equities: SPX, NKY, DAX, SHC, SOX, HSI, EEM
FX: USD/JPY, USD/CHF, AUD/USD, DXY (1/3/5-bar)
Volatility: VIX (20+50 SMA), VIX9D, VVIX, SKEW, VIX3M, MOVE
Credit: HYG, LQD
Havens: GLD, TLT
Commodities: Crude Oil, Copper, Wheat
Rates: US 2Y, US 10Y (yield curve)
Sentiment: Put/Call Ratio + your local index

Z-score lookback: 100 bars default (adjustable 50–500). Any chart, any timeframe (daily recommended). 5 alerts — set once with "Any alert() function call".
Note di rilascio
WCI — World Crisis Composite Indicator v2.5

28 global feeds → one 0–100 threat score → one clear action.
Equities, FX, volatility, credit, commodities, yield curve — all real time. Tells you what to do at every crisis stage, including when and how much to re-enter.

Timeframe-adaptive: put it on 1H for intraday crisis detection, 1D for daily signals, 1W for structural regime reads. Same score, different trader language.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ACTION SIGNAL
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

12-rule decision cascade. WCI score → momentum → Δ7 streak → ChartScore gate. Size = min(Exposure%, signal ceiling).

EXIT ALL WCI > 70. Liquidate immediately.
REDUCE 10% WCI 55–70, momentum hostile.
WATCHLIST WCI 55–70, conditions met — observe only.
WAIT Streak or momentum not confirmed yet.
PILOT 25% First re-entry. WCI 40–55, COOLING, streak ✓.
SCALE IN 50% WCI 40–55 RETREATING or 28–40 COOLING.
ADD 75% WCI 28–40, RETREATING, streak ✓.
FULL DEPLOY WCI < 28. Crisis over.

Per-stock overlay: BUY / WATCH / SKIP / AVOID / SELL.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
FIVE SCORING MODULES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

M1 Global Shock (0–25)
Equity sync crashes: SPX/NKY/DAX/SHC/SOX. Copper triple-method (Z + ROC50 + SMA) — catches both recession crash and supply-panic spike.

M2 FX Panic (0–20)
JPY/CHF/AUD/DXY with multi-timeframe memory (1/3/5-bar ROC, decaying 100%/80%/60%). Crude persistence (200-SMA + 52-wk high + volume). Wheat food-crisis scoring (Z + ROC20 + breakout). FX panic that lasted 3 days doesn't vanish on day 4.

M3 Fear Gauge (0–20)
VIX triple-benchmark (absolute + 20-SMA ratio + 50-SMA ratio). 50-SMA prevents "new normal" adaptation during prolonged crisis. VIX9D term structure, VVIX, SKEW, MOVE bond vol.

M4 Haven Flow (0–20)
Safe Haven Rush (gold + bonds surging) AND Safe Haven Failure (gold crashing while equities fall — the 2008 pattern). Gold crash override: if gold drops ≥8% in 3 days, equity gate loosens from -3% to -1.5%.

M5 Panic Index (0–15)
Failed bounces, put/call ratio, HYG credit stress, yield curve (inversion depth + duration + un-inversion detection + 2Y ROC).

Convergence: 3 modules = +15%, 4 = +30%, 5 = +50%.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
TIMEFRAME-ADAPTIVE MOOD
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Three reaction vocabularies, auto-selected by chart timeframe:

≤4H Intraday: scalper/day-trader language — "Flatten longs NOW", "Scalp the overshoots only", "Dead tape, save your ammo."
1D Daily: swing trader language — "Capital preservation is the priority now", "Jacket weather, not bunker weather."
1W+ Weekly: position/allocation language — "This is a regime break. Cash is the position", "Structural crisis accelerating."

Same observation (what's happening), different reaction (what to do about it) — matched to how you actually think on each timeframe.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Z-NORMALIZED GLOBAL PULSE + STATUS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

7 indices: SPX · NKY · DAX · HSI · SOX · EEM · NIFTY (your local benchmark).

Each move measured against its own 1-year standard deviation — not raw %. SOX -1.2% = gray (routine). SPX -1.2% = red (unusual). Every index gets one fair vote. Pulse label color: red → amber → gray → green by z-normalized breadth.

Live market status strip: bright green OPEN / red CLOSED per index, using real-time session detection (NYSE, TSE, XETRA, HKEX, NSE hours).

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DASHBOARD
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

9-row table. Colored title cells, white detail cells with borders.

WCI Score + crisis level
Signal Action + size + momentum + stock action
7-Bar Sparkline + Δ7/Δ1
Exposure Current % ▲▼ + cap when signal limits it
Driver Top module + score + active crisis feeds (Cu/Wh/Oil/YC)
Mood Two-line situational read (timeframe-adaptive)
Chart Per-stock structural grade
Pulse 7 indices, z-normalized, per-cell colored
Status OPEN/CLOSED per market, session-aware

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CHART LABELS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

At crisis transitions. 3 lines: WCI + action, stock snapshot, trend structure. After 7 bars: ATR-relative grade (A/B/C/D/F) adapts per stock.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NTM NEWS EXPORT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Optional JSON webhook alert with full WCI internals: all 5 module scores, sub-headline, narrative paragraph, label data, convergence metrics. Built for AI-powered news generation — feed into Claude/GPT to produce editorial crisis reports.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
28 DATA FEEDS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Equities: SPX, NKY, DAX, SHC, SOX, HSI, EEM
FX: USD/JPY, USD/CHF, AUD/USD, DXY (1/3/5-bar)
Volatility: VIX (20+50 SMA), VIX9D, VVIX, SKEW, VIX3M, MOVE
Credit: HYG, LQD
Havens: GLD, TLT
Commodities: Crude Oil, Copper, Wheat
Rates: US 2Y, US 10Y (yield curve)
Sentiment: Put/Call Ratio + your local index

Z-score lookback: 100 bars default (adjustable 50–500). Any chart, any timeframe. Uses chart's own resolution — 1H data on hourly, daily data on daily, weekly data on weekly. 5 alerts — set once with "Any alert() function call".
Note di rilascio
WCI — World Crisis Composite Indicator v2.6

30 global feeds → one 0–100 threat score → one clear action.
Equities, FX, volatility, credit, commodities, energy, yield curve — all real time. Tells you what to do at every crisis stage, including when and how much to re-enter.

Timeframe-adaptive: put it on 1H for intraday crisis detection, 1D for daily signals, 1W for structural regime reads. Same score, different trader language.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ACTION SIGNAL
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

12-rule decision cascade. WCI score → momentum → Δ7 streak → ChartScore gate. Size = min(Exposure%, signal ceiling).

EXIT ALL WCI > 70. Liquidate immediately.
REDUCE 10% WCI 55–70, momentum hostile.
WATCHLIST WCI 55–70, conditions met — observe only.
WAIT Streak or momentum not confirmed yet.
PILOT 25% First re-entry. WCI 40–55, COOLING, streak ✓.
SCALE IN 50% WCI 40–55 RETREATING or 28–40 COOLING.
ADD 75% WCI 28–40, RETREATING, streak ✓.
FULL DEPLOY WCI < 28. Crisis over.

Per-stock overlay: BUY / WATCH / SKIP / AVOID / SELL.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
FIVE SCORING MODULES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

M1 Global Shock (0–25)
Equity sync crashes: SPX/NKY/DAX/SHC/SOX. Copper triple-method (Z + ROC50 + SMA) — catches both recession crash and supply-panic spike.

M2 FX Panic (0–20)
JPY/CHF/AUD/DXY with multi-timeframe memory (1/3/5-bar ROC, decaying 100%/80%/60%). Crude persistence (200-SMA + 52-wk high + volume). Wheat food-crisis scoring (Z + ROC20 + breakout). Aluminium smelter disruption / Middle East supply shock. Natural Gas energy crisis / Hormuz vulnerability. DXY acceleration scoring. FX panic that lasted 3 days doesn't vanish on day 4.

M3 Fear Gauge (0–20)
VIX triple-benchmark (absolute + 20-SMA ratio + 50-SMA ratio). 50-SMA prevents "new normal" adaptation during prolonged crisis. VIX9D term structure, VVIX, SKEW, MOVE bond vol.

M4 Haven Flow (0–20)
Safe Haven Rush (gold + bonds surging) AND Safe Haven Failure (gold crashing while equities fall — the 2008 pattern). Gold crash override: if gold drops ≥8% in 3 days, equity gate loosens from -3% to -1.5%. Geopolitical crude+gold dual-surge detection.

M5 Panic Index (0–15)
Failed bounces, put/call ratio, HYG credit stress, yield curve (inversion depth + duration + un-inversion detection + 2Y ROC).

Convergence: 3 modules = +15%, 4 = +30%, 5 = +50%.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
TIMEFRAME-ADAPTIVE MOOD
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Three reaction vocabularies, auto-selected by chart timeframe:

≤4H Intraday: scalper/day-trader language — "Flatten longs NOW", "Scalp the overshoots only", "Dead tape, save your ammo."
1D Daily: swing trader language — "Capital preservation is the priority now", "Jacket weather, not bunker weather."
1W+ Weekly: position/allocation language — "This is a regime break. Cash is the position", "Structural crisis accelerating."

Plus editorial insight lines that interpret what the data MEANS — e.g. "Oil and metals both stressed — Middle East supply chains under threat" or "Yield curve un-inverting — historically this is when recessions actually begin."

3-4 lines: observation (what's happening) + reaction (what to do) + insight (why it matters).

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Z-NORMALIZED GLOBAL PULSE + STATUS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

7 indices: SPX · NKY · DAX · HSI · SOX · EEM · NIFTY (your local benchmark).

Each move measured against its own 1-year standard deviation — not raw %. SOX -1.2% = gray (routine). SPX -1.2% = red (unusual). Every index gets one fair vote. Pulse label shows up/flat/down breadth count. Pulse label colour: red → amber → gray → green by z-normalized breadth.

Live market status strip: bright green OPEN / red CLOSED per index, using real-time session detection (NYSE, TSE, XETRA, HKEX, NSE hours) with exchange holiday detection via stale-data checks.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DASHBOARD
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

9-row table. Coloured title cells, white detail cells with borders.

WCI Score + crisis level
Signal Action + size + momentum + stock action
7-Bar Sparkline + Δ7/Δ1
Exposure Current % ▲▼ + cap when signal limits it
Driver Top module + score + active feeds (Oil/Cu/Al/Gas/Wh/Gld/VIX/YC) with 52W levels
Mood 3-4 line situational read: observation + reaction + editorial insight (timeframe-adaptive)
Chart Per-stock structural grade + level tags (52W HIGH/LOW, Nr Month High/Low)
Pulse 7 indices, z-normalized, per-cell coloured, breadth count
Status OPEN/CLOSED per market, session + holiday aware

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CHART LABELS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

At crisis transitions. 3 lines: WCI + action, stock snapshot, trend structure. After 7 bars: ATR-relative grade (A/B/C/D/F) adapts per stock.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NTM NEWS EXPORT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Configurable JSON webhook alert (every N minutes, default 15). Fires on bar close + throttled live ticks + immediately on chart reload. Full payload: all 30 raw feed prices, all 5 module scores with internals, 52-week level status, pulse ROCs, session status, exposure, signal, ChartScore, sub-headline, narrative paragraph, label data, convergence metrics. Built for AI-powered news generation and downstream apps.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
30 DATA FEEDS (37 of 40 security calls)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Equities: SPX, NKY, DAX, SHC, SOX, HSI, EEM
FX: USD/JPY, USD/CHF, AUD/USD, DXY (1/3/5-bar)
Volatility: VIX (20+50 SMA), VIX9D, VVIX, SKEW, VIX3M, MOVE
Credit: HYG, LQD
Havens: GLD, TLT
Commodities: Crude Oil, Copper, Wheat, Aluminium, Natural Gas
Rates: US 2Y, US 10Y (yield curve)
Sentiment: Put/Call Ratio + your local index

Z-score lookback: 100 bars default (adjustable 50–500). Any chart, any timeframe. Uses chart's own resolution — 1H data on hourly, daily data on daily, weekly data on weekly. 5 alerts — set once with "Any alert() function call".

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.