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
manchokcity can we have it in mql4 platform? or how or which platform do we use it?
camporan I don't use MetaTrader so I won't be able to do the translation myself. Sorry!
Alexander9 This can for amibroker ? . Thanks
riz001 thnk u
geroniman bonjour Nicolas, j ai un indicateur le Tiger . J aiemrai placer des fleches buy et sell dire...
Nicolas Merci de formuler les demandes sur le forum. ça n'est pas le bon endroit et hors sujet ici ! ;)
avatar
Anonymous Hi robertogozzi - thank you very much for sharing this strategy. I have performed various ...
robertogozzi Thank you samsampop.
Dotan Hello guys I really appreciate this coding effort but can I use this code for Mt5 Forex Trad...
LucioleLucide Clean view, thanks for sharing
dertopen hi where i can found the window for candle configuration?
paolosab69 Ciao! . I have seen the pictures that explain this metod but i don't understand when is mome...
Alberto Aguilera Hi! Thanks for your strategy Anyone can check it with 200 bars?
TempusFugit Hi, this simple system for DOW and only shorts has worked quite well, maybe because of its q...
phoentzs Unfortunately, I never pursued this strategy further. Maybe I should take a look with what ...
robertogozzi It surely CHANGES even when currently outside time range, as the lookback periods change as ...
SkippyTrader Thanks Roberto, but shouldnt the values in the outside time range not be different? As it sh...
robertogozzi Actually it is a constant (I tested them on a 1-hour TF, 9am to 5pm) and outside that time r...
coscar Ottimo lavoro. come sempre!
luxrun Nello studio di Sepiashvili viene descritto anche un altro indicatore, il Q-indicator, che è...
funkystuff Salut Balmora, Ton indicateur est plutôt intéressant :) Penses-tu qu'il soit possible de l'...
brian gilbert Hello, can you explain to me what are "pipsize" and "ATAN"? What functions do they have and ...
Bodaris Bonjour, Je suis débutant 1 mois :p pipsize ressemble à la fonction pointsize et ATAN...
darbes Hi How does it go on live ? JC
antonio73 Balmora74, io vedo che funziona anche su timeframe ad 1 minuto con piccole ottimizzazioni, t...
Juananantoniorodriguez hola buenas, a este sistema automático, Cómo se le podría poner un stoploss de beneficio sim...
Maik2404 wie kann ich den Code bekommen Paul?
jens_kittner Works with US Crude at 1h as well!
Jean-Claude REGIS Je préconise de regarder les graphiques H1 et M15 pour visualiser la tendance de fond et d'...
Leo I don't know, I just copy paste the strategy. The optimisation of the values I wrote them in...
bertrandpinoy hello Leo I'm spending time on your strategy code. do you agree to try to include this code ...
bertrandpinoy //version a: ajout filtre MM defparam cumulateorders=false // --- paramètres taille =...
capgros Bonjour @Nicolas, Thanks a lot for this tool, it is very useful for me. I would like to s...
Hans63 Would you add the possibility to color also the Heikin Ashi and bar chart?
Nicolas That's possible, please open a new topic in the indicator forum explaining what you need exa...
Nicolas Change line 62 with: drawcandle(flup,fldn,flup,fldn) coloured(169,169,169,80) bordercolor(16...
DimKar Thank you very much from Greece sir , have a nice day ....!!!! Really i do not have words...
mit_ose Bonjour, J'ai d'excellents résultats avec cet indicateur simple et efficace; Merci beaucoup;
ottimo Thank you Nicolas, great indicator, N. 1
tikigai Merci Nicolas! First Happy new Year 2020. Very good indicator BUT (yes the french "oui, m...
Nicolas Whats prorealtime version? Did you try in version prior to v11? indicator's call and loop ca...
Nicolas Yes, that's how it goes when using loops..
JosephFelix Hi, Could I please have help with adding these indicators 'on price'? Every indicator that I...
Nicolas Just add it on price by clicking the wrench on the left upper side of the price chart.
Nicolas
6 years ago
BSTrend
v10.3
BSTrend
10
Indicators
Florian Legeard C’est à dire sur le prix et non sur le temps ? Merci
Rohit82189 bstrend repaints
Nicolas No, it doesn't repaint.
cfta Hi Fulvio, many thanks for sharing this clever indicator, much appreciated. As Pepsmile ment...
cfta Sorry adding the PRT to code didn't work in the above comment so I guess we will have to set...
juanj Something appears to be wrong with this formula as graphing t shows t to almost never be wit...
Nicolas Apply it on the price chart. The indicator plot just one single line. There are two in the...
jamesoc Hi Nicolas, do you happen to know if there is an indicator that can be applied to charts, to...
gustavobp Buenos dias Nicolas, al agregar tu indicador no me reconoce la variable Price ni en la linea...
Nicolas
7 years ago
Maxime Baudin Interesting, Thank you! :)
franck-david Bonjour Nicolas , actuellement je me forme grace a vos videos tres tres bien expliques mer...
Nicolas Merci. ça n'est pas le lieu pour poser ce genre de question :) Merci d'utiliser le forum Pro...

Top