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 • 333 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 • 332 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
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 !
mickey992 salut merci pour ton partage et ton travaille
patapouf Hi Vivien René I just discovered your “Ordered trend-following stocks Screener”. Great work...
afanitro424 its not plotting on chart but instead as it's own histogram directly below chart? How to fix...
Nicolas by adding the indicator on the chart :)
Nicolas Oui c'est possible. Merci de ne pas poster des demandes qui sont hors sujets. Pour les deman...
Igor Merci pour cet itf. Question : comment faire pour instruire un screener ?
Nicolas tester le croisement du Close avec la première valeur de l'indicateur : "TrailingStop", faci...
Dunstan I would like to get guidance_ How do I access and attach this indicator to my MT5 platform...
Nicolas You can't, use prorealtime, it's way better
jc84 Thank you very much for this indicator , not provided by PRT I was actually working at thi...
IV Mcm Bonjour, Je ne reconnais pas cette ligne dans le code, essayer de télécharger directement le...
Manu L. Bonjour, Possible de créer un screnner multiframe Mois dans Ichimoku semaine dans Ichimok...
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 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...
pyhrus P.S : IG , que j'ai contacté ,m'indique que la version V11 , ne sera pas disponible avant un...
Hasardeur Dear Nicolas, is there someting at the arry to modify in order to run the trend at the actu...
MALIMALO Dear Nicolas, just try touse your indicator with backtest but it's not working. is anybody...
Vonasi There are actually two ways to calculate standard deviations and I seem to have used the ver...
ribes65 Bonjour Nicolas, Merci pour votre travail. Est-il envisageable de créer un screener pour ...
Nicolas Bien sûr, merci de formuler une demande dans le forum des screeners pour prorealtime. En res...
ipbvba Est il possible de le transformer en indicateur (pour ne plus avoir les lignes mais uniqueme...
Rory Dryden Thank you. Experimenting with it now.
Wolf Hi Vonasi. Thank for this indicator. I like this calculate concept. I think that line 16 thi...
Vonasi Well spotted! It is just a safety check to ensure that no value below 1 can be used otherwis...
Reddington Hi Vonasi! Really nice work, is it possible to re-create this to work in 10.3? Best regards ...
Vonasi Thanks for the compliments. No this is not easily possible in v10.3 because it uses arrays w...
bruces Hi and thank you. I successfully imported original version above and added to my Prorealtim...
Nicolas Just add it on the price series.
yomisadiku Hello Nicolas, Can I use high and low price at lines hh=max(hh,close) and ll=min(ll,close) ...
Nicolas Yes you can do that, the impact will be that the trailing stop line will be much close to th...
Byggtrader Hi Nicolas! How do I get the indicator in the price chart? It only stays under i new chart.
Nicolas Just add it on the price chart by using the wrench on the left upper side of the chart (pric...
Dom Hello, hello....je commence le trading et découvre par la même occasion le codage....et ce n...
Nicolas Merci, ça fait plaisir !
Be-n Bonjour tout le monde ! Dans l'indicateur de tendance, j'ai du mal à saisir la nuance entre ...
Bard Very interesting approach Vonasi! I'm getting a 404 error when trying to download though?
Vonasi I just tested and I was able to download with no error.
Psari Hi Vonasi, I am a newbie and was wondering whether you could possibly help me with this pro...
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
ggolfet Thanks Nicolas, I imported the itf file and solved the problem.
Hasardeur Hallo Nicolas, i tried to code the multi period heat map in combination with the Ehler’s ...
Nicolas Please open a new topic with the code in forum.

Top