OPEN-SOURCE SCRIPT

Kernel Filter Histogram (RBF)

138
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

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。