Zero Lag EMA (ZLEMA...
 
Notifications
Clear all

Zero Lag EMA (ZLEMA)

1 Posts
1 Users
0 Likes
914 Views
Mike
 Mike
(@vanguardai)
Posts: 70
Co-Founder Admin
Topic starter
 

To use this screener, simply copy and paste the code below in your VAI Script Editor, save it and run! You can run it in the charts module to display the signals on the chart or run it in the screener module, which will show all the signals for that day. 

You can find more tutorials here   https://www.vaianalytics.com/knowledge-base/

We found this indicator while experimenting in removing some lag in EMA values, basically it's a much faster EMA so we can expect earlier signals but also more whipsaws. I've also posted a picture comparing the 30 period EMA (blue) and 30 period ZLEMA (red).

 

//Zero Lag EMA ZLEMA
//based on https://en.wikipedia.org/wiki/Zero_lag_exponential_moving_average
//Lag period is (n-1)/2, so if you want a 30 day ZLEMA, period is computed as (30-1)/2, rounded off.

set Lag = ref(close,14)
set EMAdata = close+(close-lag)
set ZLEMA = ema(emadata,30)

plot(zlema,line,red,main)

//end

1618384911-ZLEMA.png
 
Posted : 14/04/2021 3:21 pm
Share: