THANK YOU AGAIN
can this indi be modified in order to have it refreshed automatically and not me doing it manually?
attached 2 pics: before and after refresh. many thanks.
I did not post that indicator from your charts
I posted the one on the main chart (this one : https://www.mql5.com/en/forum/173574/page248 ) and from what I see it is recalculating 1000 bars minimum, so it should not have that problem. Tried it right now (the one from the link above) and even in visual back test it works correctly
PS: check the for loop in the version you are using, If it differs than the version I posted, make it the same (Hodrick-Prescott filter really does need those calculations, you can not avoid it or speed it up by calculating less)
Convert to MTF
Hi, could you transform this indicator into MTF indicator ?
the indicator is the one you kindly modified to mtf and posted ("Hodrick Prescott Filter mtf.mq4"). the only change i made was from "indicator_chart_window" to "indicator_separate_window".
on the 2 pics that i attached in my previous post, hp_mtf is red and momentum(1) is white.
i tried also today and i noticed again that hp_mtf is not refreshing itself. unfortunately my mt4 crashed before i was able to save the pics... i'll try again tomorrow.
i'm a little bit ...
in the mtf version (the indicator that is calling the filter itself) the is a line that goes like this :
It makes sure that the minimum bars recalculated is 1000 or (depending on the time frame, but in case when the time frame is the current time frame, if the total number of bars is less then 1000) total number of bars. The filter itself I did not check. The best version I saw is the Kurt Annen original C/C++ code and that is the version I am using (I am not sure about the HP that was posted as the basis when multi time frame version was asked for).
Hodrick-Prescott filter, as is, is a tricky one since, as I said already, in very much points it reminds to SSA and even I was surprised by the number of bars that are recalculated - hence that minimum 1000 bars in the mtf version). And, as I said, I tested the version I posted. I do not have your version of indicator, but according to the tests I conducted to the version I tested (the on chart one - from the link in my previous post regarding this subject), it works OK
Maybe the best would be that you post the version you are using so we can test and eventually find what is the problem you are having.
As of having momentum attached to a recalculating indicator, I think that you will always have problems with that (the normal usage of momentum assumes that the data is not going to be changed backwards, while with HP filter that is not the case at all - hence you are having that problem with the non-updating value of the momentum. You would need a momentum indicator that recalculates as much as the HP filter and only then momentum values would "follow" HP values)
Hope this helps.
your reply has been very helpful.
i re-read your previous posts and all i can say is that you are right...
i watched the hp filter indi today again and must say that you are right...
regarding your comments about momentum, now i understand why it's not working as i was expecting.
but then let me ask you this:
would it be possible to modify the hp mtf filter indi adding in the code the calculation of its speed and showing both? that would be very helpful! many thanks...
They are having very different values (for example, on EURUSD HP filter right now is about 1.3 and momentum (the way metatrader calculates it) is always around 100). Having so different values in the same sub-window is possible without having very flat values displayed (check the values of the applied momentum to the HP filter in separate window in data window and you will see what am I talking about)
Instead here is a Hodrick-Prescott filter momentum (in the separate window, I am not calculating it the "metatrader way" but the regular way (I prefer to see values above and bellow 0 and and not above and bellow 100)) It will recalculate the necessary number of bars so you should have no problem that you had
PS: it needs that "hp.mq4" in order to work (from this post : https://www.mql5.com/en/forum/173574/page248 ). Also, it is already a mtf too
I trade with horizontal lines which are old support or old resistance levels. For me,
breakout a support is sell signal and fakeout a support is buy signal, breakout a resistance is buy signal and fakeout a resistance is sell signal. As you now, sup./res. breakout trading is equal to gann swing trading, sup./res. fakeout trading is equal to Vic. Sperandeo 2B trading.
I use to determine old support or old resistance level three indicators, which are zigzag, barry (support resistance) and level trading123.
I hate zigzag because of last leg problem.
I dont use barry because of ,
1. It is formed according to only 2 fractals
2. Fractal high or fractal low lines lenghts (dot numbers) are limited and varied.
3. Despite fractal low (high) is not composed, sequential fractal highs (lows) are showed.
I love it and I use it. But I need mtf version.
impossible is nothing
I wonder if those "level" lines can be changed with "custom" angle degrees?...