Perfect Trend Line

v10.3
Perfect Trend Line

The Perfect Trend Line indicator act as a trend following indicator. It is simply made of 2 lines from highest high and lowest low of 2 different periods, one short and a longer one.

If the price breaches the longest line, it is a sign a of potential trend reversal, while if price is in the cloud made of these 2 lines, it is only a retracement and a potential price rebound in the same direction as the main trend.

Confirmation of trend reversal are highlighted with blue and red dots.

The cloud can be expanded with the SlowPipDisplace and the FastPipDisplace settings which must be set in points/pips values.

 

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. Genotik • 10/16/2017 #

    Merci !

  2. Laurent7533 • 10/16/2017 #

    Bonjour,

    Cet indicateur ne semble fonctionner qu’avec le forex. Est-ce qu’il serait possible d’avoir la même chose pour les actions ?

    • Nicolas • 10/16/2017 #

      L’indicateur est bien compatible avec tous les instruments. Merci de préciser ce qui ne semble pas fonctionner ?

  3. Laurent7533 • 10/16/2017 #

    Voici ce que me retourne le logiciel :

    Erreur de syntaxe :
    Veuillez définir la variable suivante : slowlenght
    Veuillez définir la variable suivante : slowpipdisplace
    Veuillez définir la variable suivante : fastlenght
    Veuillez définir la variable suivante : fastpipdisplace

    • Nicolas • 10/16/2017 #

      je vois tu as copié/collé le code plutôt que l’avoir téléchargé, veuillez soit le télécharger et le réimporter dans la plateforme, soit décommenter les lignes 9 à 12 (enlever les //).

  4. Laurent7533 • 10/16/2017 #

    Merci Nicolas. Effectivement, c’était bien le problème. Est-ce que ces variables lignes 9 à 12 sont optimisées pour du journalier Actions Euronext ? Sinon, quelles valeurs sont idéales ?

    • Nicolas • 10/16/2017 #

      Il n’y a pas de valeurs optimales, il s’agit de derniers plus haut et derniers plus bas sur les X dernières bougies.

    • Laurent7533 • 10/16/2017 #

      OK merci !

  5. Abz • 10/16/2017 #

    Hello Nicolas

    to use this in a automated strategy let say on a daily chart how can we perform that i tried this for Buy but dosent work

  6. Abz • 10/16/2017 #

    a1 = myPRCPerfectTrendLineptl2 > Dclose(1)
    a2 = myPRCPerfectTrendLineptl2 myPRCPerfectTrendLineptl

  7. luxrun • 10/16/2017 #

    Nicolas, ho realizzato uno screener dall’indicatore perfect trend-line. Lo screener mi restituisce tutte le azioni di un paniere, mentre io vorrei solo trovare quelle in situazione di “●” cambio trend da long a short o viceversa. Mi puoi aiutare? Grazie

    //PRC_PerfectTrendLine ptl | screener
    //16.10.2017
    //Nicolas @ http://www.prorealcode.com
    //Sharing ProRealTime knowledge
    //converted from MT4 version (original author mladen)
    //enhanced version by Nicolas

    // — settings
    SlowLength = 7 // Slow length
    SlowPipDisplace = 0 // Slow pip displace
    FastLength = 3 // Fast length
    FastPipDisplace = 0 // Fast pip displace
    // — end of settings

    thigh1 = Highest[SlowLength](high)+ SlowPipDisplace*pointsize
    tlow1 = Lowest[SlowLength](low)- SlowPipDisplace*pointsize
    thigh2 = Highest[FastLength](high)+ FastPipDisplace*pointsize
    tlow2 = Lowest[FastLength](low)- FastPipDisplace*pointsize

    if barindex>2 then
    if Close>line1[1] then
    line1 = tlow1
    else
    line1 = thigh1
    endif
    if Close>line2[1] then
    line2 = tlow2
    else
    line2 = thigh2
    endif
    endif

    if (Close[0]<line1[0] and Close[0]line1[0] and Close[0]>line2[0]) then
    trend = -1
    endif
    if (line1[0]>line2[0] or trend[0] = 1) then
    trena = 1
    endif
    if (line1[0]<line2[0] or trend[0] = -1) then
    trena = -1
    endif
    if trenatrena[1] then
    if trena=1 then
    x = max(line1,line2)

    else
    x = min(line1,line2)

    endif

    endif

    SCREENER (x)

  8. M. Pettersson • 10/16/2017 #

    Can you please use English?

  9. luxrun • 10/16/2017 #

    Voilà:
    Nicolas, I realized a screener with the perfect trend-line indicator. The screener returns all the shares into a basket, while I just want to find those in a “●” trend setting from long to short or vice versa. Can you help me? Thank you

  10. Eduardo Siverio • 10/16/2017 #

    Hello Nicolas, first of all thank you for your amazing work, I downloaded the perfect trend indicator. I work only with the Dax full future in 1 minute. I’m looking for 10 points daily and I have tested your indicator for a week. I have a problem that I could’t resolve yet, when the blue/red dot gets on and I put an order based in that and then it gets off and doesn’t makes the reversal move. So, when can I be “sure” of the reversal, and the other question is if this indicator is the best to work with the Dax in 1 minute. Thank you.

    • Nicolas • 10/16/2017 #

      Like any other indicators, you must wait for a close to validate a signal (blue and red dots). This one is not better than any other, like I said already, it only generates signals depending of breakout of recent highest high and lowest low, sometimes it works well, sometimes not 🙂

  11. Eduardo Siverio • 10/16/2017 #

    Thank you Nicolas

  12. Eduardo Siverio • 10/16/2017 #

    Hi Nicolas, it´s me again. I´m obsessed with your Perfect Trend Indicator. I realized that I´m not faster than an automatic trader. So, my question is if you can program this indicator to operate automatically with some paramethers of buying and saling and with a daily task. If you can do it please let me know how we can do that.

    • Nicolas • 10/16/2017 #

      Sure it’s possible, please ask your query in the automatic trading forum (ProOrder) in order to get replies from members. I’m still on leave, so please be patient if no one answer your query in the mean time.

  13. Leo • 10/16/2017 #

    Hi Nicolas,
    in your opinion, why is it the “perfect” trend indicator?
    Thanks in advance

    • Nicolas • 10/16/2017 #

      It’s the name of the original code, not my opinion.

  14. hamid1736 • 10/16/2017 #

    Hi Nicolas,
    when the red or blue dot is formed, is it based on the close of the current candlestick(the same bar index) or it will be formed after close of the next candlestick ?
    Thanks,

    Hamid

    • Nicolas • 10/16/2017 #

      It’s based on the current Close. In real time you can wait or not for the candlestick to close or not to validate the trading signal, depends on your trading style 🙂

  15. AlexF • 10/16/2017 #

    Hi, even if I almost understood the indicator’s theory, I am unable to translate it in ProRealCode to try open long or short positions. Would you please help me about it?

    • Nicolas • 10/16/2017 #

      Examples of how to use the indicator in an automated trading system here : https://www.prorealcode.com/topic/perfect-trend-indicator/

  16. hamid1736 • 10/16/2017 #

    Hi Nicolas,
    As per my previous message above, I mentioned that the red or blue dot is formed based on the current close or next close of candle stick? I have tested with 1 minute interval, it is based on current candle stick but when I change time interval to weekly, it looks like it is based on next candle stick or bar index. For example, I was pretty sure that IBEX ( Spain 35 cash index) at weekend when market was close, there wasn’t any blue dot under a bar closed on 27 October . But this week when market opened and price move higher it shows blue dot under previous candle stick which is inconsistent with other time interval. Is here problem or issues under weekly interval?
    Thanks,
    Hamid

    • Nicolas • 10/16/2017 #

      Yes I know there some issues with the weekly chart, already encountered on another indicator. It has already been reported to PRT, but you can make a report with this specific indicator behavior within the platform debug console (CTRL+M).

  17. Nicolas • 10/16/2017 #

    Perfect Trend Line screener code: https://www.prorealcode.com/topic/ayuda-screener-indicador-perfect-trend-line/#post-51291

  18. Lior Green • 10/16/2017 #

    Perfect Indicator. Thanks a lot. Hope i will get reach by using it 🙂

  19. primo1 • 10/16/2017 #

    Bonjour Nicolas,

    peut on transformer cet indicateur en strategie

    super travail

    • Nicolas • 10/16/2017 #

      Quelque chose a déjà été travaillé ici: https://www.prorealcode.com/topic/perfect-trend-indicator/
      Tu peux partir de cette base et la modifier / améliorer à volonté, on attend des retours de ta part 🙂

  20. Sjoerd • 10/16/2017 #

    Hello Nicolas,

    thank you for the code of the ‘perfect trend line’ indicator. As a daytrader on the 10, 15 and 30 min charts it confirms the reversals very nice.
    One question. I trade several stocks and some indices. Is there a possibility that i can get a alert when a blue or red dot appears?

    thank you in advance

    kind regards,
    Sjoerd

    • Nicolas • 10/16/2017 #

      You can use the screener posted here: Perfect Trend Line screener code: https://www.prorealcode.com/topic/ayuda-screener-indicador-perfect-trend-line/#post-51291

  21. Sjoerd • 10/16/2017 #

    Thank you nicolas

  22. primo1 • 10/16/2017 #

    Bonjour Nicolas,

    sur quelle échelle de temps minimum tu utilises l indicateur

    je pense 4H ou 1H

  23. primo1 • 10/16/2017 #

    Bonjour Nicolas

    Pour créer la strategie comment peux tu traduire l”apparition des points.

    Acheter ou vendre lors de l’apparition des points

    merci

    • Nicolas • 10/16/2017 #

      Exemple dans ce sujet du forum ProOrder : https://www.prorealcode.com/topic/perfect-trend-indicator/

  24. tommy • 10/16/2017 #

    how to automate Drawn line between 2 red point and 2 blue points?

    • Nicolas • 10/16/2017 #

      I don’t understand your query. Could you please create a topic in forum with a complete explanation?

  25. tommy • 10/16/2017 #

    I like to automate Drawn trend line between 2 High point on your “PRC_PerfectTrendLine” chart.

  26. tommy • 10/16/2017 #

    and trend line between 2 lower point on your “PRC_PerfectTrendLine” chart.

    • Nicolas • 10/16/2017 #

      You can find an automated trading code in this topic: https://www.prorealcode.com/topic/s-o-s-perfect-trend-line/#post-86009

  27. tommy • 10/16/2017 #

    Thank you. I have a look

  28. rama • 10/16/2017 #

    how to generate alert sound or mail for this when blue or red dot is formed, I dont see any option such support or resistance or buy or sell option in the selection list

    • Nicolas • 10/16/2017 #

      change the last line with
      return line1 coloured(r,g,b,100) style(line,1),line2 coloured(r,g,b,100) style(line,1), r
      and check in the alert tools if r is equal to 200 (red) or 30 (green)

  29. Bard • 10/16/2017 #

    Hello Nicolas,
    Re: alerts, you wrote:
    “and check in the alert tools if r is equal to 200 (red) (I changed mine to 250) or 30 (green)”

    But there is no “=,” but there is “>=” or “=” value 250 or 30 produced two alerts but nowhere near the dots on my 3 tick chart?
    Pls see two arrow alerts at bottom price chart to the left nowhere near ptl dots: https://www.dropbox.com/s/0yxj8v1vdhpw7xf/ALERTSPERFECTTRENDLINE.png

    When the dots are formed there is no alert sound, so how do I express that within the alerts feature if I can’t see “r” in the dropdown box?: (I have re-added the indicator to the price chart just to make sure that “r” is effective).
    https://www.dropbox.com/s/tm98dxlj5a88n9c/ALERTSPERFECTTRENDLINE2.png

    Also, when I go to Display/Alerts Status, now I don’t see anyway of creating a new alert on a different chart by clicking within that chart?

    Alerts Status just opens up but I can’t get a bell in the new second chart for another indicator/screener when I click on the chart?

    Cheers,

    • Nicolas • 10/16/2017 #

      https://www.prorealcode.com/topic/ayuda-screener-indicador-perfect-trend-line/#post-51291

  30. Bard • 10/16/2017 #

    * The edit didn’t work on my previous comment.
    ” but there is “>=” or “=” value 250 or 30 produced two alerts but nowhere near the dots…” should have read:
    but there is “>=” or “=” value. When I set fast trendline >= to value 250 or 30 it produced two alerts but nowhere near the dots…

  31. Manu L. • 10/16/2017 #

    Bonjour Nicolas,
    suite a une de mes precedentes demande dans le forum indicateur, j’ai touve celui-ci pour creer le screener Perfect Line Trade
    https://www.prorealcode.com/topic/ayuda-screener-indicador-perfect-trend-line/#post-51291
    J’ai teste ce matin et il m’a bien remonte les valeurs ayant eu un point bleu sur la journee d’hier.
    Ce soir, je teste et il me ressort les meme valeurs avec une journee de plus et pas de nouvelles alors que McPhy a un point bleu ajourd’hui ?!

    Un p’tit coup de main 🙂
    Merci d’avance

  32. AntoGH • 10/16/2017 #

    C’est selon moi le meilleur indicateur, que j’ai vu, si vous trouvez mieux dîtes moi car difficile de faire beaucoup mieux 😀 Mais je ne comprend pas exactement à quoi servent les lignes rouges et bleus ? (elle servent pour le signal, j’imagine, et font grosso modo allure de résistance et de support) mais est t il vraiment intéressant de les afficher? (ça pollue un peu le graph des fois)
    Merci d’avance !!

avatar
Register or

Likes

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

+33 more likes

Related users ' posts
Gianluca ok i fixed it i hope is ok like this: //TAC trader zone 10.2 | indicator //01.01.2018 //R...
TAC Bolsa Hello try this new version or view the blog with the new indicators .. https://www.t...
TAC Bolsa Sorry, TAC Trader Zone V2 https://www.tiburonesdealetacorta.com/2018/11/indicador-tac-tr...
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...
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.
Geronima Ortiz I watched the video three times, but I can not put the npips parameter as a variable. I do...
Geronima Ortiz I think the video is for an old version of prorealtime, the images do not correspond at all ...
Nicolas indicator1 = CALL “PRC_StopReversal”[npips, 1] and define npips in the optimization window ...
Simba Greetings from germany! :) Can you told me your EXIT-strategy for this, please? :) Would ...
Spawn Voici une version améliorée qui tient compte de plus de critères, notamment l'intégration de...
dertopen HI Wwhy you said avoiding bear market? Don't you think that we can use this code for short...
maurizio dove si trova lo screener?
macdopa Thanks...
Caribeengeek Bonjour j’avais vu que vous proposiez d’écrire des codes pour ceux qui s’y connaisse pas Mai...
Caribeengeek Les devises unité
Nicolas Merci d'utiliser le forum pour les demandes de programmation personnalisée
Eric If you have a high percentage winners and the trades are closed with take profit the spread ...
Casenova I Agree with you JaunJ, and Yes Eric, what you say makes sense too. Optimizing the Stop Loss...
ET Thanks for the system Casenova. In determining the high of the past 4 bars, is there a reaso...
ullle73 nicolas, can you somehome make this to be in the background of the price chart?
jonpt88 none did that yet right?
Nicolas You can ask for a code modification on forums, please open a new topic with your request.
Toto le Heros Thanks Nicolas. I read somewhere that in the calculation, we should round the value of the A...
Nicolas aADX = round(adx[10])
bolsatrilera
7 years ago
Rainbow Oscillator
Rainbow Oscillator
1
Indicators
Maxime Baudin Interesting, thanks! Combine this indicator with the bollinger bands there is enough to make...
ak5hay2 Works like crazy on bitcoin. Use different timeframes. Thanks a lot Doc!!!
richyowen Hi, great code thanks. Very new to this forum. Is there a way to add a 100point target on an...
lisamitch50 Morning all, Just backtested on quite a few instruments, worked well on backtesting, but tel...
FULVIO09 Attualmente non c'è sufficiente volatilità : la condizione "C0 = AverageTrueRange[1500](Clos...
vlongobardo67 Ma io intendevo in backtest ! Scusa non l’ho menzionato.
ciniselloftse salve fulvio .il trading sistem e sempre profittevole?
reb Hello have you used this strat since last year ? live or Back test ? What are the results ?
beeb Yes last Year. But only back test
drysheep Hi all, did anyone test this strategy recently? As i dont get a single trade in the backt...
Actabi Thank you ! Have you realised your "next step" ?
Jessar guten Tag, gibt es bereits die Aktualisierte Datei?
Per Inge Gents - An update - I have been studying various trading approaches, as this one that is bas...
Nicolas
7 years ago
Nicolas Merci, faire une demande dans le forum approprié.
Pere Thanks for this good indicator Nicolas. I would like to make the upper and lower limits mor...
Nicolas because fractals are known 2 bars later! that's why I used rectangle to plot them in the past.
supertiti Bonsoir à tous For those who like me want to calibrate this indicator on a scale of 0 to ...
juanj This gets me thinking about creating a strategy on the 5min timeframe that only takes trades...
GraHal I noted above does okay on DAX 10 min with even a reduction to 30 of the Stop Loss. I've s...
Kris75 Hi Grahal, What about making the same great work you did with the snipet on google doc but...

Top