Fifty shades of Half Trend indicator

v10.3
Fifty shades of Half Trend indicator

Someone ask me recently about the HalfTrend indicator translation from the mq4 codes. I remembered having already translated it and made different kind of variations of this neat indicator. You can find them all attached to this post. You’ll find below screenshots examples of these different versions of this trend indicator:

The HalfTrend indicator is made upon trend direction of simple moving average that breach recent highest high or lowest low.

 

1/ HalfTrend “classic”:

2/ HalfTrend “custom moving average” with Heikin Ashi candlesticks set to true or false (normal candlesticks). You can select different kind of moving average to render the indicator differently.

3/ HalfTrend JMA. Same indicator but with Jurik moving average calculation instead of simple moving average.

4/ HalfTrend triple. Same indicator but made with 3 different HalfTrend periods in the same indi.

5/ HalfTrend adaptive length. Same indicator but with an adaptive amplitude calculation made with counting of recent high/low fractals. Many fractals count in the lookback period mean price is ranging.

6/ HalfTrend Quantile Bands. The quantile bands are calculated within the last upper and lower quantiles of X periods. Parameters could be changed at will.

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. AngelPujalt • 03/10/2017 #

    Estimat senyor Nicolau, li vull donar les gràcies per dirigir també aquest fòrum de proalcode desinteressadament; i l’encoratge perquè continue amb aquest projecte tan interessant per a la comunitat bursàtil. Enhorabona. I endavant.

  2. diegofe_2000 • 03/10/2017 #

    mil gracias NICOLAS que maravilla de indicador,  me cae “como anillo al dedo”
     
    nuevamente , mil gracias

  3. ludo6977 • 03/10/2017 #

     metter une HT et un jhon scalper et la c’est le must sur 1mn 
     

  4. Stenozar • 03/10/2017 #

    Hi Nicolas, does it work with DAX? which indicator you prefer to trade Dax?
    thanks a lot for your contribution

  5. Riccardo Benedetti • 03/10/2017 #

    Thanks a lot nicolas for this indicator. good job. I love the great work done simple. Thanks again

  6. Riccardo Benedetti • 03/10/2017 #

    ciao nicolas mi piacerebbe provare a fare un backest di una strategia con questo indicatore ma ho scoperto solo da ieri che è possibile farlo.
    non riesco a programmarlo. ti ringrazio e ancora complimenti
     

  7. TheAccountant • 03/10/2017 #

    Bonjour et merci pour cet indicateur.
    j’essai de parametrer une alerte sur le changement de couleur du HalfTrend… sans resultat jusqu’ici. J’ai tenté en affichant l’indicateur sous le graph sous forme d’histogramme et d’utiliser l’outil prt pour les alertes mais je ne parvient pas a avoir une alerte sur le changement de couleur ( quand le halftrend passe positif ou negatif)
    Quelqu’un aurai une idée ?
    Bonne journée !

  8. leyoy • 03/10/2017 #

    Salut Nicolas,
    est-ce compliqué de faire varier le fond de PRT en fonction de la couleur de HalfTrend classic?Je pense que ca pourrait etre une variante interessante 😉

    • Nicolas • 03/10/2017 #

      Il faut utiliser backgroundcolor, bon courage. 

  9. leyoy • 03/10/2017 #

    Quelqu’un sait s’il est possible de faire apparaitre une flèche paramétrable au changement de couleur comme sur MT4 ? :/

    • Nicolas • 03/10/2017 #

      Oui je sais que c’est possible :/

  10. gio24 • 03/10/2017 #

    How to visualize .itf file code of the attached files? Thank you

    • Nicolas • 03/10/2017 #

      Download files and import them in the platform

  11. rigel • 03/10/2017 #

    Hi Nicolas, it would be possible to post the code prc_halftrend.itf, I would like to convert into another language. Thanks a lot

  12. marinober • 03/10/2017 #

    Ciao Nicolas . Nella versione customA non funzionano le ultime due medie, da proprio errore .

  13. rigel • 03/10/2017 #

    Hi Nicolas, is there a way to import the .itf files in a text editor? otherwise would it be too much trouble if you post the code of prc_halftrend.itf or prc_halftrend-jma.itf ?? I do really appreciate it

    • Nicolas • 03/10/2017 #

      There is no other way than import it into your platform. Please download the files, import them and get the code from there.

  14. rigel • 03/10/2017 #

    Thanks Nicolas, don’t have that platform hence the question.

    • Nicolas • 03/10/2017 #

      For specific coding query, you can ask me via the programming services: https://www.prorealcode.com/trading-programming-services/

  15. leyoy • 03/10/2017 #

    Bonjour, est-il possible de descendre la valeur en dessous de 1 svp ?

    • Nicolas • 03/10/2017 #

      Si on parle de la valeur “Amplitude”, bien sûr que non. Elle correspond à une période de calcul des indicateurs.

  16. Denis • 03/10/2017 #

    Bonsoir Nicolas,
    j’utilise une de vos halftrend et aussi le “MACD” de halftrend de Lukassen, merci à tous les deux.
    Pour le MACD de Halftrend, la fenêtre Propriétés permet de configurer une couleur selon que l’indicateur est positif ou négatif.
    Or je souhaiterais configurer une couleur selon que l’indicateur est en hausse ou en baisse.
    C’est le cas pour d’autres indicateurs (Cf. exemples en PJ) mais je ne trouve pas où cela peut être choisi car cela n’apparaît pas dans le code.
    Sauriez-vous comment il faut faire ?
    D’avance un grand merci pour votre aide et excellente soirée à vous.
    Denis

  17. Denis • 03/10/2017 #

    Je n’ai pas pu mettre ma PJ d’exemples

  18. Denis • 03/10/2017 #

    Oubliez ma question Nicolas, c’est la représentation en histogramme à laquelle est associée positif/négatif et pas hausse/baisse.
    Merci de votre aide précieuse au quotidien

  19. chris9765 • 03/10/2017 #

    Good afternoon, i would like to know how to calculate the indicator to get the signal … or combine it with stochastic

    • Nicolas • 03/10/2017 #

      What signal please? The color changing?

  20. Ice_man • 03/10/2017 #

    Hello thanks for the indicators. Could you explain how the classic Halftrend works? And what determines the trend change?

  21. Krallenmann • 03/10/2017 #

    Hallo Nicolas, kannst du mir die Regeln für den Halftrend Indikator sagen? Aus dem Code kann ich die Regeln nicht erkennen. Ich möchte verstehen, wie er funktioniert. Danke und viele Grüße

  22. davefransman • 03/10/2017 #

    Dear Nicolas, i want set a alert on the “HalfTrend “custom moving average” met Heikin Ashi when color changes. In the normal alert modus/settings, i cant set this. Can you assist?

    Thank you!

    • Nicolas • 03/10/2017 #

      Please post the question in a new forum topic, that would need custom coding I believe.

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar

