Trend Breakout

Trend Breakout

Good Day Everyone

This is probably the craziest strategy I have ever written. It is based on diagonal trend line breakouts. The trend lines are calculated from the extreme of the highest/lowest pivot to the extreme of the next highest/lowest point in the trend. The calculation uses the Tan trigonometry function to calculate the size of the angle between the pivot extreme and the close of the last bar. Violation of the trend line triggers a new stop order and trend direction.

Below the code as adapted for the EUR/USD Mini on the 1Hr timeframe:

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?

New! PRC is also now on YouTube, subscribe to our channel for exclusive content and tutorials

  1. Francesco78 • 09/08/2017 #

    very interesting idea! thanks

  2. Francesco78 • 09/08/2017 #

    would you mind to specify what are the optimized parameters? many thanks

  3. juanj • 09/08/2017 #

    Optimize parameters:

    1. Outside market hours (line 9)
    2. Highest Point of Violation look back period (line 98 and 102)
    3. ATR period and multiplication factor (line 99 and 103)
    4. Bollinger Standard Deviation (line 120)
    5. Bollinger Period (line 125)

  4. Francesco78 • 09/08/2017 #

    Thank you!

  5. juanj • 09/08/2017 #

    @Nicolas @Wing @Francesco78 I am thinking of ways to make the strategy more robust but will require visual cue’s to assist me in analyzing the strategy. Can one of you possibly assist me in graphing the lines? I will require each revision of the trend line (i.e. every time the trend line is updated it needs to be graphed). This will help me better determine when is the best time to update the trend line and/or when it can be considered violated. Thanx

    • Nicolas • 09/08/2017 #

      Should be better with an indicator. As long as we can determined at least 2 coordinates for each line.

  6. juanj • 09/08/2017 #

    The last fractal will be coordinate 1 and the high/low of the candle that generates an angle greater than the previous angle will be coordinate 2

  7. juanj • 09/08/2017 #

    And the point of violation is the close of the candle that violates the line by generating an angle greater than the current angle and closes opposite the active trend

  8. juanj • 09/08/2017 #

    For the latest version of the strategy or to follow updates and developments see the thread here:

Register or


avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
Matriciel Yes indeed. You have to test this strategy in demo mode for a while before launching it in ...
agamennone m hi,i'm new about this,somebody can explain me how does this strategy works? thanks
luigiR hi, can you explane how to try to launch with pro order? good job
Juanjo Muchas gracias por la explicación, muy interesante.
vandenacker THANKS A A LOT FOR SHARING. I like your trade. I try to remproduce your board but i dont arr...
umebon Tnx for sharing!! Can someone help me how i can call for the mydayhigh and mydaylow for to u...
Vonasi Change line 76 to if opendayofweek opendayofweek[1] and opendayofweek 0 then if ...
Vonasi I just noticed that the above post makes no sense as the symbols have been removed. Here in ...
Vonasi There has been a minor bug fix as lines were drawn incorrectly if both HH or both LL values ...
dario ti Excellent, i was looking for something like that, but could be great if you add the option t...
DaxRider Thank U for ur sharing Vonasi
dario ti Thank you!
Razz Hello Vonasi super indicator! is it possible to extend the indicator by the time scales M10 ...
Razz Hello Vonasi I found out myself how I can change it. Thanks again for the indicator
coscar Ottimo lavoro. come sempre!
luxrun Nello studio di Sepiashvili viene descritto anche un altro indicatore, il Q-indicator, che è...
sir_i Bonjour à tous, Je suis nouveau sur le forum et sur la plateforme, pourriez-vous me dire com...
Nicolas Il faut simplement l'appliquer sur le prix.
sir_i Merci pour la réponse, je ne suis pas familier avec l'application de cette procédure simple,...
Nicolas No. The code delivered on our website is for ProRealTime trading platform: https://www.pror...
growland1au Hi Nicolas, I am a beginner to this and I think your Pivot reversal strategy alerts indicat...
Nicolas I can't remember, if you can't find it anywhere in forums, open a new topic if you want it t...
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.
juanj DId some tests using MACD validations on higher timeframes using MTF functionality and unfor...
FREDNC Hi Francesco I tried with :
FREDNC adx[14]>adxmin and adx[14] > adxr[14] and adx[14]>adxmin and adx[14] DIminus[3](clo...
Paul in ProOrder support, at the bottom
Maik2404 wie kann ich den Code bekommen Paul?
jens_kittner Works with US Crude at 1h as well!
rama This is one of best indicator to trade any time frame
Madrosat Is this indicator as it is , useful in strategy automatic
Vangotten Muy buen indicador
Maik2404 es sind leider nur long Positionen und keine Short zu erkennen.
Maik2404 Vytautas: es bleibt aber nur bei long Auslösungen
ullle73 this one is not a winner, have backtested it on almost all pairs, does not have an edge
osupero Buenisimo Sr Nicolas, seria posible que sólo marcara por encima o por debajo de una media mo...
capgros Bonjour @Nicolas, Thanks a lot for this tool, it is very useful for me. I would like to s...
9 months ago
JvdG I meant of course: since ld56 is one of the constituents of ld48;
Nicolas You are right about ld56. Since this is a translation from another programming language, I d...
Florian Legeard C’est à dire sur le prix et non sur le temps ? Merci
eugenio buongiorno paolo , volevo farti i complimenti x il lavoro fatto , funziona molto bene sul 3 ...
Modes68 muy buena estrategia, gracias por compartirla thank yoy for your estrategy, I like me
xpiga Good morning! How do we adjust the code to the different timeframes? You said something ab...
cfta Hi Fulvio, many thanks for sharing this clever indicator, much appreciated. As Pepsmile ment...
cfta Sorry adding the PRT to code didn't work in the above comment so I guess we will have to set...
juanj Something appears to be wrong with this formula as graphing t shows t to almost never be wit...