Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
If you ask for a Zerolag WMA, this is probably simple to code, but we would first need to specify which moving average you consider being a standard Zerolag average.
Zerolag averages are usually calculated by trying to minimize the error term of a standard exponential moving average. One of the formulae you will find is
(1) basic formula
k = 2/(n+1), lag = (n-1)/2
ZLEMA = k * (2 * Close[0] - Close[lag]) + (1-k) * ZLEMA[1]
This indicator already ships with NinjaTrader as ZLEMA.
TopGun suggested the irSuperSmoother indicator which I believe is what you're suggesting here. The result was very close to the proprietary moving average so for now I think I'm fine with using that.
The Supersmoother is another concept put forward by John Ehlers. It is a filter which is derived from Butterworth filters by retaining the IIR part.
The Butterworth filter itself is not a filter with particularly low lag. For example Gaussian filters have a reduced lag, when compared to Butterworth filters.
Therefore I would neither call the SuperSmoother nor the Butterworth filter a zerolag moving average.
Furthermore those averages have little to do with an EMA, and you therefore cannot replace the EMA with a WMA in the formula.
The irSuperSmoother actually comes the closes to any of the moving averages that I've tried to match the signal line in the side by pictures I originally posted.
Thanks for the info on zero lag. I've downloaded the material and will read about that for future reference.
Screenshot shows my attempt to mimic the signal line from the proprietary (unknown moving average) using the WMA set to period 5 with the anaSuperSmootherIndicator filtering with setting shown in the screenshot. My attempted duplicated signal line is solid white with the proprietary signal line red/green dashed line shown underneath the solid white line. They are very close.
@jwhtrades what Fat Tails has said to you is correct in that the Ehlers Super Smoother is not a zero lag moving average, it was developed to "smooth and filter" signals as its name suggests.
When I responded to your original post I put forward the irSuperSmootherFilter [something I modified from another indicator] as an idea to help you in your search for a "close match" to a "zero lag" indicator.
Using the SuperSmoother by itself is one solution since the indicator is known to follow pice closely [note how it tracks in the middle of the price candles], similar to a Hull moving average or a Tillson. So not "zero lag" but a cleaner signal with reduced "noise".
If you look at the attached screenshots you can see a chart with 3 moving averages, a ZLEMA [Red on the chart], an EMA [White on the chart] and the irSuperSmootherFilter [LimeGreen (rising) Fuchsia (falling)].
In my experience the Ehlers Super Smoother approach does a great job in smoothing signals making them easier to work with (visually), so you might want to try using the indicator I sent you to "filter" some other "moving averages" until you find one that works for your requirements. *Note* The ZLEMA already has been "smoothed" somewhat by the nature of its code so the result won't be dramatic, but you can see the result on the second screenshot.
You can accomplish this in Ninja Trader by changing the "Input Series" settings under "Data" on an indicator
[see second screenshot], to tie your indicator to a "filter".
I hope this helps you on your quest.
Trade well,
TGN
R.I.P. John Bottomley (Botts), 1956-2022.
Please visit this thread for more information.