INVITE-ONLY SCRIPT
已更新 Mr. Filter Kalman - [by Oberlunar]

The "Mr. Filter Kalman" is an advanced trading indicator designed for in-depth market analysis and decision-making by combining PID systems and Kalman filter.
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:
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:
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:
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
Important Notes
My long-term promise: The script will be updated following your suggestitions.
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.
發行說明
Updater for every time-frame (even if not accurately tested under 1D)發行說明
Multi-time frame option for HTF bug fixed (thanks to Samdabb for suggestions)發行說明
added some labels to identifyweak and strong long/short conditions
發行說明
Added background color tensor 發行說明
added a control on weak/strong signals in long and short area.僅限邀請腳本
只有經作者授權的使用者才能訪問此腳本,且通常需付費。您可以將此腳本加入收藏,但需先向作者申請並獲得許可後才能使用 — 點擊此處了解更多。如需更多詳情,請依照作者說明或直接聯繫oberlunar_tr。
除非您完全信任其作者並了解腳本的工作原理,否則TradingView不建議您付費或使用腳本。您也可以在我們的社群腳本中找到免費的開源替代方案。
作者的說明
To gain access to this script:
+ Contact the author directly through TradingView or follow the link provided in the author’s signature.
+ Explain why you are interested and how you plan to use the script.
提醒:在請求訪問權限之前,請閱讀僅限邀請腳本指南。
Link su autorizzazione. Solo italiani.
t.me/+azHozalsRellODlk
t.me/+azHozalsRellODlk
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
僅限邀請腳本
只有經作者授權的使用者才能訪問此腳本,且通常需付費。您可以將此腳本加入收藏,但需先向作者申請並獲得許可後才能使用 — 點擊此處了解更多。如需更多詳情,請依照作者說明或直接聯繫oberlunar_tr。
除非您完全信任其作者並了解腳本的工作原理,否則TradingView不建議您付費或使用腳本。您也可以在我們的社群腳本中找到免費的開源替代方案。
作者的說明
To gain access to this script:
+ Contact the author directly through TradingView or follow the link provided in the author’s signature.
+ Explain why you are interested and how you plan to use the script.
提醒:在請求訪問權限之前,請閱讀僅限邀請腳本指南。
Link su autorizzazione. Solo italiani.
t.me/+azHozalsRellODlk
t.me/+azHozalsRellODlk
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。