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
Gaspare Ciao Ivan si puo' inserire una strategia su questo indicatore per ottimizzare le variabil...
Iván
2 weeks ago
groelandes Cuando te descargas el fichero itf, en su código no aparece toda la configuración de alertas...
Iván Si lo descargas e importas en tu PRT verás que se han creado las variables para luego config...
P. Marlowe Quite an impressive work, Iván. Extremely useful and accurate. Congratulations. Keep it up¡
lkiklkik i love it !!! thanks.
Stenozar Hi Ivan, can you translate from tradingviwe the EMA TREND METER INDICATOR? It couid be inte...
Iván Hi Yes I can. Please, create a new topic for that I will translate it.
Stenozar Hi Ivan, I've created a new topic about the indicator: https://www.prorealcode.com/topic/ema...
Doddge Hola Iván, ¿sería posible crear un screener que indique cuándo las velas coloreadas del indi...
RTR Ivan thank you for the pro-screener. I a trying to understand how to write the signals from ...
Iván Hi, Lines 62 and 63. These lines define buy and sell conditions.
Iván Hi You should delete from the indicator code all drawing functions and all variables not us...
Iván I've created a screener to show [longcondition or shortcondition]
Chrisinobi Hallo Ivan, Danke das ist Perfekt !! Kannst du bitte in der Screener-Bibliothek die itf. hoc...
MaoRai54 Thanks, now it's OK. in your first code at line 15-16 it's missing.
Madrosat Hello Ivan Did you try a strategy with this indicator
Iván Hi. No I didn't. This is a code translation requested by an user a few days ago.
Iván
2 months ago
cjr30 Simplemente modifica las lineas 19 y 21 por las siguientes: drawtext("▲",barindex,low-0.1*a...
groelandes Gracias!!
WhyAskOZ i copied the code into strategy and it gives error on line 21 and 23. it says " Line 1: ...
Iván
2 months ago
Madrosat Hello Ivan You have interesting topics on indicators , smart supertrend, optimised trend t...
Iván Hi! thanks. All of these codes are translations requested in the forum. I've on mind to back...
Raspete01 Buenos días Iván, estoy intentando llevar el código eliminando los colores y pasando un Back...
Iván
3 months ago
ARLEQUIN49 Hello Ivan, Would it be possible to convert the code of this QQE MOD indicator which accomp...
ARLEQUIN49 here is the code: //@version=4 //By Glaz, Modified // study("QQE MOD") RSI_Period = i...
Iván Hi, Yes I can translate it but please, create a new topic for it.
Fgats quelques explications en Français ici : Some explanations in French here : https://www.p...
Nicolas Merci pour cette contribution, j'apprécie ! :)
Fgats Merci Nicolas pour ces encouragements et merci aussi pour le commentaire en Anglais accompa...
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 ...
Alai-n I really like it when you develop ideas around price movement! I am much less a fan of all t...
elcortijoverde Muy buen trabajo.Intuitivo y claro.Gracias por tu dedicación y aportación.
Nicolas
9 months ago
B-Xtrender
B-Xtrender
7
Indicators
Fgats I suspected something like this but in the PRT documentation I couldn't find anything to exp...
616248 Bonjour Nicolas, Peux tu nous expliquer le principe de fonctionnement ? Ou nous mettre un...
Nicolas Le lien vers l'article IFTA de l'auteur est dans le post déjà :)
JS
9 months ago
Trendilo
Trendilo
0
Indicators

Top