ka66

ka66: Alpha-Configurable EMA

ka66 Updated   
Allows directly modifying the Alpha/Smoothing Factor parameter of an EMA. This can allow for very close fits to price movement, instead of the more standard coarse-grained approach of adjusting smoothing via the look-back period.

Furthermore, we allow smoothing this EMA further by passing the original EMA through the EMA function again, and the output of this, yet again, to as many smoothing iterations are desired. For efficiency and practicality, limited to 10 iterations. This is inspired by indicators such as the DEMA.

Finally, we allow producing bands, with a configurable multiplier, around the final EMA. Useful for dynamic S/R levels, e.g. to use as trailing stop zones.
Release Notes:
Bug fix: was always smoothing at least once, even though iterations was set to zero. Now using much more explicit code.
Release Notes:
Okay, this time for sure, fixed incorrect smoothing count!
Release Notes:
Better step input in UI (smaller increments). And move over calculation logic to reusable library.
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?