Hodrick-Prescott filter (HP)

v11
Hodrick-Prescott filter (HP)

The Hodrick–Prescott filter (also known as Hodrick–Prescott decomposition) is a mathematical tool used in macroeconomics, especially in real business cycle theory, to remove the cyclical component of a time series from raw data. It is used to obtain a smoothed-curve representation of a time series, one that is more sensitive to long-term than to short-term fluctuations. (source Wikipedia: https://en.wikipedia.org/wiki/Hodrick%E2%80%93Prescott_filter)

Be aware that this indicator is continuously rechecking the complete history to redraw the curve to be perfectly in line with the data serie. So it is repainting the past and should not be used “as is” for live trading.

Compatible only with PRT v11 and onwards.

 

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. juanj • 09/28/2020 #

    Could be useful in identifying Elliott Waves

  2. willi • 09/28/2020 #

    Guten Morgen,

    ich habe den Indikator importiert, bekomme aber leider nichts angezeigt. Liegt es vielleicht daran, das ich nur die Demoversion 11.1 benutze?

    Danke Willi

    • Nicolas • 09/28/2020 #

      Nein, es sollte genauso funktionieren mit Demo oder Real Account. Haben Sie es auf die Preisliste angewendet?

  3. willi • 09/28/2020 #

    Ich habe meinen Fehler gefunden: Das lambda war für meine eingestellte Zeiteinheit zu groß gewählt, mit einem kleineren Wert bekomme ich eine Anzeige.

    Danke Willi

  4. Fabian • 09/28/2020 #

    Hi Nicolas,

    do you plan to release this indicator in version 10.3 as well or is this not practicable due to the usage of arrays?

    • Nicolas • 09/28/2020 #

      No because it needs arrays! 🙂

  5. RicLg • 09/28/2020 #

    Hi Nicolas,
    Can we get the Value of this drawsegment?
    i do not understand how this code works
    Thank you .

    • Nicolas • 09/28/2020 #

      The last value is $output[i], so return $output[i]
      Be aware that the indicator is repainting continuously.

  6. RicLg • 09/28/2020 #

    Merci Nicolas pour le retour.
    En effet on récupère “the Last value” du dernier Point de traçage, après la création d’une variable, AllValuPoint=$output[i] entre les ligne 63 et 64
    Est il possible de récupérer Toutes les valeurs du traçage de ce drawsegment?
    Merci Nicolas

    • Nicolas • 09/28/2020 #

      c’est exactement ce que je fais entre les lignes 58 et 64 pour pouvoir tracer la ligne complète

  7. Italo Fabian • 09/28/2020 #

    Nicolas,

    Ces matrices sont-elles des vecteurs unidimensionnels ou multidimensionnels?

    Depuis maintenant,
    Reconnaissant!

  8. Denis • 09/28/2020 #

    Bonjour Nicolas et RicLg,
    Merci Nicolas pour cet indicateur intéressant et merci RicLg pour la suggestion.
    Toutefois, même en insérant une instruction suggérée par RicLg, je n’arrive pas à faire renvoyer toutes les valeurs qui dessinent le segment, ce qui empêche qu’une alerte se déclenche.
    Auriez-vous une idée de ce qui bloque le renvoi de ces valeurs ?
    Merci par avance de votre aide

avatar
Register or

Likes

avatar avatar avatar avatar
Related users ' posts
jacquesgermain Bonjour non pas de soucis car src=customclose donc dans le menu configuration/propriété me...
geroniman Merci Jacques , indic tres utile. J'ai un indic à programmer avec du price action. es tu dis...
jacquesgermain ok pour regarder ...
finplus Bonjour, une petite demande concernant cet indicateur : comment faire pour que lorsque la bo...
LucasBest Bonjour, la coloration des bandes se fait ligne 111 et 112 à l'aide des instructions colorbe...
Nicolas
1 year ago
f1_maik Ein sehr schöner Indikator, vielen Dank. Wenn ich den Indikator importiere und starte hat d...
Nicolas das ist in der Tat normal, Sie müssen die Auf- und Abwärtsfarbe direkt im Parameterfenster d...
FXtonio Bonjour Nicolas, merci pour cette merveille, je l'utilise en compl2ment du "magical buy sell...
GustavoLoboOrenstein Is it possible to add histogram with only increasing bars?
Nicolas Je ne rencontre pas ce problème avec le NASDAQ par exemple, ce serait plus simple d'ouvrir u...
YvesRobert Bonjour Nicolas, en effet ca marche, je me suis trompé, j'ai bien tout le tracé. C'est parce...
oliTR Bonjour, les conditions longCond et shortCond ne contiennent-elles pas une condition qui s'a...
supertiti Bel outil si on ne se tape pas sur les doigts avec ! Comment ajoute-on une image avec le co...
magnus59 Hi Nicolas, thaks for your great work here, I need a scanner for the swedish OMX when ma...
Nicolas Yes, sure please open a new topic in the ProScreener forum section, thank you.
paullyons Hello! Thanks for post your indicators. I'd like you to let me know how to draw lines for ...
snucke i dont think you understod the question. i did not ask about the band pass indicator. i as...
thomas2004ch Hi, Is this startegy suitable for daily SPY? Regards
ebous64 Je cherche à traiter des effets de bords avec un encadrement ajustable des variables. Vous a...
Rafa Hi Nicolas! I can´t install this indicator. it installs in a separate window not as an av...
Nicolas Add it on the price, see how: https://www.prorealcode.com/blog/video-tutorials/how-to-add-an...
Frankyslo1 No consigo instalarlo en el precio en PRL-version 10
Madrosat repainting as cog or not repainting?
Nicolas It doesn't repaint.
Jiacky
2 years ago
Kalman Filter
Kalman Filter
0
Indicators
Sever
2 years ago
zilliq Thanks @Nicolas. I tried to use it as Trend in a proorder system, but don't know why, it doe...
Suzu Yuk He is right. MT and mavgMT are not defined and causing errors.....
Roland57800 Bonjour Noobywan, si je comprends bien l'utilisation de ce code que je trouve particulièr...
Noobywan Bonjour, quand la question a été posée dans le forum à celui qui avait fait la requête en am...
Fabian This Code draws only a retangle if the condition has been confirmed and NOT before (in that ...
RakeshPoluri I have a question about the bands on the candles. Is it bollinger bands or something else?
Nicolas I think that's 2 Bollinger Bands
Emperor.it "style(line,2)" C'è una guida ai parametri che si possono modificare ? Tipo stile della lin...
IV Mcm https://www.prorealcode.com/programming-with-prorealtime/
fazel53 How do i attach this indicator to my mt5 platform?
Nicolas You can't! All indicators here are for ProRealTime trading platform: https://www.prorealtime...

Top