OPEN-SOURCE SCRIPT
Cross Asset Sentiment Extremes Oscillator

Cross Asset Sentiment Extremes Oscillator (XSEO)
WHAT IT IS
XSEO is a composite sentiment oscillator that scores market emotion on a 0 to 100 scale and flags the extremes where mean reversion setups cluster. Readings near the bottom of the scale mark washed out fear of the kind that tends to appear near lows. Readings near the top mark crowded greed of the kind that tends to appear near highs. One script covers stocks, indices, and crypto.
TWO BASKETS, ONE ENGINE
The script reads the symbol type and loads the matching basket of external data automatically. A manual override is available in the settings.
Stocks and indices basket:
VIX implied volatility (inverted, high VIX means fear)
NYSE TRIN (inverted, heavy selling pressure means fear)
CBOE equity put/call ratio, ranked in daily context (inverted)
High yield credit spread (inverted, wide spreads mean risk aversion)
Percent of S&P 500 stocks above their 200 day average (breadth strength)
Percent of S&P 500 stocks above their 50 day average (faster breadth)
Crypto basket:
Perp to spot basis on BTC (a funding and leverage proxy, a rich premium means greed)
Coinbase premium versus Binance (US spot demand)
USDT dominance (inverted, cash parked in stables means fear)
ETH/BTC momentum (alt risk appetite)
DXY (inverted, a strong dollar means risk aversion)
Chart internals, active in both modes:
RSI percentile rank (momentum extreme)
Extension from the 200 bar mean
Realized volatility rank, inverted (calm means complacency, spikes mean fear)
HOW IT IS BUILT
Every component is converted to a percentile rank over a lookback window so that different units blend cleanly, and fear oriented series are inverted so that high always means greed. Feeds that only publish daily (put/call, credit spreads, breadth) are ranked inside a daily request and held between updates. Live feeds and the chart internals are ranked on the chart timeframe, so the line keeps moving intraday. Feeds that are unavailable on a given bar (weekends, holidays, closed sessions) are skipped from the average rather than zeroed, which keeps the oscillator honest on 24/7 crypto charts. The external basket and the internals are then blended with an adjustable weight and smoothed.
READING IT
Above the upper threshold (default 80) the market is in the extreme greed zone. Below the lower threshold (default 20) it is in the extreme fear zone. The line colors itself red when hot, green when cold, and gray in the middle, and the background tints inside the zones.
SIGNALS AND ALERTS
Two trigger styles are available.
Zone Exit (default): the buy fires when the oscillator crosses back up out of the fear zone, and the sell fires when it crosses back down out of the greed zone. This waits for the turn and avoids some knife catching.
Zone Entry: fires the moment an extreme zone is entered. Earlier and more aggressive.
Alert conditions are included for both long and short.
SETTINGS
Fear and greed thresholds. Lookback for chart timeframe ranks (in bars) and a separate lookback for daily feeds (in days). External data weight percent, with the remainder going to the chart internals. Smoothing length. An optional display of the external and internal subscores so you can see what is driving a reading.
DATA SOURCES
CBOE:VIX, USI:TRIN.NY, USI:PCCE, FRED:BAMLH0A0HYM2, INDEX:S5TH, INDEX:S5FI, BINANCE:BTCUSDT.P, BINANCE:BTCUSDT, COINBASE:BTCUSD, CRYPTOCAP:USDT.D, BINANCE:ETHBTC, TVC:DXY
TIMEFRAMES AND NOTES
Built for higher timeframe charts but usable intraday. On intraday charts the daily feeds step once per day while everything else updates live. Consider raising the chart timeframe lookback on fast charts, for example 300 to 700 bars on 15 minute charts. Values drawn from the developing daily bar update in real time until that bar closes, which is standard higher timeframe behavior. XSEO is a timing and context tool, not a complete system. It works best as a filter for mean reversion entries at levels you already care about. Nothing here is financial advice.
Concept credit: builds on the classic composite fear and greed approach of blending volatility, positioning, breadth, and credit data into a single gauge.
WHAT IT IS
XSEO is a composite sentiment oscillator that scores market emotion on a 0 to 100 scale and flags the extremes where mean reversion setups cluster. Readings near the bottom of the scale mark washed out fear of the kind that tends to appear near lows. Readings near the top mark crowded greed of the kind that tends to appear near highs. One script covers stocks, indices, and crypto.
TWO BASKETS, ONE ENGINE
The script reads the symbol type and loads the matching basket of external data automatically. A manual override is available in the settings.
Stocks and indices basket:
VIX implied volatility (inverted, high VIX means fear)
NYSE TRIN (inverted, heavy selling pressure means fear)
CBOE equity put/call ratio, ranked in daily context (inverted)
High yield credit spread (inverted, wide spreads mean risk aversion)
Percent of S&P 500 stocks above their 200 day average (breadth strength)
Percent of S&P 500 stocks above their 50 day average (faster breadth)
Crypto basket:
Perp to spot basis on BTC (a funding and leverage proxy, a rich premium means greed)
Coinbase premium versus Binance (US spot demand)
USDT dominance (inverted, cash parked in stables means fear)
ETH/BTC momentum (alt risk appetite)
DXY (inverted, a strong dollar means risk aversion)
Chart internals, active in both modes:
RSI percentile rank (momentum extreme)
Extension from the 200 bar mean
Realized volatility rank, inverted (calm means complacency, spikes mean fear)
HOW IT IS BUILT
Every component is converted to a percentile rank over a lookback window so that different units blend cleanly, and fear oriented series are inverted so that high always means greed. Feeds that only publish daily (put/call, credit spreads, breadth) are ranked inside a daily request and held between updates. Live feeds and the chart internals are ranked on the chart timeframe, so the line keeps moving intraday. Feeds that are unavailable on a given bar (weekends, holidays, closed sessions) are skipped from the average rather than zeroed, which keeps the oscillator honest on 24/7 crypto charts. The external basket and the internals are then blended with an adjustable weight and smoothed.
READING IT
Above the upper threshold (default 80) the market is in the extreme greed zone. Below the lower threshold (default 20) it is in the extreme fear zone. The line colors itself red when hot, green when cold, and gray in the middle, and the background tints inside the zones.
SIGNALS AND ALERTS
Two trigger styles are available.
Zone Exit (default): the buy fires when the oscillator crosses back up out of the fear zone, and the sell fires when it crosses back down out of the greed zone. This waits for the turn and avoids some knife catching.
Zone Entry: fires the moment an extreme zone is entered. Earlier and more aggressive.
Alert conditions are included for both long and short.
SETTINGS
Fear and greed thresholds. Lookback for chart timeframe ranks (in bars) and a separate lookback for daily feeds (in days). External data weight percent, with the remainder going to the chart internals. Smoothing length. An optional display of the external and internal subscores so you can see what is driving a reading.
DATA SOURCES
CBOE:VIX, USI:TRIN.NY, USI:PCCE, FRED:BAMLH0A0HYM2, INDEX:S5TH, INDEX:S5FI, BINANCE:BTCUSDT.P, BINANCE:BTCUSDT, COINBASE:BTCUSD, CRYPTOCAP:USDT.D, BINANCE:ETHBTC, TVC:DXY
TIMEFRAMES AND NOTES
Built for higher timeframe charts but usable intraday. On intraday charts the daily feeds step once per day while everything else updates live. Consider raising the chart timeframe lookback on fast charts, for example 300 to 700 bars on 15 minute charts. Values drawn from the developing daily bar update in real time until that bar closes, which is standard higher timeframe behavior. XSEO is a timing and context tool, not a complete system. It works best as a filter for mean reversion entries at levels you already care about. Nothing here is financial advice.
Concept credit: builds on the classic composite fear and greed approach of blending volatility, positioning, breadth, and credit data into a single gauge.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Don't force a trade. Wait for your setup, be patient. Trade ideas are my own and not financial advice, I'm a monkey with a phone for crying out loud.
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.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Don't force a trade. Wait for your setup, be patient. Trade ideas are my own and not financial advice, I'm a monkey with a phone for crying out loud.
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.