OPEN-SOURCE SCRIPT
Smart Money Volume [JoeyWave]

Smart Money Volume highlights statistically abnormal volume bars and quantifies real-time buy/sell pressure using two well-established methods from quantitative finance.
═══════════════════════════════
WHAT IT DOES
═══════════════════════════════
• Volume Panel — amber bars mark statistical outliers detected via Tukey's IQR method
• Pressure HUD (top-right) — shows current dominant side (BUY / SELL), pressure magnitude (%), and strength (WEAK / MODERATE / STRONG)
═══════════════════════════════
METHODOLOGY
═══════════════════════════════
1. Outlier Detection — Tukey's Interquartile Range
threshold = Q3 + k × (Q3 − Q1)
Default k = 2.0 ("extreme outlier" by Tukey's standard). This is robust to skewed volume distributions where mean/std-based methods fail.
2. Buy/Sell Classification — Bulk Volume Classification (BVC)
Based on Easley, López de Prado, O'Hara (2012). Each bar's volume is split into buy/sell proportions using the normalized log-return:
buy_fraction ≈ Φ(log_return / σ)
where Φ is the standard normal CDF, approximated with a logistic function.
3. Aggregated Pressure
Weighted buy and sell volumes are summed over the lookback window (default 20 bars). Pressure = buy_volume / total_volume.
═══════════════════════════════
HOW TO READ
═══════════════════════════════
• Amber bars → unusual volume activity worth investigating
• HUD BUY ▲ → buyers dominant; check % for conviction
• HUD SELL ▼ → sellers dominant
• STRONG ≥ 65% → high conviction
• MODERATE ≥ 55% → moderate
• WEAK < 55% → indecisive, near equilibrium
═══════════════════════════════
HOW TO USE
═══════════════════════════════
• Confluence tool — confirm breakouts, reversals, or trend continuation when an outlier aligns with your setup
• Pressure HUD as a regime filter — only take long setups when HUD shows BUY MODERATE+, shorts when SELL MODERATE+
• Look for divergences — price making new highs while pressure flips to SELL is a classic exhaustion signal
═══════════════════════════════
SETTINGS
═══════════════════════════════
• IQR Lookback — bars used for percentile calculation (default 50)
• IQR Multiplier — 1.5 = standard outlier, 2.0 = extreme (default)
• BVC Sigma Window — return volatility window (default 50)
• Pressure Lookback — bars aggregated for the HUD (default 20)
═══════════════════════════════
REFERENCES
═══════════════════════════════
Easley, D., López de Prado, M., O'Hara, M. (2012) — "Flow Toxicity and Liquidity in a High Frequency World." Review of Financial Studies.
Tukey, J. W. (1977) — "Exploratory Data Analysis." Addison-Wesley.
═══════════════════════════════
Works on any symbol and timeframe with available volume data. Tested on FX (OANDA tick volume), futures, indices, and crypto.
Author: JoeyWave
═══════════════════════════════
WHAT IT DOES
═══════════════════════════════
• Volume Panel — amber bars mark statistical outliers detected via Tukey's IQR method
• Pressure HUD (top-right) — shows current dominant side (BUY / SELL), pressure magnitude (%), and strength (WEAK / MODERATE / STRONG)
═══════════════════════════════
METHODOLOGY
═══════════════════════════════
1. Outlier Detection — Tukey's Interquartile Range
threshold = Q3 + k × (Q3 − Q1)
Default k = 2.0 ("extreme outlier" by Tukey's standard). This is robust to skewed volume distributions where mean/std-based methods fail.
2. Buy/Sell Classification — Bulk Volume Classification (BVC)
Based on Easley, López de Prado, O'Hara (2012). Each bar's volume is split into buy/sell proportions using the normalized log-return:
buy_fraction ≈ Φ(log_return / σ)
where Φ is the standard normal CDF, approximated with a logistic function.
3. Aggregated Pressure
Weighted buy and sell volumes are summed over the lookback window (default 20 bars). Pressure = buy_volume / total_volume.
═══════════════════════════════
HOW TO READ
═══════════════════════════════
• Amber bars → unusual volume activity worth investigating
• HUD BUY ▲ → buyers dominant; check % for conviction
• HUD SELL ▼ → sellers dominant
• STRONG ≥ 65% → high conviction
• MODERATE ≥ 55% → moderate
• WEAK < 55% → indecisive, near equilibrium
═══════════════════════════════
HOW TO USE
═══════════════════════════════
• Confluence tool — confirm breakouts, reversals, or trend continuation when an outlier aligns with your setup
• Pressure HUD as a regime filter — only take long setups when HUD shows BUY MODERATE+, shorts when SELL MODERATE+
• Look for divergences — price making new highs while pressure flips to SELL is a classic exhaustion signal
═══════════════════════════════
SETTINGS
═══════════════════════════════
• IQR Lookback — bars used for percentile calculation (default 50)
• IQR Multiplier — 1.5 = standard outlier, 2.0 = extreme (default)
• BVC Sigma Window — return volatility window (default 50)
• Pressure Lookback — bars aggregated for the HUD (default 20)
═══════════════════════════════
REFERENCES
═══════════════════════════════
Easley, D., López de Prado, M., O'Hara, M. (2012) — "Flow Toxicity and Liquidity in a High Frequency World." Review of Financial Studies.
Tukey, J. W. (1977) — "Exploratory Data Analysis." Addison-Wesley.
═══════════════════════════════
Works on any symbol and timeframe with available volume data. Tested on FX (OANDA tick volume), futures, indices, and crypto.
Author: JoeyWave
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。