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 • 347 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 • 345 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
AlgoAlex
5 years ago
Marcot18 Alex ti sei superato
AlexF Esagerato!
winnie37 yes. "No ground breaking math here, but I am finding very useful and some algo based on it i...
Jan Wind Also interesting to know what does not work, which set up you use, saves me investigating ! ...
winnie37 i just set the proorder like this: buy when 50/100/200 phase >0 and sell when under 0, go...
Vinks_o_7
5 years ago
IV Mcm I've always wondered how to make the ADX faster, thank you!
Vinks_o_7 You welcome !
Vinks_o_7 Another variation that may be more accurate : we calculate the average of normalized DI's in...
nfulcher Please could someone explain how the following code is calculated:- iDI = TEMA[3](DI[DI2]...
oakenstream Jan, I find sometimes that the priceexit variable is never set. It seems to happen when the ...
Matt66612 I do not understand the first time I launch the backtest I got the same result as you. but ...
SL Hi, Fer666 Thank you for sharing. If I want to show daily ST on a 10_min intraday chart...
SL correction above... system had remove"not equal" signs Line 19 : change to if WeekNo "Not...
SL OK... I had figured out... need more than that. Thank you anyway.
Nicolas change the lastline with: RETURN lastsig and check if lastsig change its value with the a...
nectouxg Hello Nicolas, I will try tonight when I get home, just one last question, I trade the DA...
FXtonio Bonjour, j'ai un problème avec le code, il me dit que ce n'est pas correct ligne 26-27-28: ...
Vonasi There is another version of this indicator that can plot the same lines but onto an indicato...
Martin35 Hello Vonasi, do you think it is possible with PRT to code with the same principle as on thi...
abhay I am getting a shading between the lines, how can I avoid that. I just want to see lines as ...
Vonasi Delete the 'Color Zone' in the indicator settings window.
avatar
unkown ;-) sfido chiunque a riuscirci!
avatar
unkown infatti basta leggere i post degli altri....
nicola papangelo ciao Francesco vorrei contattarti su facebook o in privato. Grazie
Janfi Hello, I'm new to ProRealCode and I do not understand the following summation[n](indicator...
Kaci It seems he's just checking that the previous MACD is < 0 for maximum one period ? I'...
Daniel Martin Hi do you know how have and entry after the second cross? There is crosses below 0 and cross...
mscharstrom Hi @robertogozzi, I really love this indicator. However, I'd like to tinker with it to fit ...
Ahimsa Hi Roberto I cannot thank you enough for writing this code. It could help me more than you ...
Nicolas With PRT v11, you have to click on "price" at the upper left side of the price chart.
Juan Salas Hi FULVIO09, Nice piece of work. It seems to work very well. Does only work for INDEXES??...
Johann Hi @FULVI09, I understand the instructions however I'm not too sure how to determine the "p...
Player8520 Hello, It doesn't work with me either. However, I changed AA to 180 on line 15, added th...
Bhanu Pratap Dear Sir, Can I get MQL4 File for this indicator and last man standing . pls looking forward...
ISTJ_T Hi Nicolas Thanks a lot for the indicator. Trading off the TradingView and have issues wit...
Nicolas Just use ProRealTime and its powerful screener for stocks.
Vonasi Discussion on this indicator/filter can be found here: https://www.prorealcode.com/topic/121...
Vonasi Forum discussion on these indicators can be found here: https://www.prorealcode.com/topic/av...
jennr29 Hi. Is it possible to convert this code to an mq4 file?
Nicolas Sorry but our website is dedicated to prorealtime programming. However, you can ask for priv...
snow_onar Very interesting indicator. Thanks for contributing it. What volume node or volume profile i...
Leo Does it opens pending orders?... maybe they were not trigger.
Mattzi Dont know, all i can see is that it opened an order yesterday in backtest but not live. Th...
Jean-Christophe Hello Leo, when running the strategy from 29/12/2015 to 31/08/2018 on ProRealTime Premium, I...
Juanjo Hola?. Exactamente cuál es su utilización?.
bolsatrilera Hola Juanjo, su principio esparecido a las bandas de Bollinguer.Las lineas de las bandas son...
Gordon101 Hi when I added your Guppy indicator to my chart it went below the chart beside the oscilla...
Nicolas Add it on the price by using the wrench located on the left upper side of your price chart.
Gordon101 Thanks Nicolas, worked a treat.

Top