peacefulLizard50262

Triple Exponential Hull Moving Average THMA

This pine script calculates the triple exponential Hull moving average (THMA) of a given data series. The THMA is a type of moving average that is calculated using the exponential moving average (EMA) of the data. In this script, the ema() function is used to calculate the EMA of the data three times, with different lengths for each calculation. The resulting value is the THMA of the data. The script also plots the THMA on a chart, using a green color for upward trends and a red color for downward trends. The length of the moving average and the alpha parameter used in the EMA calculation can be specified by the user as input parameters.

A trader may use this pine script to help identify trends in the stock market. By plotting the triple exponential Hull moving average (THMA) of the data on a chart, the trader can quickly see whether the market is trending up or down, and how strong the trend is. This can help the trader make informed decisions about when to buy and sell stocks. Additionally, the script allows the user to customize the length of the moving average and the alpha parameter used in the EMA calculation, which can be useful for analyzing different time frames and making more accurate predictions.
Release Notes:
Added smoothing

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 a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

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.

Want to use this script on a chart?