NexusFi: Find Your Edge


Home Menu

 





zerolag WMA


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one jwhtrades with 8 posts (0 thanks)
    2. looks_two Botts with 5 posts (1 thanks)
    3. looks_3 Fat Tails with 3 posts (3 thanks)
    4. looks_4 Big Mike with 1 posts (0 thanks)
    1. trending_up 6,065 views
    2. thumb_up 4 thanks given
    3. group 4 followers
    1. forum 17 posts
    2. attach_file 6 attachments




 
Search this Thread

zerolag WMA

  #11 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102

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.

(2) formula suggested by John Ehlers

https://www.mesasoftware.com/papers/ZeroLag.pdf

(3) DEMA & TEMA by Patrick Mulloy, 1994

The double exponential moving average DEMA and the triple exponential moving average also reduce the lag and make an adjustment for an error term.


Which of the above are you talking about?

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
Increase in trading performance by 75%
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
MC PL editor upgrade
MultiCharts
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
27 thanks
Tao te Trade: way of the WLD
24 thanks
Diary of a simple price action trader
22 thanks
My NQ Trading Journal
14 thanks
GFIs1 1 DAX trade per day journal
9 thanks
  #12 (permalink)
 
jwhtrades's Avatar
 jwhtrades 
woodstock, ga
 
Experience: Intermediate
Platform: NinjaTrader
Broker: NinjaTrader Brokerage
Trading: Futures, TF, CL
Posts: 163 since Feb 2011
Thanks Given: 670
Thanks Received: 92

Thanks Harry,

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.

Cheers,
John



Fat Tails View Post
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.

(2) formula suggested by John Ehlers

https://www.mesasoftware.com/papers/ZeroLag.pdf

(3) DEMA & TEMA by Patrick Mulloy, 1994

The double exponential moving average DEMA and the triple exponential moving average also reduce the lag and make an adjustment for an error term.


Which of the above are you talking about?


Started this thread Reply With Quote
  #13 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102



jwhtrades View Post
Thanks Harry,

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.

Cheers,
John

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.

Reply With Quote
Thanked by:
  #14 (permalink)
 
jwhtrades's Avatar
 jwhtrades 
woodstock, ga
 
Experience: Intermediate
Platform: NinjaTrader
Broker: NinjaTrader Brokerage
Trading: Futures, TF, CL
Posts: 163 since Feb 2011
Thanks Given: 670
Thanks Received: 92

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.

Started this thread Reply With Quote
  #15 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


jwhtrades View Post
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.

You did not post any pictures.

Reply With Quote
  #16 (permalink)
 
jwhtrades's Avatar
 jwhtrades 
woodstock, ga
 
Experience: Intermediate
Platform: NinjaTrader
Broker: NinjaTrader Brokerage
Trading: Futures, TF, CL
Posts: 163 since Feb 2011
Thanks Given: 670
Thanks Received: 92

Sorry, senior moment. I posted the side by side in my private messages to TopGunNote.

Started this thread Reply With Quote
  #17 (permalink)
 
jwhtrades's Avatar
 jwhtrades 
woodstock, ga
 
Experience: Intermediate
Platform: NinjaTrader
Broker: NinjaTrader Brokerage
Trading: Futures, TF, CL
Posts: 163 since Feb 2011
Thanks Given: 670
Thanks Received: 92

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.

Started this thread Reply With Quote
  #18 (permalink)
 
Botts's Avatar
 Botts 
Penetanguishene, Ontario, Canada
 
Experience: None
Platform: NinjaTrader-8
Broker: NinjaTrader Brokerage, Continuum
Trading: ZB, MES, NQ, YM
Posts: 924 since Jun 2011
Thanks Given: 4,019
Thanks Received: 3,605

@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.
Attached Thumbnails
Click image for larger version

Name:	ZLEMA - EMA - irSSF.png
Views:	204
Size:	121.8 KB
ID:	199677   Click image for larger version

Name:	Filtered by SuperSmoother.png
Views:	170
Size:	197.4 KB
ID:	199678   Click image for larger version

Name:	Comparison.png
Views:	170
Size:	199.7 KB
ID:	199679  
Attached Files
Elite Membership required to download: irSuperSmootherFilter.zip
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:




Last Updated on December 16, 2015


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts