TradingView
RedKTrader
27 Th03 2023 16:56

RedK DIY ZLMA: Customizable Zero-Lag MA (Educational / Utility) 

Ethereum / U.S. dollarBitstamp

Mô tả

This script is more of an educational / utility piece rather than a fully-fledged indicator - It provides an easy way to customize and produce a zero-lag Moving average that can then be used in various scenarios


What is DIY_ZLMA?
------------------------
The DIY ZLMA is for fans and enthusiasts of researching Moving Averages (like me) - the script enables the user to play around with one of the common approaches used to reduce lag in moving averages - which was explained in this old post below

tradingview.com/script/FYzZJSbq-TA-Basics-Creating-a-Zero-Lag-Moving-Average-using-Mirroring/


Suggested uses of the DIY_ZLMA
---------------------------------------

* The Zero-lag approach here applies 3 moving average passes to a source data series - I'll refer to these 3 passes as Base MA Pass , De-lagging Pass, and Smoothing Pass - these "passes" can be customized from the indicator settings in terms of MA Length and type. The first pass allows the choice of a "source", and the second pass allows additional fine tuning by playing around with the magnification factor. The 3rd pass (smoothing) is optional and can be skipped altogether when needed. (as noted in the script, HMA and TEMA, which are very common low-lag MA's use slightly different approach in the calculation than the one used here .. so we can't get an equivalent of either of these MA's with the customization of DIY_ZLMA parameters)

* After the user experiments with the various settings for the 3 passes, and finds a "preferred combination", the script not only plots the resulting My_ZLMA - it also produces the "1-line Pine script formula" that the user can then use in any other script, maybe to smoothen some data series, or to combine with other types of moving averages to create multi-MA cross-over trading signals... and so on.

* The DIY_ZLMA can also be added to another indicator as a signal line using the Indicator-on-Indicator feature of TradingView (review this post for step-by-step -->

)

* the script also showcases couple of recent (and very neat) Pine features: the use of User-defined Types (UDT) and User-defined Methods - which are awesome and a lot of fun to work with :)

Since this is more of a utility piece, I added as many comments as possible to the script to explain the way it works - so it's more valuable if someone finds it by searching the "Add Indicator" feature in TradingView charts

Please feel free to play around with this new toy :) and share comments and feedback below if you find this useful. I truly hope you do.
Bình luận
swaroopplss
hi @RedKTrader thanks for the script, Very nice indicator, just curious on what bases you will add buy and sell signals to the indicators. ?
akshi215
Superb work ..thanks for thanks for the script
allant
Thank you, excellent and accurate indicator.
Mupsje
nice, I like your style
jack-tamara
Thanks Bro for sharing you do with all kind of moving averages.
Opangtemsu
settings for 5min TF?
wyj152822
Good job,Redk !Your moving average system is really good! You're one of tv's few geniuses! cheers!
RedKTrader
@wyj152822, I appreciate your kind words. thank you.
mentalPepper11546
thanks
RedKTrader
Thêm nữa