OPEN-SOURCE SCRIPT
Crypto Fear & Greed Index

Crypto Fear & Greed Index [On-Chain Proxy]
Sentiment drives crypto more than most people want to admit. The problem is that most sentiment gauges live outside your charts — you can't overlay them, backtest against them, or set alerts. So I built one that runs entirely on native TradingView data.
What's in it:
Five components, each capturing a different angle of market psychology:
Volatility (25%) — Current realized vol vs a 30/90-day baseline. High volatility relative to recent history = fear. Calm markets = complacency/greed. This one's inverted — spikes in vol push the index down.
Momentum (25%) — Where price sits relative to its short and long moving averages. Well above both = greed. Well below = fear. Simple, but it works.
Volume (15%) — Not just raw volume, but directional volume. High volume in an uptrend reads as greed. High volume in a downtrend reads as fear. Low volume gets a neutral score regardless of direction.
BTC Dominance (15%) — When money rotates from alts back into BTC, that's a risk-off signal (fear). When BTC.D drops because people are aping into alts, that's greed. Measured as deviation from its own moving average baseline.
Stablecoin Dominance (20%) — Rising USDT.D means capital is parking in stables — people are scared. Falling USDT.D means money is flowing into risk assets. It's a surprisingly clean fear/greed proxy and serves as a stand-in for the social sentiment data that isn't available on-chart.
Reading it:
ScoreSentiment:
0–25 ExtremeFear
25–47 Fear
47–53 Neutral
53–75 Greed
75–100 Extreme Greed
The info table breaks down each component's individual score so you can see exactly what's driving the reading. If the composite says "Fear" but momentum is still showing greed, that tells you something different than all five components agreeing.
Customization:
All weights are adjustable if you disagree with the defaults. Lookback periods are configurable. Smoothing EMA is off by default (set to 1) but you can turn it up if you want a less noisy signal.
Setup:
Apply to BTCUSDT daily. The indicator pulls BTC.D and USDT.D automatically. Everything works out of the box on a free TradingView plan.
Alerts included for extreme fear entries, extreme greed entries, and midline crosses.
Not financial advice. Just a tool I built for my own analysis and decided to share. Do your own research and manage your risk.
Sentiment drives crypto more than most people want to admit. The problem is that most sentiment gauges live outside your charts — you can't overlay them, backtest against them, or set alerts. So I built one that runs entirely on native TradingView data.
What's in it:
Five components, each capturing a different angle of market psychology:
Volatility (25%) — Current realized vol vs a 30/90-day baseline. High volatility relative to recent history = fear. Calm markets = complacency/greed. This one's inverted — spikes in vol push the index down.
Momentum (25%) — Where price sits relative to its short and long moving averages. Well above both = greed. Well below = fear. Simple, but it works.
Volume (15%) — Not just raw volume, but directional volume. High volume in an uptrend reads as greed. High volume in a downtrend reads as fear. Low volume gets a neutral score regardless of direction.
BTC Dominance (15%) — When money rotates from alts back into BTC, that's a risk-off signal (fear). When BTC.D drops because people are aping into alts, that's greed. Measured as deviation from its own moving average baseline.
Stablecoin Dominance (20%) — Rising USDT.D means capital is parking in stables — people are scared. Falling USDT.D means money is flowing into risk assets. It's a surprisingly clean fear/greed proxy and serves as a stand-in for the social sentiment data that isn't available on-chart.
Reading it:
ScoreSentiment:
0–25 ExtremeFear
25–47 Fear
47–53 Neutral
53–75 Greed
75–100 Extreme Greed
The info table breaks down each component's individual score so you can see exactly what's driving the reading. If the composite says "Fear" but momentum is still showing greed, that tells you something different than all five components agreeing.
Customization:
All weights are adjustable if you disagree with the defaults. Lookback periods are configurable. Smoothing EMA is off by default (set to 1) but you can turn it up if you want a less noisy signal.
Setup:
Apply to BTCUSDT daily. The indicator pulls BTC.D and USDT.D automatically. Everything works out of the box on a free TradingView plan.
Alerts included for extreme fear entries, extreme greed entries, and midline crosses.
Not financial advice. Just a tool I built for my own analysis and decided to share. Do your own research and manage your risk.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
The Good, the Bad and the Bitcoin — No hype, just data.
Free indicators & honest backtests: youtube.com/@TheGoodTheBadAndTheBitcoin
Free indicators & honest backtests: youtube.com/@TheGoodTheBadAndTheBitcoin
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
The Good, the Bad and the Bitcoin — No hype, just data.
Free indicators & honest backtests: youtube.com/@TheGoodTheBadAndTheBitcoin
Free indicators & honest backtests: youtube.com/@TheGoodTheBadAndTheBitcoin
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.