Mr. Filter Kalman - [by Oberlunar]

The PID system is a feedback mechanism that adjusts outputs based on the error between the current price and its volatility. The proportional component reacts to the size of the current error, providing immediate feedback. The integral component accumulates past errors, addressing persistent trends or biases in price movements. The derivative component predicts future price changes by analyzing the rate of error change, offering a forward-looking dimension to the system. Together, these components smooth out noisy price data and identify meaningful trend shifts.
The Kalman filter adds a layer of sophistication by serving as a powerful noise reduction tool. It estimates the underlying trend of the price by dynamically adjusting its sensitivity to volume and price movements. By using a smoothing factor (𝛼), the filter calculates a weighted difference between the current price and its previous estimate, adapting to new data while minimizing the impact of short-term fluctuations. This ensures that the signals generated by the PID system are clear and reliable.
The integration of these two systems works synergistically. The PID system detects deviations and trend changes by analyzing historical and real-time data, while the Kalman filter ensures these signals are free from noise and distortions.
How it works
When the smoothed PID signal crosses below the Kalman filter, it reflects a shift in market dynamics where recent price deviations are indicating potential bearish momentum. The PID signal, being highly responsive to changes in price through its proportional, integral, and derivative components, captures the immediate transition towards selling pressure. Meanwhile, the Kalman filter, with its noise reduction capabilities, represents the smoothed and lagging trend of the market. This lag allows the Kalman filter to act as a reference point, ensuring that the short signal is not triggered by insignificant fluctuations or false movements.
Conversely, when the smoothed PID signal crosses above the Kalman filter, it indicates a strengthening of bullish momentum. The crossing suggests that price deviations are showing a consistent upward movement that outweighs the smoothed trend captured by the Kalman filter. In this case, the Kalman filter again acts as a stabilizing reference point, confirming that the upward movement is not merely transient noise but part of a larger trend.
PID System
The PID system (Proportional, Integral, Derivative) is used to create trading signals based on the difference (error) between the current price and its volatility:
- Proportional (P): Reacts to the current error.
- Integral (I): Accounts for accumulated past errors.
- Derivative (D): Predicts future changes based on the error's rate of change.
The output is a smoothed PID signal, which is ideal for detecting trends and reversals.
Kalman filter
The Kalman filter is a powerful tool to reduce market noise and provide clearer signals:
- Smoothing Factor (α): Adjusts the filter’s sensitivity.
Ideal for volatile markets and medium term strategies.
This feature combines signals from 10- and 15-minute charts, paired with a higher timeframe of 1D, to:
- Confirm long-term trends.
- Enhance the reliability of entry and exit signals.
Note: Due to this configuration, the indicator is best suited for intraday trading or, at most, weekly strategies. Avoid using timeframes larger than 15 minutes for the primary analysis to ensure optimal signal precision.
Customizable Parameters
- Proportional Coefficient (kP): Controls sensitivity to current errors.
- Integral Coefficient (kI): Adjusts the weight of accumulated errors.
- Derivative Coefficient (kD): Enhances reactivity to error changes.
- Lookback Period: Defines the period for moving average calculations.
- Kalman Smoothing Factor (α): Determines the intensity of Kalman filtering.
- Higher Timeframe: Specifies the timeframe for confirmation signals.
Important Notes
- Originality: This script leverages advanced and innovative techniques to provide unique value to traders. It is entirely original, with no borrowed source code from other developers. The methods implemented are distinct and do not rely on basic approaches such as simple moving averages or similar conventional techniques.
- Detailed Description: Every component is designed to improve signal reliability and simplify decision-making.
- Publishing Guidelines: This guide adheres to TradingView’s rules for invite-only - closed-source scripts.
My long-term promise: The script will be updated following your suggestitions.
weak and strong long/short conditions
Script su invito
Solo gli utenti autorizzati dall'autore hanno accesso a questo script e ciò richiede solitamente un pagamento. Puoi aggiungere lo script ai tuoi preferiti, ma potrai utilizzarlo solo dopo aver richiesto l'autorizzazione e averla ottenuta dal suo autore - per saperne di più leggi qui. Per maggiori dettagli, segui le istruzioni dell'autore qui sotto o contatta direttamente oberlunar_tr.
TradingView NON consiglia di pagare o utilizzare uno script a meno che non ci si fidi pienamente del suo autore e non si comprenda il suo funzionamento. Puoi anche trovare alternative gratuite e open-source nei nostri script della comunità.
Istruzioni dell'autore
Attenzione: prima di richiedere l'accesso, leggi la nostra guida per gli script su invito.
t.me/+azHozalsRellODlk
Declinazione di responsabilità
Script su invito
Solo gli utenti autorizzati dall'autore hanno accesso a questo script e ciò richiede solitamente un pagamento. Puoi aggiungere lo script ai tuoi preferiti, ma potrai utilizzarlo solo dopo aver richiesto l'autorizzazione e averla ottenuta dal suo autore - per saperne di più leggi qui. Per maggiori dettagli, segui le istruzioni dell'autore qui sotto o contatta direttamente oberlunar_tr.
TradingView NON consiglia di pagare o utilizzare uno script a meno che non ci si fidi pienamente del suo autore e non si comprenda il suo funzionamento. Puoi anche trovare alternative gratuite e open-source nei nostri script della comunità.
Istruzioni dell'autore
Attenzione: prima di richiedere l'accesso, leggi la nostra guida per gli script su invito.
t.me/+azHozalsRellODlk