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 • 318 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 • 317 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
P. Marlowe Impressive work. Accurate, interesting, good background. You hit the nail on the head again....
Iván
2 months ago
Iván I personally like it in daily timeframe
oliTR Many thanks Ivan, I copy/paste your code to try it but could only get a constant stable unif...
Iván Hi, I've copied the code above and it works... what asset are you trying? $indices array ...
francis59 Hello Ivan, thanks for this very nice and powerfull indicator. Could you have time to create...
Iván Hi We could find stocks with sweep on: //PRC_Sweep Institucional //version = 0 //28.0...
inverse Like the way you think Ivan ... :)
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
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...
sfl Removing the short side will help, I would like to know from the author where are the condit...
WE ARE SOCIETY DEFPARAM cumulateOrders = False rem CAC40 (france40) en 10 secondes rem à la ligne ci-dess...
David Daget Bonjour. A noter que cette stratégie fonctionne aussi sur le ftse. Ce qui n'est pas surprena...
Nicolas Simple strategy with this indicator is available here: https://www.prorealcode.com/topic/ut-...
FXtonio Nicolas.... MERCI 1 millions de fois, cet indicateur gagne dans 75% des cas en scalping m1 ...
davy42 bonjour, à quel moment apparait le fleche, à l'ouverture ou la fermeture de la bougie? merci
JS
10 months ago
Nicolas
11 months ago
Maxime Baudin Well done Nicolas, creative!
Stenozar Hi Nicolas, please can you explain how to read/use this indicator? thanks!
JohnScher Postscript: It's running in the live right now. One position after the other is opened. ...
ullle73 nice!! how's it been since your last post on going live? :)
thomas2004ch Hi, Is this strategy suitable for daily SPY? Regards
AndPar Buongiorno Nicolas, vorrei provare questo indicatore, ma quando lo inserisco in PRT mi vengo...
Nicolas Basta aggiungerlo al prezzo https://www.prorealcode.com/blog/video-tutorials/how-to-add-an-i...
Aragorna hello Nicolas, this indicator works with the last Beta version of PRT? Ive seen tha many in...
wally Hola soy nuevo en el mudo robots. Alguien seria tan amable de poner el archivo itf.file ya q...
Darren Nash I found this works well on the DOW
thomas2004ch Hi John, Is your strategy suitable for daily SPY? Regards
KAMJKAZE thanks, really interesting!
2c95 thanks, why do U prefer average than lowest ? to close under average does'nt mean another...
Stenozar Hi Sever, how can I visualize the coloured areas?
Sever Hi Stenozar, You need to add the color zones yourself , just go to Add Color Zone To set ...
YvesRobert Hi smp, how should I configure this indicator because everything is at zero -> High, Clos...
smp Hi, this is an end of day pivots indicator, so you need to find the end of day pivot info; t...
YvesRobert Thank you smp.
smp I also have an End Of Day (EOD) cash pivot indicator for use on cash markets; this indicator...
cdc.andersson Hej! Jag försöker lära mig att koda PRT. Jag vill testa en strategi med RSI-värde, ATR-värde...
Swingforfortune Du kan väl jämföra om open > close (röd) eller open < close (grön)
Nicolas change the last line with: return v coloured(r,g,b) style(line,2), v+band coloured(168,168,1...
Paolo.B Thanks ... works as i wanted.
Kanamax Bonjour Nicolas, comme Paolo.B je souhaiterais utiliser cette indicateur au sein d'un code. ...
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

Top