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
stratobast Good afternoon everyone. Thanks Doctrading for your work. I have an issue while using this ...
stratobast My bad guys. I understood what was the problem. The indicator uses highs and lows for the Re...
samwarduk Has anyone tried this on Bitcoin GBP1? The results look amazing but every time mine trie...
Kris75 Hi Bolsatrilera, I love this indicator! Thanks; => did you develop a strategy around...
Doctrading AH ok, I think the ca3 is the same : ca3 = pB[1] < 0.2 and pB < 0.2 Best regards,
chromosome21 Hello everybody, First, thank you so much for all your advices, I'm a begginer in trading a...
bertrandpinoy bonjour j ai un probleme avec ce code modifié, apparement PRT ne veut pas...avez vous une so...
rispardin no entiendo como funciana este indicador, por favor alguien podria explicar como utilizarlo???
AVT No se trata de un solo indicador, pero cada linea muestra otra información, de abajo hacia ...
IV Mcm Your indicator is interesting, I evaluated its relevance with the squeeze to detect the phas...
Kris75 Hi Gabri I launched a very simple strategy based on the 3 bars trailing stop that you cre...
TimDeCat Hi. Has anyone coded a version that you could alter it to say 5 bar trailing stop? ie make ...
Nicolas Please open a new topic in forums so we can code it there, thanks.
finplus bonjour, il y a un problème à la fin du code avec elsif (close 0 then ... ne manque t il pas...
kj1988 Hello Nicolas, thank you for this useful indicator. Could you tell me how I can remove the...
Nicolas remove lines 101 to 103
GraHal Yes sorry, I set up a link to a screen shot on my google drive and then I got locked into th...
gabri Here's the thread https://www.prorealcode.com/topic/multiframe-rsi-of-rsi/
Bernard13 Bonjour Nicolas, Pourriez-vous m'indiquer si cet indicateur fonctionne avec la V11 ? Le di...
KarlBenjamin This "indicator" alone has completely changed my algorithms for the better! Id even go as fa...
ashee CAN YOU SHARE MT4 FILE
coyP Big thanks ! Can you explain me how can I put this ON my graph and not under the graph please ?
Wing There's a few threads on the forum about backtest and live trades being different at times. ...
ET I agree with verdi55. As it is now, the code will only test for a breakout on the upside (li...
Philipjonasson are u still active Wing?
HeikinAshi Do you have an update of this indicator since you've created them, or is this still the actu...
mcha Thank you for this work. Do you try to transform/put this indicator on candlesticks and is ...
Nicolas We do not offer free assistance for TOS. However, you can send demand for private paid codin...
phanz Hi community. May I know how you use this indicator please? Is it on the zero cross over? ...
sydney43025 Hello, I'm digging up this topic because I uploaded the code on a PRT v11.1 but the indicato...
David Balance thanks for sharing this excellent indicator.  Here are some thoughts.  please ad...
reb Hello Marc your strat seems very intersting, will take a look Reb
897148 What exactly is meant by Total price? Is r1 =28 in your example the no of days for "Total P...
otty82  THX looks good!
century nice one , thank you
arvindrao01 Hey! Does anyone have a pinescript (tradingview) code for this?
supertiti Il manque 2 slash devant len dans le code dur car la variable ne marche pas bonne journée
imokdesign Hi Everybody, when I look at the strategy I felt the need to implement a Moneymanagement-Sy...
Inertia newlevel then multiplier=multiplier+1 oldlevel=newlevel newlevel=strategyprofit+startequi...
Inertia Hi Bjoern, I was playing around with your code this morning (EUR/USD 5'). Thank you to the...
CavalierDeCesDames Bonjour Nicolas, Thanks for your use full job. I tried this indicator on a shorter timefram...
Nicolas You are welcome. I'm glad you like it.
Bolbo It does not appear over the price indicator on V11. Thanks in advance.
bearbull As per PhilipSchultz question above, has anybody managed to add code for when it turns blue,...
Ybr35 Bonjour Nicolas, lorsque je lance l'indicateur, il m'est indiqué que je dois définir les var...
Nicolas L'idéal est de télécharger le fichier itf joint sur cette page et de l'importer dans la plat...
Nicolas Merci dans ce cas d'ouvrir un sujet dans le forum ProScreener svp.
Andrea Hi Nicolas, thx for your code. Please i need your help to understand this part of your code:...
Nicolas the MA200 is ascending since 20 periods.
Leo Hi Gabri, have you ever try this in a trading system?
gabri Leo, I used to crosscheck this indicator a long time ago. For the trading I was doing at tha...
Nolubok Bonjour Gabri, merci pour l'ensemble de vos publications, serait il possible d'avoir le scr...

Top