Adaptive Kalman Trend Filter (Zeiierman)█ Overview
The Adaptive Kalman Trend Filter indicator is an advanced trend-following tool designed to help traders accurately identify market trends. Utilizing the Kalman Filter—a statistical algorithm rooted in control theory and signal processing—this indicator adapts to changing market conditions, smoothing price data to filter out noise. By focusing on state vector-based calculations, it dynamically adjusts trend and range measurements, making it an excellent tool for both trend-following and range-based trading strategies. The indicator's adaptive nature is enhanced by options for volatility adjustment and three unique Kalman filter models, each tailored for different market conditions.
█ How It Works
The Kalman Filter works by maintaining a model of the market state through matrices that represent state variables, error covariances, and measurement uncertainties. Here’s how each component plays a role in calculating the indicator’s trend:
⚪ State Vector (X): The state vector is a two-dimensional array where each element represents a market property. The first element is an estimate of the true price, while the second element represents the rate of change or trend in that price. This vector is updated iteratively with each new price, maintaining an ongoing estimate of both price and trend direction.
⚪ Covariance Matrix (P): The covariance matrix represents the uncertainty in the state vector’s estimates. It continuously adapts to changing conditions, representing how much error we expect in our trend and price estimates. Lower covariance values suggest higher confidence in the estimates, while higher values indicate less certainty, often due to market volatility.
⚪ Process Noise (Q): The process noise matrix (Q) is used to account for uncertainties in price movements that aren’t explained by historical trends. By allowing some degree of randomness, it enables the Kalman Filter to remain responsive to new data without overreacting to minor fluctuations. This noise is particularly useful in smoothing out price movements in highly volatile markets.
⚪ Measurement Noise (R): Measurement noise is an external input representing the reliability of each new price observation. In this indicator, it is represented by the setting Measurement Noise and determines how much weight is given to each new price point. Higher measurement noise makes the indicator less reactive to recent prices, smoothing the trend further.
⚪ Update Equations:
Prediction: The state vector and covariance matrix are first projected forward using a state transition matrix (F), which includes market estimates based on past data. This gives a “predicted” state before the next actual price is known.
Kalman Gain Calculation: The Kalman gain is calculated by comparing the predicted state with the actual price, balancing between the covariance matrix and measurement noise. This gain determines how much of the observed price should influence the state vector.
Correction: The observed price is then compared to the predicted price, and the state vector is updated using this Kalman gain. The updated covariance matrix reflects any adjustment in uncertainty based on the latest data.
█ Three Kalman Filter Models
Standard Model: Assumes that market fluctuations follow a linear progression without external adjustments. It is best suited for stable markets.
Volume Adjusted Model: Adjusts the filter sensitivity based on trading volume. High-volume periods result in stronger trends, making this model suitable for volume-driven assets.
Parkinson Adjusted Model: Uses the Parkinson estimator, accounting for volatility through high-low price ranges, making it effective in markets with high intraday fluctuations.
These models enable traders to choose a filter that aligns with current market conditions, enhancing trend accuracy and responsiveness.
█ Trend Strength
The Trend Strength provides a visual representation of the current trend's strength as a percentage based on oscillator calculations from the Kalman filter. This table divides trend strength into color-coded segments, helping traders quickly assess whether the market is strongly trending or nearing a reversal point. A high trend strength percentage indicates a robust trend, while a low percentage suggests weakening momentum or consolidation.
█ Trend Range
The Trend Range section evaluates the market's directional movement over a specified lookback period, highlighting areas where price oscillations indicate a trend. This calculation assesses how prices vary within the range, offering an indication of trend stability or the likelihood of reversals. By adjusting the trend range setting, traders can fine-tune the indicator’s sensitivity to longer or shorter trends.
█ Sigma Bands
The Sigma Bands in the indicator are based on statistical standard deviations (sigma levels), which act as dynamic support and resistance zones. These bands are calculated using the Kalman Filter's trend estimates and adjusted for volatility (if enabled). The bands expand and contract according to market volatility, providing a unique visualization of price boundaries. In high-volatility periods, the bands widen, offering better protection against false breakouts. During low volatility, the bands narrow, closely tracking price movements. Traders can use these sigma bands to spot potential entry and exit points, aiming for reversion trades or trend continuation setups.
Trend Based
Volatility Based
█ How to Use
Trend Following:
When the Kalman Filter is green, it signals a bullish trend, and when it’s red, it indicates a bearish trend. The Sigma Cloud provides additional insights into trend strength. In a strong bullish trend, the cloud remains below the Kalman Filter line, while in a strong bearish trend, the cloud stays above it. Expansion and contraction of the Sigma Cloud indicate market momentum changes. Rapid expansion suggests an impulsive move, which could either signal the continuation of the trend or be an early sign of a possible trend reversal.
Mean Reversion: Watch for prices touching the upper or lower sigma bands, which often act as dynamic support and resistance.
Volatility Breakouts: Enable volatility-adjusted sigma bands. During high volatility, watch for price movements that extend beyond the bands as potential breakout signals.
Trend Continuation: When the Kalman Filter line aligns with a high trend strength, it signals a continuation in that direction.
█ Settings
Measurement Noise: Adjusts how sensitive the indicator is to price changes. Higher values smooth out fluctuations but delay reaction, while lower values increase sensitivity to short-term changes.
Kalman Filter Model: Choose between the standard, volume-adjusted, and Parkinson-adjusted models based on market conditions.
Band Sigma: Sets the standard deviation used for calculating the sigma bands, directly affecting the width of the dynamic support and resistance.
Volatility Adjusted Bands: Enables bands to dynamically adapt to volatility, increasing their effectiveness in fluctuating markets.
Trend Strength: Defines the lookback period for trend strength calculation. Shorter periods result in more responsive trend strength readings, while longer periods smooth out the calculation.
Trend Range: Specifies the lookback period for the trend range, affecting the assessment of trend stability over time.
-----------------
Disclaimer
The information contained in my Scripts/Indicators/Ideas/Algos/Systems does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
My Scripts/Indicators/Ideas/Algos/Systems are only for educational purposes!
Directionalmovementindex
ADX-DI - Made EasyThis indicator is a visually improved version of ADX. It makes it much easier to see what's happening by simplifying those confusing, intersecting lines. With this, you can detect the ADX direction more clearly. All the features are also explained in the tooltips of the input fields. Some extra features are included, such as average top and bottom calculation and divergences.
Please note that the divergences on ADX are just experimental and are based on calculations, so there is no guarantee the direction will change.
Directional Movement Index FLEXA common problem experienced by short term traders using DMI/ADX is that the session breaks results in carry-over effects from the prior session. For example, a large gap up would result in a positive DMI, even though momentum is clearly negative. Note the extremely different results in the morning session, when the gap is reversed.
The DMI-FLEX algoritm resets the +DI and -DI values to the prior session ending midpoint, so that new momentum can be observed from the indicator. (Note for Pinescript coders: rma function does not accept series int, thus the explicit pine_rma function)
DMI-FLEX has the added feature that the ADX value, instead of a separate line, is shown as shading between the +DI and -DI lines, and the color itself is determined by whether +DI is above -DI for a bullish color, or -DI is above +DI for a bearish color.
DMI Flex also gives you the flexibility of inverse colors, in case your chart has inverted scale.
Summary and How to use:
1) Green when +DI is above -DI
2) Red when -DI is above +DI
3) Deeper shading represents a higher ADX value.
Directional Movement Indicator (DMI and ADX) - TartigradiaDirection Movement Indicator (DMI) is a trend indicator invented by Welles Wilder, who also authored RSI.
DMI+ and DMI- respectively indicate pressure towards bullish or bearish trends.
ADX is the average directional movement, which indicates whether the market is currently trending (high values above 25) or ranging (below 20) or undecided (between 20 and 25).
DMX is the non smoothed ADX, which allows to detect transitions from trending to ranging markets and inversely with zero lag, but at the expense of having much more noise.
This is an extended indicator, from the original one by BeikabuOyaji, please show them some love if you appreciate this indicator:
Usage: To use this indicator for entry: when DMI+ crosses over DMI-, there is a bullish sentiment, however ADX also needs to be above 25 to be significant, otherwise the move is not necessarily sustainable.
Inversely, when DMI+ crosses under DMI- and ADX is above 25, then the sentiment is significantly bearish, but if ADX is below 20, the signal should be disregarded.
This indicator automatically highlights the background in green when ADX is above 25, and in red when ADX is below 20, to ease interpretation.
Also, arrows can be activated in the Style menu to automatically show when the two conditions described above are met, or these can be used in a strategy.
Crypto-DX Crypto Directional Index [chhslai]Crypto-DX can be used to help measure the overall strength and direction of the crypto market trend.
Furthermore, it can be used as a screener to find out cryptocurrencies which are accumulating momentum and tends to potentially pump or dump.
How this indicator works :
If the Crypto-DX cross above the zero-level, it could be an indication that there is a trend reversal into upward. You should close your short position or place a long order right away.
If the Crypto-DX cross below the zero-level, it could be an indication that there is a trend reversal into downward. You should close your long position or place a short order right away.
If the Crypto-DX is consolidated around the zero-level, it could be an indication that the trend may be ended and followed by a sideway market. You are suggested not to place any order and wait for the market moves.
Divergence based trading strategy is fully applicable, just like the MACD.
Screener features :
Plot "Crypto Index" and "5 Custom Crypto"
Plot "Crypto Index" and "Top 30 Crypto"
Directional Movement RibbonWhat makes this different from directional movement index?
The aim is to reduce the amount of data analysis necessary before taking action; currently using DMI requires reviewing the DM+ and DM- plots, and ADX as well as review the overall trend of each one. Also there is the final analysis to determine whether a strong trend hasn’t been established at all.
This indicator condenses the information found from the standard DMI into an intuitive colored ribbon that reveals direction and strength at a glance.
How to use it?
Review the ribbon for sentiment based on color, green being bullish and red being bearish, (if using default color scheme). The brightness of the color determines the strength of the sentiment, brightest being strongest. If no color is represented at all then it is due to weakness and/or lack of direction.
Features
All colors customizable
Toggle display of indecision areas
Adjust levels considered strong, weak trends
Which markets is this meant for?
This can be used in any market, though it’s recommended to use with liquid markets where direction and strength can be found often.
What conditions?
Recommend to utilize with key levels and most commonly utilized moving average periods such as 20, 50, 100 or 200.
Directional Movement Index + Fisher Price Action With LabelsDIRECTIONAL MOVEMENT INDEX + FISHER PRICE ACTION WITH LABELS
Directional Movement Index shows buy and sell pressure.
Fisher transform shows price action trending bullish or bearish.
Caution dots notify you of conflicting trends.
***HOW TO USE***
The top lines are the fisher transform showing you the price action trend.
The bottom lines filled with color shows the DMI directional movement index.
The yellow dots at the bottom tell you if these two indicators are currently giving conflicting signals.
DMI
If the green line is above the red line and the background is colored green, there is more market buying than selling.
If the red line is above the green line and the background is colored red, there is more market selling than buying.
FISHER TRANSFORM
If the lines are painted green, the price action is trending up.
If the lines are painted red, the price action is trending down.
CAUTION DOTS
If a yellow dot shows up at the bottom of the chart, it is notifying you that the DMI and Fisher Transform are currently giving opposite signals…. so use caution.
***BULLISH/BEARISH LABEL***
There is also a label on the right side that tells you whether there is more buying or selling. This table updates in real time and changes colors so you can get an easy, quick interpretation of the current buy/sell pressure without having to look at the indicator data so you can make faster decisions on whether to enter or exit a trade.
Green means more market buying than selling.
Red means more market selling than buying.
Blue means an equal amount of market buying and selling.
If buying pressure is bullish but below the 20 level, a second label will show up in purple letting you know there is weak buying pressure so use caution.
If selling pressure is bearish but below the 20 level, a second label will show up in purple letting you know there is weak selling pressure so use caution.
There is a third label showing the current trend of the fisher transform. Green means bullish price action. Red means bearish price action.
The fourth label is orange and only shows up when the DMI and Fisher Transform are currently giving opposite signals, so make sure you use caution during those times.
***MARKETS***
This indicator can be used as a signal on all markets, including stocks, crypto, futures and forex.
***TIMEFRAMES***
This directional movement index + fisher transform indicator can be used on all timeframes.
***TIPS***
Try using numerous indicators of ours on your chart so you can instantly see the bullish or bearish trend of multiple indicators in real time without having to analyze the data. Some of our favorites are our Auto Fibonacci, Volume Profile, Momentum, Auto Support And Resistance and Money Flow Index in combination with this Directional Movement Index + Fisher Transform. They all have real time Bullish and Bearish labels as well so you can immediately understand each indicator's trend.
Volume Profile With Buy & Sell Pressure LabelVOLUME PROFILE WITH BUY AND SELL PRESSURE LABEL
This volume profile indicator shows volume traded for each bar and is colored according to the difference in buy and sell pressure(DMI).
***HOW TO USE***
If the bar and background is colored green, there is more market buying than selling on that bar.
If the bar and background is colored red, there is more market selling than buying on that bar.
If the bar and background is colored blue, there is an equal amount of market buying and selling on that bar.
***BUY/SELL LABEL***
There is also a label on the right side that tells you whether there is more buying or selling on the current bar. This table updates in real time and changes colors so you can get an easy, quick interpretation of the current buy/sell pressure without having to look at the volume bars so you can make faster decisions on whether to enter or exit a trade. The table changes colors in sync with the volume bars and background. Green means more market buying than selling. Red means more market selling than buying. Blue means an equal amount of market buying and selling.
***MARKETS***
This indicator can be used as a signal on all markets, including stocks, crypto, futures and forex.
***TIMEFRAMES***
This volume profile indicator can be used on all timeframes.
***TIPS***
Try using numerous indicators of ours on your chart so you can instantly see the bullish or bearish trend of multiple indicators in real time without having to analyze the data. Some of our favorites are our Auto Fibonacci, DMI, Momentum, Auto Support And Resistance and Money Flow Index in combination with this Volume Profile. They all have real time Bullish and Bearish labels as well so you can immediately understand each indicator's trend.
Candles Colored Green/Red According To Buy & Sell PressureCANDLES COLORED GREEN OR RED ACCORDING TO BUY & SELL PRESSURE
This indicator paints each candle green, red or blue depending on whether the buy/sell pressure for that candle is bullish, bearish or neutral.
***TURN OFF NORMAL CANDLE COLORS***
For this script to show properly on the chart, make sure you go to chart settings(gear icon in top right corner) and in the symbol tab, uncheck body, borders and wick.
***HOW TO USE***
When the directional movement index indicator shows more buying pressure than selling pressure, the candle will appear lime green. This indicates bullish buying pressure.
When the directional movement index indicator shows more selling pressure than buying pressure, the candle will appear red. This indicates bearish selling pressure.
When the directional movement index indicator shows the same amount of buy and sell pressure, the candle will appear blue. This indicates neutral buy/sell pressure.
Use the color changes to see if there is more buying or selling to pinpoint reversals and understand current market buying. Wait to enter or exit positions until the candles turn the opposite color.
***MARKETS***
This indicator can be used as a signal on all markets, including stocks, crypto, futures and forex.
***TIMEFRAMES***
This DMI color coded candlestick indicator can be used on all timeframes.
***TIPS***
Try using numerous indicators of ours on your chart so you can instantly see the bullish or bearish trend of multiple indicators in real time without having to analyze the data. Some of our favorites are our Auto Fibonacci, Directional Movement Index, Color Coded Buy & Sell Pressure Volume Profile, Auto Support And Resistance and Money Flow Index in combination with this Buy & Sell pressure Candle indicator.
DIOSC indicatorThe Diosc indicator based on DMI is the combined version of -DI and +DI. While +DI is above (the trend is up), +DI is used and in the other case -DI is used. In addition, 9-day EMA was added to the graph so that sell/buy points could be seen on the histogram. Both sell/buy points and divergence/convergence can be followed on the graph.
Temeli DMI üzerine kurulmuş Diosc göstergesi -DI ve +DI'ın birleştirilmiş halidir. Temel mantığı +DI yukarıda iken yani trend yukarı iken +DI, diğer durumda da -DI göz önüne alınarak grafik oluşturulmuştur. Ek olarak Al-Sat noktalarının histogram üzerinde görülebilmesi için de grafiğe 9 günlük EMA eklenmiştir. Grafik üzerinde hem Al-Sat noktaları takip edilebilir hem de uyuşmazlıklar takip edilebilir.