OPEN-SOURCE SCRIPT
Kent Directional Filter

🧭 Kent Directional Filter
Author: GabrielAmadeusLau
Type: Filter
📖 What It Is
The Kent Directional Filter is a directionality-sensitive smoothing tool inspired by the Kent distribution, a probability model used to describe directional and elliptical shapes on a sphere. In this context, it's repurposed for analyzing the angular trajectory of price movements and smoothing them for actionable insights.
It’s ideal for:
Detecting directional bias with probabilistic weighting
Enhancing momentum or trend-following systems
Filtering non-linear price action
🔬 How It Works
Price Angle Estimation:
Computes a rough angular shift in price using atan(src - src[1]) to estimate direction.
Kent Distribution Weighting:
κ (kappa) controls concentration strength (how sharply it prefers a direction).
β (beta) controls ellipticity (bias toward curved vs. linear moves).
These parameters influence how strongly the indicator favors movements at ~45° angles, simulating a directional “lens.”
Smoothing:
A Simple Moving Average (SMA) is applied over the raw directional probabilities to reduce noise and highlight the underlying trend signal.
⚙️ Inputs
Source: Price series used for angle calculation (default: close)
Smoothing Length: Window size for the moving average
Pi Divisor: Pi / 4 would be 45 degrees, you can change the 4 to 3, 2, etc.
Kappa (κ): Controls how focused the directionality is (higher = sharper filter)
Beta (β): Adds curvature sensitivity; higher values accentuate asymmetrical moves
🧠 Tips for Best Results
Use κ = 1–2 for moderate directional filtering, and β = 0.3–0.7 for smooth elliptical bias.
Combine with volume-based indicators to confirm breakout strength.
Works best in higher timeframes (1h–1D) to capture macro directional structure.
I might revisit this.
Author: GabrielAmadeusLau
Type: Filter
📖 What It Is
The Kent Directional Filter is a directionality-sensitive smoothing tool inspired by the Kent distribution, a probability model used to describe directional and elliptical shapes on a sphere. In this context, it's repurposed for analyzing the angular trajectory of price movements and smoothing them for actionable insights.
It’s ideal for:
Detecting directional bias with probabilistic weighting
Enhancing momentum or trend-following systems
Filtering non-linear price action
🔬 How It Works
Price Angle Estimation:
Computes a rough angular shift in price using atan(src - src[1]) to estimate direction.
Kent Distribution Weighting:
κ (kappa) controls concentration strength (how sharply it prefers a direction).
β (beta) controls ellipticity (bias toward curved vs. linear moves).
These parameters influence how strongly the indicator favors movements at ~45° angles, simulating a directional “lens.”
Smoothing:
A Simple Moving Average (SMA) is applied over the raw directional probabilities to reduce noise and highlight the underlying trend signal.
⚙️ Inputs
Source: Price series used for angle calculation (default: close)
Smoothing Length: Window size for the moving average
Pi Divisor: Pi / 4 would be 45 degrees, you can change the 4 to 3, 2, etc.
Kappa (κ): Controls how focused the directionality is (higher = sharper filter)
Beta (β): Adds curvature sensitivity; higher values accentuate asymmetrical moves
🧠 Tips for Best Results
Use κ = 1–2 for moderate directional filtering, and β = 0.3–0.7 for smooth elliptical bias.
Combine with volume-based indicators to confirm breakout strength.
Works best in higher timeframes (1h–1D) to capture macro directional structure.
I might revisit this.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Gabriel Amadeus
The Real World - Stocks Campus:
Stocks, Options, Futures, Forex, Crypto, this is what we trade.
Learn profitable trading systems or build your own, just like I did.
jointherealworld.com/?a=f7jkjpg8kh
The Real World - Stocks Campus:
Stocks, Options, Futures, Forex, Crypto, this is what we trade.
Learn profitable trading systems or build your own, just like I did.
jointherealworld.com/?a=f7jkjpg8kh
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Gabriel Amadeus
The Real World - Stocks Campus:
Stocks, Options, Futures, Forex, Crypto, this is what we trade.
Learn profitable trading systems or build your own, just like I did.
jointherealworld.com/?a=f7jkjpg8kh
The Real World - Stocks Campus:
Stocks, Options, Futures, Forex, Crypto, this is what we trade.
Learn profitable trading systems or build your own, just like I did.
jointherealworld.com/?a=f7jkjpg8kh
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.