OPEN-SOURCE SCRIPT
Kernel Filter Histogram (RBF)

The Kernel Filter Histogram (RBF) is a regime-detection and edge-confirmation tool built on Gaussian (RBF) kernel regression.
It is designed to identify when market conditions are favorable for participation and when traders should stay defensive.
Instead of reacting to price noise, this indicator measures the normalized slope of a smoothed kernel regression curve, converts it into a z-score, and displays it as a histogram representing directional edge pressure.
What It Measures
Underlying market regime (bullish, bearish, or neutral)
Strength and quality of directional momentum
Statistical edge expansion vs compression
When trend continuation is more likely vs chop
How It Works
Applies Nadaraya–Watson kernel regression using a Gaussian (RBF) kernel
Calculates the slope of the regression curve
Normalizes slope using ATR for cross-instrument consistency
Converts the result into a z-score to measure statistical deviation
Smooths the output into a readable histogram + signal line
Uses an optional threshold gate to filter low-quality conditions
Reading the Histogram
Green bars → Bullish regime / positive edge
Red bars → Bearish regime / negative edge
Gray bars → Neutral / low-edge environment
Above zero → Bullish pressure dominates
Below zero → Bearish pressure dominates
Threshold gating allows you to require minimum edge strength before treating signals as actionable.
Best Use Cases
Trade filter (only take longs when bullish, shorts when bearish)
Regime confirmation for existing strategies
Momentum quality assessment
Avoiding chop and low-probability setups
Multi-timeframe alignment tool
What This Is (and Is Not)
✔ IS: A high-quality regime and edge filter
✔ IS: Designed for professional trading systems
✔ IS: Instrument-agnostic and timeframe-agnostic
✖ NOT: A buy/sell signal generator
✖ NOT: A lagging moving average
✖ NOT: A beginner indicator
Recommended Usage
Use this indicator as a gatekeeper:
Only execute setups when the histogram confirms favorable regime conditions
Combine with your entry trigger, not instead of it
Works exceptionally well with trend-following, momentum, and mean-expansion systems
It is designed to identify when market conditions are favorable for participation and when traders should stay defensive.
Instead of reacting to price noise, this indicator measures the normalized slope of a smoothed kernel regression curve, converts it into a z-score, and displays it as a histogram representing directional edge pressure.
What It Measures
Underlying market regime (bullish, bearish, or neutral)
Strength and quality of directional momentum
Statistical edge expansion vs compression
When trend continuation is more likely vs chop
How It Works
Applies Nadaraya–Watson kernel regression using a Gaussian (RBF) kernel
Calculates the slope of the regression curve
Normalizes slope using ATR for cross-instrument consistency
Converts the result into a z-score to measure statistical deviation
Smooths the output into a readable histogram + signal line
Uses an optional threshold gate to filter low-quality conditions
Reading the Histogram
Green bars → Bullish regime / positive edge
Red bars → Bearish regime / negative edge
Gray bars → Neutral / low-edge environment
Above zero → Bullish pressure dominates
Below zero → Bearish pressure dominates
Threshold gating allows you to require minimum edge strength before treating signals as actionable.
Best Use Cases
Trade filter (only take longs when bullish, shorts when bearish)
Regime confirmation for existing strategies
Momentum quality assessment
Avoiding chop and low-probability setups
Multi-timeframe alignment tool
What This Is (and Is Not)
✔ IS: A high-quality regime and edge filter
✔ IS: Designed for professional trading systems
✔ IS: Instrument-agnostic and timeframe-agnostic
✖ NOT: A buy/sell signal generator
✖ NOT: A lagging moving average
✖ NOT: A beginner indicator
Recommended Usage
Use this indicator as a gatekeeper:
Only execute setups when the histogram confirms favorable regime conditions
Combine with your entry trigger, not instead of it
Works exceptionally well with trend-following, momentum, and mean-expansion systems
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.