alexgrover

Double Exponential Smoothing

alexgrover Wizard Updated   
Single Exponential Smoothing (ema) does not excel in following the data when there is a trend. This situation can be improved by the introduction of a second equation with a second constant gamma.

The gamma constant cant be lower than 0 and cant be greater than 1, higher values of gamma create less lag while preserving smoothness.Higher values of length must be followed by higher values of gamma in order to keep the lag low.

The first smoothing part consist of a classic ema but we add s-s1 to the previous smoothed value, this will help decrease lag.The second smoothing part then updates the trend, which is expressed as the difference between the last two values.
Release Notes:
Single Exponential Smoothing (ema) does not excel in following the data when there is a trend. This situation can be improved by the introduction of a second equation with a second constant gamma.

Like alpha, the gamma constant cant be lower than 0 and cant be greater than 1, higher values of gamma create less lag while preserving smoothness.Lower values of alpha must be followed by higher values of gamma in order to keep the lag low.

The first smoothing part consist of a classic ema but we add s-s1 to the previous smoothed value, this will help decrease lag.The second smoothing part then updates the trend, which is expressed as the difference between the last two values.
Release Notes:
alpha instead of length is added

Check out the indicators we are making at luxalgo: www.tradingview.com/u/LuxAlgo/
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?