Hodrick-Prescott filter - page 3

 

to Neutron

but this is a polynomial regression, and without differential outliers
- for these pluses is entitled to a small amount of overshoot within limits smaller than stdDev

 
Explain to me, too, what is the point of fiddling with the muwings in the first place.
 
HideYourRichess писал(а) >>
Explain to me, too, what is the point of fiddling with the muwings in the first place.

+5

There's no point.

 
Happy New Year everyone! Thanks for joining the thread! Korey fanks for the code! Just what I need. As expected the indicator re-draws but not too much. Guys, please write the code for our "cyclic component" (price deviation from our muving), if possible in a separate window (like there is one line to change in the code). I would be very grateful to you, maybe I am not the only one. When MQL5 will be released is it worth studying MQL4?
 

This one?

Close -HP

Files:
 
Korey >> :

This one?

Close -HP

Yes thank you very much, I'll have to see how it redraws in real life. It's a pity it's not working at the moment. In principle, judging by what parameters the authors recommend for lambda we can assume that is given by equality lambda=(x^2*100), where x-frequency of occurrence of data in a year. In general, let's see how it will be.

 

Guys on the history this is what the picture looks like. Redrawing is a problem, but only the "ends" are redrawn The figure from Matlab shows that our "errors" do tend to update extrema with a certain period, sometimes it may not coincide, but nevertheless. And also in cluster formation periods we take into account that the oscillator amplitude expands by a distance equal to the past difference between the muve and the data. Error density is close to normal distribution and as usual for finnish series there is some asymmetry and kurtosis. Even in spite of the overshooting, knowing the past readings of the oscillator, we can assume where the extremum will be. In addition, on the second chart I used the Normalizer that normalizes our oscillator readings and scales them from -1 to 1. The rule of the signal is simple approaching -1 and 1 waiting for the reversal = not a panacea, but everything can provide useful information.



 
In the Strategy Tester, run any EA with "visualisation" ticked (preferably not very heavy)),
put an indicator on the chart, work on the weekend.
 

Found C version of HP filter by original author Kurt Annen.

Cleaned up the HP.mq4 code a bit according to the original. See application. There were a lot of unnecessary arrays. Thanks to Korey for the first version of HP.mq4.

 
Files:
hp_1.mq4  3 kb
 

to gpwr

we don't mind, my comment, have a look at the posts

Reason: