# EMAHP

Exponential moving average low pass.

Good to get the detail of a signal or use as washout.

So while in low pass we smooth the values, in high pass we get the spikes.

To do it, we first smooth the values and then we take the difference between the not smoothed value and the smoothed one.

In the figures, you can compare a low pass and and a high pass, both using 100 samples.

The result of this filter is the spikes on the signal we are receiving.

Looking carefully, you can see the values vary around zero, because we are getting just the spikes.

So the high pass washes always to zero.

**EMAHP in the frequency domain**

Looking at the EMAHP in the frequency domain we can see that:

More samples in the filter = Lower cutoff frequency

1 sample = Infinite cutoff frequency

More samples in EMAHP = Becomes smoother preserving spikes

This is a good filter to washout the constant values and keep the noise.

In the images we have an EMAHP(VALUE;2000) making the washout. It keeps the small details of the noise.

But we can filter it again with a low pass to smooth it. That's what we see in the right image example.

Bigger the number of samples in the high pass filter, longer it takes to go to zero.

**To use EMAHP t in Mover do:**

EMAHP(parameter1;parameter2)

parameter1 is the value we want to filter.

parameter2 is the amount of samples/values used in the EMA.

Please take into account that the number of samples is for the low pass since high pass is original minus low pass.