1. Triangular Hull Moving Average (THMA): THMA is a variation of the Hull Moving Average designed to provide better responsiveness to price movements compared to traditional moving averages. It uses a weighted moving average (WMA) in a more advanced way to effectively smooth the data. The formula for calculating THMA is: pine Copy Edit ta.wma(ta.wma(_src,_length / 3) * 3 - ta.wma(_src, _length / 2) - ta.wma(_src, _length), _length) 2. Volatility: Volatility is measured using the Hull Moving Average (HMA) applied to the difference between the "high" and "low" of each period. The volatility value is adjusted based on the percentile ranking. The volatility is normalized by dividing it by its percentile value. 3. Signals: Signals are generated when the THMA crosses above or below its previous value, indicating trend shifts: Bullish Signal: When the THMA crosses above its previous value, signaling an upward trend shift. Bearish Signal: When the THMA crosses below its previous value, signaling a downward trend shift. 4. Bands and Visual Representation: The indicator provides volatility bands around the THMA, visually representing market volatility. Users can toggle the display of volatility bands using the volat setting, allowing them to choose whether or not to show these bands. 5. Colors: Green (Bullish): Indicates a bullish trend (upward movement). Pink (Bearish): Indicates a bearish trend (downward movement). 6. Plotting and Signal Shapes: Triangle shapes are plotted on the chart to visually indicate trading signals (upward and downward triangles) when a crossover or crossunder of THMA occurs. 7. Market Trend and Volatility Display: A table is displayed at the bottom-right corner of the chart, showing the current trend (Trend) and volatility (Volatility) in real-time. 8. Inputs: len_: Length of the THMA moving average. source: The data source used (typically close price). volat: Toggle to enable/disable the display of volatility bands. len_vol: Length of the moving average used to calculate volatility. This indicator combines trend analysis (using THMA) and volatility analysis (using HMA) to provide a more comprehensive market view, helping traders identify potential trend shifts and assess market volatility.
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.