Pivot point Supertrend

v10.3
Pivot point Supertrend

The Pivot point Supertrend uses the high/low pivot points (same as fractals) to calculate the Supertrend levels and therefore create a trend following / trailing stoploss indicator. This code was converted from pinescript version following a request in the indicator forum section (author: Lonesome TheBlue, all credits to him).

There are many types of SuperTrend around. Recently I thought about a Supertrend based on Pivot Points then I wrote “Pivot Point SuperTrend” script. It looks it has better performance on keeping you in the trend more.

The idea is behind this script is finding pivot point , calculating average of them and like in supertrend creating higher/lower bands by ATR. As you can see in the algorithm the script gives weigth to past pivot points , this is done for smoothing it a bit.

As an option the script can show main center line and I realized that when you are in a position, this line can be used as early exit points. (maybe half of the position size).

While using Pivot Points , I added support resistance lines by using Pivot Point , as an option the script can show S/R lines.

And also it can show Pivot Points.

(author description).

 

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. Vivien René • 06/30/2020 #

    Bonjour nicolas, y a t il un moyen de te contacter pour discuter avec toi ? Je te remercie

    • Nicolas • 06/30/2020 #

      Le forum est fait pour ça, posez y vos questions. Pour l’assistance privé merci d’utiliser le formulaire de cette page: https://www.prorealcode.com/trading-programming-services/

  2. Lednora • 06/30/2020 #

    Bonjour Nicolas,
    y a t’ il une manipulation à faire pour afficher la courbe early exit? J’ai passé toute l’après-midi dessus je n’ai pas trouvé c’est dire mon niveau =). Tout se joue dans la ligne 96 c’est correct?
    Cordialement
    Anthony

    • Nicolas • 06/30/2020 #

      Ces courbes sont déjà affichées sur le graphique, voire l’instruction RETURN en fin de code.

  3. Lednora • 06/30/2020 #

    Oui c’est pour cela que je ne comprends pas trop pourquoi elles ne s’affichent pas j’ai bien la courbe supertrend et le support/resistance mais pas le early exit bizarre….merci en tout cas je vais continuer de chercher =). Bonne journée

    • Nicolas • 06/30/2020 #

      Le paramètre showcl doit être en true (égal à 1 )

  4. Lednora • 06/30/2020 #

    Ah oui en effet c’est magique!j’étais resté bloqué sur la ligne 96^^. Merci beaucoup nicolas pour votre aide

  5. avatar
    Anonymous • 06/30/2020 #

    Merci Nicolas, c’est superb!

  6. maxlys • 06/30/2020 #

    Merci Nicolas pur ce travail. Comment écrire un screener qui nous ressortent d’une part les valeurs qui croise à la hausse la ligne du supertrend “principal” de ce code ? et la version à la baisse ? Merci

    • Nicolas • 06/30/2020 #

      Avec l’assistant de création pour les screeners c’est possible, le code est compatible.

  7. maxlys • 06/30/2020 #

    Merci Nicolas, avec l’assistant cela donne le code ci dessous. Est-ce correct ? De plus est-il possible de placer une alerte quand une valeur sort dans le screener pour éviter de passer son temps a attendre devant ? Car lors de mes essais je n’ai rien qui est ressorti.

    Voici le code :
    indicator1, ignored, ignored = CALL “PRC_Pivot Point Supertrend”[2, 3, 10, 0, 1, 0](close)
    c1 = (close CROSSES OVER indicator1)

    SCREENER[c1] ((close/DClose(1)-1)*100 AS “% Veille”)

    Désolé j’ai essayé avec ADD PRT CODE mais cela n’a pas fonctionné.

    • Nicolas • 06/30/2020 #

      Oui le code est correct et il fonctionne, j’ai de bons résultats sur la liste NASDAQ par exemple.

  8. pincherman • 324 days ago #

    Bonjour 🙂
    J’ai coller le script dans prorealtime pour jouer avec le supertrend et j’ai une erreur de syntaxe ligne 20 et 23.
    L’erreur indique :
    Une des expressions suivantes serait plus appropriée que “DRAWTEXT”:ENDIF

    Merci pour votre aide 🙂

    • Nicolas • 322 days ago #

      Vous l’avez sans doute collé au mauvais endroit, dans l’éditeur de code pour les stratégies, alors qu’il s’agit d’un indicateur. L’idéal étant de télécharger le fichier itf et de l’importer via le bouton approprié, le code se placera alors automatiquement dans la liste des indicateurs.

avatar
Register or

Likes

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

+7 more likes

Related users ' posts
Boris Hi IVMcm, thanks for your amazing work. I have tested all of your indicators and use some of...
IV Mcm With pleasure and thanks!
ashiash how to use this indicator can i use tradingview platform
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.....
Maxime Baudin Super travail !
Yanic c'est top j'adore
Maxime Baudin Merci l'ami, passe une bonne semaine
IV Mcm Merci de même ;)
Guibourse Hi, I'd like to increase the thickness of support and resistance lines. I do not think that ...
JJ Tec Hello. Thanks for the great contribution of the indicator. At the moment, I have modified i...
Khaled Hi Vonasi, I tried to embed your PP Fractals code in a Strategy and it seems to be a good fi...
IV Mcm I don't speak English and the translation is not clear. Do you have a different turn of ...
IV Mcm stonk ?
avatar
Anonymous Thanks very much for sharing, look forward to testing this idea out.
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.
Noobywan (My apologies for unformatted code, the formatting only works in forum or library posts not ...
Noobywan Hi FXTT, no problem for requests (as long as no one requests me singing), just usually it’s ...
JC_Bywan Bug fix at line 38, should be: if changebarre or (opentime[1]=start) then (same as in ...
Manu L. Bonjour Nicolas, j'ai créé un screener avec l'aide à la prog en TF weekly mais je voudrai...
wtangsiri C'est exactement le même signal que donne le croisement et le décroisement de deux EMA (7 et...
PHAN100 bonjour, j'ai un bug sur le programme recopié prorealtime me dit qu'il y a un problème à ...
IV Mcm Vous devez faire un clic droit sur le prix > propriété > ajouter indicateur Si vous...
punch1 Fonctionne pas chez moi il s'affiche rien pourtant j'ai bien fait le clic droit sur le prix ...
punch1 Je peux te faire un screen d'ecran si tu as un email :)
ferros bonjour , super votre indicateur!!!! est-il possible de l'avoir en histograme +1 /-1 por en...
IV Mcm V2 is coming
SudhirRN is this code working for on tradingview plartform?
Nicolas No. All our codes are made to be used with ProRealTime trading platform: https://www.proreal...
Fabian Hi IV Mcm, have you drawn the rectangles (Dinamic, Range) by yourself in the chart or are...
IV Mcm Myself to illustrate ;)
oraclus Bonjour indicateur très intéressant existe t il un screener qui détecte les actions qui donn...
IV Mcm Ce n'est pas le but de cet indicateur, mais avec un peu d'entraînement vous pourriez le code...
Yantra Thank you for sharing your good work!
Nicolas le code est déjà sur cette page, inutile de fournir un autre format ?! Les fichiers itf sont...
Novice-Surfer Hello IV Mcm, You are my leader ! Your work is incredibly precise, thank you very much f...
Mikolajek Merci pour votre excellent travail !

Top