nonlinear Ehlers filter

  • Thread starter Thread starter m@box
  • Start date Start date
  • Watchers Watchers 3
Nonlinear Ehlers Filter indicator is based on the article "Ehlers Filters" by John Ehlers in the April 2001 issue of "Technical Analysis of Stocks and Commodities". The article was adapted from John Ehlers book, "Rocket Science for Traders". The indicator calculates a non-linear finite impulse response filter using the change in price over five samples as a coefficient to produce a weighted moving average.



The general form of the Ehlers Filter calculates the sum of the prices multiplied by the coefficients, divided by the sum of the coefficients over the given sample length. This version uses the change in price over five samples as the value of the coefficient.



Nonlinear Ehlers Filter indicator can be used similarly to a simple moving average. However, it responds to significant price changes with less lag since it uses the momentum to weigh the values in the average.



Formula:
img1.jpg


where

momentum5 = 5 bar momentum

momentum5 [j] = the momentum5 j periods ago

price [j] = the price j periods ago

n = calculation time period
Nonlinear_Ehlers_Filter.gif
 
THANK YOU CHAMP

WOW....!!!!!

you've got the code. very excellent!!!!!

I usually use NEF for finding Price Action and Market Action on E/U pair. These has better performance than EMA.

Next step would be creating MACD like indicator but based on 12,26,9 'NEF'.

BTW could you code for MT4, since my account is limited to MT4 platform.

Heaps of thanks brother.
 
Sorry but I still don't get it - what's this Ehlers MA advantage over an EMA or LWMA? I've added all the MAs I have to the chart and didn't notice the Ehlers to be much different from others.

what is LWMA, I wouldn't mind to try it. I use to use 10 minute time frame to determine direction, and NEF is faster than EMA.
 
I would prefer NEF crossing than any xMA crossing, and usually NEF is crossing earlier.

BTW how do I change MQ5 to MQ4. thanks
 
But early crossing means more false signals, no?

MQ5 is quite different from MQ4. Have to re-code.

I usually place my position according to stochastic RSI. NEF crossing is a little late compared to sRSI. but I like it better than using EMA.

BTW. I tried "time series forecast" and "linear regression indicator" today, but I have no confidence in them.