+5 more likes

Related users ' posts
Xenotrax A première vue, sa à l'air d'être un indicateur très puissant sur de petites temporalités, j...
merri Bonjour Nicolas, Comment transformer cet indicateur en bot sur PRT ?
Nicolas Cela a déjà été fait, voir ce sujet: https://www.prorealcode.com/topic/strategia-con-lindica...
Nicolas change the last line with: return v coloured(r,g,b) style(line,2), v+band coloured(168,168,1...
Paolo.B Thanks ... works as i wanted.
Kanamax Bonjour Nicolas, comme Paolo.B je souhaiterais utiliser cette indicateur au sein d'un code. ...
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/
Daniele Maddaluno Écrivez-moi où vous préférez you can easily find me on LinkedIn
AK27 C'est payant visiblement sur linkdin je peux pas vous envoyer, discord vous avez ?
Nicolas C'est dans ce sujet: https://www.prorealcode.com/topic/trendline-une-approche-du-trading/ M...
Pensera Bonjour Nicolas, comment est-il possible de backtester cet indicateur? cela fait une erreu...
Nicolas Oui bien sûr, il doit y avoir pas mal de sujets dans le forum à ce propos.
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...
Nicolas c'est exactement ce que je fais entre les lignes 58 et 64 pour pouvoir tracer la ligne complète
Italo Fabian Nicolas, Ces matrices sont-elles des vecteurs unidimensionnels ou multidimensionnels? Depu...
Denis Bonjour Nicolas et RicLg, Merci Nicolas pour cet indicateur intéressant et merci RicLg pour...
Nicolas Il doit s'agir d'un mauvais copier/coller. Je suggère de télécharger le fichier itf contenu ...
Bard Hello @Nicolas, I can get this to display in a separate indicator panel but not on Price as ...
Stenozar Hi @Nicolas, how can I put the bands on price? Thanks, Stefano
Nicolas Il faut l'ajouter sur le prix avec l'icône de la clé situé en haut à gauche du graphique du ...
jerome777 merci de ta réponse
jerome777 bonjour c est bon il fonctionne parfaitement merci beaucoup
Guillaume Mcm I gave the above message fix ;)
Tradingrob Is it possible to put the itf-file in the right way here in Prorealcode? so the right 'trend...
Guillaume Mcm Update link ;) https://www.prorealcode.com/topic/trend-histogramme-cci-mise-a-jour-suite-...
Screw27 Hi man, I installed the indicator and i don't know why but my graph it is so big
HelixKing sounds interesting I'll take a look
Godo Bonjour Souhait Sam, Après de nombreux essais pour le mettre en format afin d'utiliser ce c...
Nicolas Il faut supprimer celles qui existent dans la fenêtre d'optimisation et les créer en dur dan...
crusoe76 hi there, anyone can help making this strategy work, i have a message saying replace variabl...
Screw27 Salut nicolas j'aimerais savoir tes résulats grace a cettte methode
eva.g.forsgren It dose not work, I get a strap instead of candels???????????????????????????????????????????
Nicolas That indicator is the one below the chart. The indicator to put on the price chart is this o...

Top