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
Nicolas
9 months ago
Anthony2A Bjr, j ai des erreurs sur la ligne 69, 74, 78 et 80. sur drawcandle drawtext et endif. si ...
Lucas0000 Hello, Congratulations on this programming, it seems incredible to me, I am new to this but ...
plbourse Hello, I am trying to use this singal (in fact I have converted it to an indicateur giving B...
BriceE Bonjour Nicolas, Je suis a la recherche d'indicateurs pour me donner la meilleure indicatio...
Nicolas
11 months ago
Maxime Baudin Well done Nicolas, creative!
Stenozar Hi Nicolas, please can you explain how to read/use this indicator? thanks!
FXtonio @RICOU en 1 minutes avec un filtre de tendance ZLSMA 200 et eventuellement un rsi 7 , 69% de...
JC_Bywan For people interested in the screener: https://www.prorealcode.com/topic/screener-buy-sell-m...
octum Gracias NJicolas. Las lineas 35 y 36 dan fallo. (¿Es adrede para iniciados?) Puedes co...
Nicolas Yes, Magic if the variable that contains the value of the line, you can test if it goes up o...
dadah1987 Bonjour Nicolas, merci pour cet indicateur. Utilisant pour l'instant la création simplifié p...
Nicolas Merci d'ouvrir un sujet sur le forum avec une description complète du système.
GustavoLoboOrenstein Is it possible to add histogram with only increasing bars?
Nicolas Je ne rencontre pas ce problème avec le NASDAQ par exemple, ce serait plus simple d'ouvrir u...
YvesRobert Bonjour Nicolas, en effet ca marche, je me suis trompé, j'ai bien tout le tracé. C'est parce...
oliTR Bonjour, les conditions longCond et shortCond ne contiennent-elles pas une condition qui s'a...
Jiacky
2 years ago
Kalman Filter
Kalman Filter
0
Indicators
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 ...
atlante hi nicolas this indicator have 2 wrong borderline and islalastbarupdate. thank you can you h...
Nicolas That'"s because you are not using PRT v11? Just remove lines 59 to 62
Kanamax Hi Roberto, sorry for my confusing previous posts (forget them). My request is very simple,...
robertogozzi Please start a new topic in ProOrder support.
robertogozzi There you go: myMagicTrend = CALL “Magic Trend custom”[20, 14, 1, 5] alpha = 105 b = 0...
johann8 exactly :) Thank you all for the help!
max_92 Ciao Roberto, ho scaricato l'indicatore e come ti avevano già scritto sopra anch'io vedo la ...
Xenotrax A première vue, sa à l'air d'être un indicateur très puissant sur de petites temporalités, j...
merri Bonjour Nicolas, Comment transformer cet indicateur en bot sur PRT ?
Nicolas Cela a déjà été fait, voir ce sujet: https://www.prorealcode.com/topic/strategia-con-lindica...
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. ...
zilliq Thanks @Nicolas. I tried to use it as Trend in a proorder system, but don't know why, it doe...
Suzu Yuk He is right. MT and mavgMT are not defined and causing errors.....

Top