OPEN-SOURCE SCRIPT

Dynamic Trailing (Zeiierman)

Updated
Overview
The Dynamic Trailing (Zeiierman) indicator enhances the traditional SuperTrend approach by providing a more nuanced, adaptable tool for trend analysis and market volatility assessment. It combines techniques to identify dynamic support and resistance levels, trend directions, and market volatility. By integrating the Average True Range (ATR) with a unique multiplier system and smoothing mechanisms, this indicator offers a nuanced approach to trend-following strategies, making it a valuable asset for traders looking to leverage SuperTrend methodologies with additional insights into market dynamics.

snapshot


How It Works
At its core, this indicator builds on the traditional SuperTrend formula by utilizing a modified ATR calculation to define the deviation for dynamic support and resistance levels. These levels are dynamically adjusted based on market volatility. The innovation lies in the addition of the Hull Moving Average (HMA) and the Triple Exponential Moving Average (TEMA) for an enhanced smoothing effect, making the indicator's trend signals more reliable and less prone to market noise. The trend direction is determined by comparing the closing price with the dynamic levels, facilitating clear bullish or bearish signals.
The indicator incorporates a 'Supertrend' function, which uses the dynamic levels and the price’s position relative to them to determine the trend direction. This determination is visualized through color-coded lines and a cloud zone, which expands or contracts based on the ATR and a user-defined width setting, illustrating the market's volatility and trend strength.

  • ATR Calculation: Utilizes the Average True Range (ATR) to measure market volatility. The ATR is a cornerstone of this indicator, helping to dynamically adjust the support and resistance levels according to the market’s changing conditions.
  • Supertrend Calculation: Implements a supertrend formula that combines the ATR with user-defined multipliers to plot potential trend directions. This feature helps in identifying whether the market is in an uptrend or downtrend, offering visual cues for potential reversals.
  • TEMA Calculation: Employs the Triple Exponential Moving Average (TEMA) through a Hull Moving Average (HMA) calculation to smooth out price data. This smoothing process helps in reducing market noise and makes the trend direction clearer.
  • Dynamic Support and Resistance: Calculates dynamic support and resistance levels by applying a deviation (derived from the ATR and user-defined multiplier) to the smoothed price data. These levels adapt to market conditions, providing areas where price might experience support or resistance.
  • Trend and Cloud Calculation: Determines the overall trend direction and plots a 'Cloud' zone around it, which adjusts in width based on the ATR and a user-defined cloud width setting. This cloud acts as a visual buffer, indicating the strength and stability of the current trend.


█ How to Use
Trend Identification: The primary function of this indicator is to help traders quickly identify the prevailing market trend. A change in the color of the dynamic trailing line or its position relative to the price can signal potential trend reversals.

snapshot


Dynamic Support and Resistance: Unlike static levels, the dynamic levels adjust with market conditions, providing current areas where the price might experience support or resistance.

Dynamic Support

snapshot

Dynamic Resistance

snapshot


Settings
  • Mult (Multiplier): Adjusts the multiplier for the ATR calculation, affecting the deviation distance for support and resistance levels. Higher values decrease sensitivity and vice versa.
  • Len (Length): Sets the period for the HMA in the TEMA calculation, influencing the indicator's responsiveness to price changes.
  • Smoothness: Determines the smoothness of the dynamic support and resistance lines by setting the SMA length. Higher values result in smoother lines.
  • Cloud Width: Modifies the width of the cloud, providing a visual representation of market volatility.
  • Color Settings (upcol and dncol): Allows users to customize the colors of the indicator's lines and cloud, aiding in visual trend identification.



-----------------
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!
Release Notes
Color fix
dynamictrailingHMAHull Moving Average (HMA)supertrendsupertrendstrategySupport and ResistanceTriple Exponential Moving Average (TEMA)trailingtrailingstop

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer