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?

PRC is also 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:
    https://www.prorealcode.com/topic/calculating-diagonal-trend-lines-using-fractals-and-trigonometry/

  9. phanz • 09/08/2017 #

    i backtested it with 10K units of EURUSD 1 hour i get an equity curve that is going one way down. What gives? Did I do anything wrong? Or issit just that this algo is ‘outdated’ and no longer fit current set of time series (ie over optimized and not robust)?

avatar
Register or

Likes

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

+1 more likes

Related users ' posts
Gaspare Ciao Ivan si puo' inserire una strategia su questo indicatore per ottimizzare le variabil...
Iván
2 weeks ago
groelandes Cuando te descargas el fichero itf, en su código no aparece toda la configuración de alertas...
Iván Si lo descargas e importas en tu PRT verás que se han creado las variables para luego config...
P. Marlowe Quite an impressive work, Iván. Extremely useful and accurate. Congratulations. Keep it up¡
lkiklkik i love it !!! thanks.
Stenozar Hi Ivan, can you translate from tradingviwe the EMA TREND METER INDICATOR? It couid be inte...
Iván Hi Yes I can. Please, create a new topic for that I will translate it.
Stenozar Hi Ivan, I've created a new topic about the indicator: https://www.prorealcode.com/topic/ema...
Doddge Hola Iván, ¿sería posible crear un screener que indique cuándo las velas coloreadas del indi...
RTR Ivan thank you for the pro-screener. I a trying to understand how to write the signals from ...
Iván Hi, Lines 62 and 63. These lines define buy and sell conditions.
Iván Hi You should delete from the indicator code all drawing functions and all variables not us...
Iván I've created a screener to show [longcondition or shortcondition]
Chrisinobi Hallo Ivan, Danke das ist Perfekt !! Kannst du bitte in der Screener-Bibliothek die itf. hoc...
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
cjr30 Simplemente modifica las lineas 19 y 21 por las siguientes: drawtext("▲",barindex,low-0.1*a...
groelandes Gracias!!
WhyAskOZ i copied the code into strategy and it gives error on line 21 and 23. it says " Line 1: ...
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...
jacquesgermain sì da aggiungere
Maik2404 auf welchen Wert muss ich die Kompresionsperiode stellen?
jacquesgermain — Période de compression : ce paramètre détermine la période de rétrospection utilisée pour ...
Iván
3 months ago
ARLEQUIN49 Hello Ivan, Would it be possible to convert the code of this QQE MOD indicator which accomp...
ARLEQUIN49 here is the code: //@version=4 //By Glaz, Modified // study("QQE MOD") RSI_Period = i...
Iván Hi, Yes I can translate it but please, create a new topic for it.
Fgats quelques explications en Français ici : Some explanations in French here : https://www.p...
Nicolas Merci pour cette contribution, j'apprécie ! :)
Fgats Merci Nicolas pour ces encouragements et merci aussi pour le commentaire en Anglais accompa...
Alai-n I really like it when you develop ideas around price movement! I am much less a fan of all t...
elcortijoverde Muy buen trabajo.Intuitivo y claro.Gracias por tu dedicación y aportación.
Nicolas
9 months ago
B-Xtrender
B-Xtrender
7
Indicators
Fgats I suspected something like this but in the PRT documentation I couldn't find anything to exp...
616248 Bonjour Nicolas, Peux tu nous expliquer le principe de fonctionnement ? Ou nous mettre un...
Nicolas Le lien vers l'article IFTA de l'auteur est dans le post déjà :)
JS
9 months ago
Trendilo
Trendilo
0
Indicators

Top