OPEN-SOURCE SCRIPT
Mis à jour

Contrarian Extremes: VIX + Put/Call (CPC, PCC)

2 263
What this indicator does (in one line :) ):

It highlights sentiment extremes using only CPC, PCC, and VIX, so you can spot the moments when the market is most likely overreacting.

Most indicators try to “predict” price. This one is simpler, it tracks Fear vs Euphoria and marks the zones where emotions are stretched.

The 3 inputs behind it
  • CCPC (TotalPut/Call) --> broad options sentiment
  • PPCC --> equity/retail-style fear proxy
  • VIX --> volatility stress / hedging pressure

What you’ll see on the chart
The script paints the background based on 3 regimes:
🫨 Panic --> extreme stress (capitulation-type conditions) --> 🎶 The background music is (Melancholy Man by The Moody Blues) 😨
😰 Fear / Risk-Off --> elevated fear --> defensive positioning
😌 Complacency / Calm --> low fear --> “everything is fine” mode --> 🎶 The background music is (What a Wonderful World by Louis Armstrong) 😁

All thresholds and colors are fully customizable in the Inputs, so you can also change the criteria to get higher or lower frequency signals on the chart.

How I personally interpret it (as a long-term investor)
In my backtests, this indicator behaves like a contrarian compass:

  • Fear / Panic zones often show up close to better long-term buy areas (not perfect timing, but good asymmetric entries).
  • Complacency zones often show up near better long-term reduce / take-profit areas (or at least be careful with fresh risk here).

This is not magic and it’s not a buy/sell button. Markets can stay fearful or complacent longer than you expect. But as a long-term investor, this helps you stop chasing hype and start scaling decisions around emotion extremes.

A simple long-term workflow:
  1. Use Daily or Weekly timeframe.
  2. When Fear/Panic appears: consider scaling in (DCA entries, add on confirmation, respect your risk limits).
  3. When Complacency appears: consider scaling out, tightening risk, or being picky with new buys.
  4. Always combine with basics: trend, levels, market structure, and risk management.

Where it tends to work best
Interestingly, this doesn’t only fit S&P/Nasdaq. It also behaves well on:

In general, it tends to work better (i.e. helps you more) in markets that move more on fear and greed and less on deep fundamental re-pricing.

⚠️ Disclaimer: educational tool only. No indicator is a guarantee. Use proper position sizing and understand the product you trade.
Notes de version
Overview
This indicator highlights sentiment extremes using only three gauges:
  • CCPC (Put/Call Ratio)
  • PPCC (Put/Call Ratio)
  • VIX (volatility stress)

The goal is simple: make fear vs. calm visible on the price chart in a clean, readable way, so you can focus on the moments when markets are more likely to be emotionally stretched.
This is a context tool, not a price predictor and not a buy/sell button.


What you see on the chart
The script paints the background based on 3 regimes:
  • PANIC --> extreme stress conditions
  • FEAR / RISK-OFF --> elevated fear / defensive positioning
  • COMPLACENCY / CALM --> low fear / “everything is fine” mode

Optional:
  • Markers to make regimes easy to spot on busy charts
  • Value labels at the start of a regime (off by default to keep charts clean)


How it works (calculation logic)

1) Data timeframe (important)
CCPC, PPCC and VIX are pulled on the Daily timeframe by default, then displayed across your chart (even if you’re on 4H/1H/etc).
That’s because the CCPC and PPCC values you see on TradingView are based on Cboe’s daily market statistics / daily summary data, so they typically update once per day (and on intraday charts you’re basically seeing a “stepped” daily value).

2) Three thresholds per index
Each of the 3 series has three user-defined levels:
  1. Low --> complacency
  2. High --> fear / stress
  3. Panic --> extreme stress


3) Confirmation rule (actionable part)

The script counts confirmation across the three inputs:
  • lowCount = how many of (CCPC, PPCC, VIX) are below their Low thresholds
  • highCount = how many are above their High thresholds

Then it assigns a regime:
  • PANIC
  • Default rule: triggered if any of the three hits its Panic threshold
  • Optional rule: require stronger confirmation (all must be in high stress)
  • FEAR / RISK-OFF
  • Triggered when highCount >= Min agreement count for FEAR
  • COMPLACENCY / CALM
  • Triggered when lowCount >= Min agreement count for COMPLACENCY

If none of the above conditions are met --> the chart stays neutral (no highlight).

How to use (long-term investor workflow)
This is the way I personally use it, and it’s the reason I built it:

1) Use Daily or Weekly charts.
This is about regimes, not scalping noise.

2) When FEAR / PANIC prints:
I start looking for long-term accumulation opportunities. Not necessarily “buy instantly”, but:
  • scale in (DCA style)
  • wait for a structure
  • keep risk sizing sane


3) When COMPLACENCY prints:
I become more selective with new risk. Depending on context:

  • take partial profits
  • reduce exposure
  • tighten risk
  • avoid chasing


In plain terms: fear is where you hunt for opportunity, calm is where you respect risk. And it doesn't work for you unless you have a strategy that already works for you. This Tool helps you to have another layer of confirmation for your analysis.


Settings (what to tweak first)
  • Thresholds (Low / High / Panic)
    Tune per market. Different assets live in different volatility regimes.
  • Min agreement count
    If you want fewer but stronger signals --> increase confirmation.
    If you want more frequent signals --> reduce it.
  • Panic rule (Any vs. Strong confirmation)
    “Any” is more responsive. “Strong confirmation” is rarer but cleaner.
  • Colors
    Fully customizable so you can match your chart theme.



Alerts
The script provides 3 alert conditions:
  • Complacency extreme
  • Fear / Risk-Off extreme
  • Panic extreme


These alerts are meant to be heads-up signals: “check the chart”, not “enter now”.

Notes & limitations
  • $INDEX:CPC/PPCC are equity options put/call ratios and VIX is equity volatility, so on assets like Gold/Crypto you’re using equity sentiment as a proxy. Sometimes it aligns beautifully (risk-on/risk-off flows), sometimes it won’t.
  • If you want a better fit for specific markets, you can keep the same logic and swap the volatility gauge and then retune thresholds. For example, you can swap VIX with GVZ ( XAUUSD Volatility Index) or DDVOL ( BTCUSD volatility index).


⚠️ Disclaimer
Educational tool only. No indicator is a guarantee. Use proper position sizing and your own judgment.

Clause de non-responsabilité

Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.