Fractal breakout intraday Strategy EUR/USD 1H

Fractal breakout intraday Strategy EUR/USD 1H

This automated trading strategy is about the breakout of Bill Williams fractals levels. It works well with EUR/USD pair on 1 hour time frame.
The following variables can be optimized:

Period of fractal level: CP= 110 to 114

Trailing Stop long: TGL = 5 to 15

Trailing Stop Short: TGS= 5 to 15

Stop loss by Donchian channel: DC = 15 to 30

Take profit : TP= 15 to 80

The concept of the strategy it’s universal, and It could work for equity/indices/currencies, with all time frame above 15 m

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. Elsborgtrading • 04/15/2017 #

    Again a nice code from you ALE.. *thumbs up*
    Cheers Kasper

    • ALE • 04/15/2017 #

      Happy to hear from your experience!Thanks Kasper

  2. Marcot18 • 04/15/2017 #

    DAVVERO UN OTTIMO CODICE!
    COMPLIMENTI

    • ALE • 04/15/2017 #

      Grazie, provate ad usarlo anche su altri strumenti ottimizzando i parametri

  3. Elsborgtrading • 04/15/2017 #

    I took just a quick look. I think it will take some time to fully understand the traling stop loss, but as always I really like to have defined a fixed stop loss. I don’t know why the plain set stop loss don’t work for eurusd so I came up with this.
    It is just a suggestion so I’d like to hear your thoughts on it.
     
    //EURUSD(-) – IG MARKET
    // TIME FRAME 1H
    // PROBACKTEST TICK by TICK – 200.000 bars
    // SPREAD 0.6 PIP
    // ALE

    DEFPARAM CumulateOrders = false

    Reinvest=1
    if reinvest then
    Capital = 10000
    Risk = 1//0.1//in % pr position
    StopLoss = 48
    REM Calculate contracts
    equity = Capital + StrategyProfit
    maxrisk = round(equity*(Risk/100))
    MAXpositionsize=5000
    MINpositionsize=1
    Positionsize= MAX(MINpositionsize,MIN(MAXpositionsize,abs(round((maxrisk/StopLoss)))))//*Pointsize))))
    else
    Positionsize=1
    StopLoss = 48
    Endif

    ///BILL WILLIAM FRACTAL INDICATOR
    //CP=PERIOD
    CP=113
    if close[cp] >= highest[2*cp+1](close) then
    LH = 1
    else
    LH=0
    endif
    if close[cp] <= lowest[2*cp+1](close) then
    LL= -1
    else
    LL=0
    endif
    if LH=1 then
    HIL = close[cp]
    endif
    if LL = -1 then
    LOL=close[cp]
    endif
    // RETURN, HIL COLOURED(0,200,0) AS “BREAKOUT LEVEL LONG”,HIL COLOURED(200,0,0) AS “BREAKOUT LEVEL SHORT”

    //LONG and SHORT CONDITIONS
    //Positionsize=1
    if (time >=100000 and time < 230000) then
    C1 = (close CROSSES OVER HIL)
    D1 = (close CROSSES UNDER LOL)
    IF c1 and not shortonmarket THEN
    BUY positionsize CONTRACT AT MARKET
    ENDIF

    IF D1 and not longonmarket THEN
    SELLSHORT positionsize CONTRACT AT MARKET
    ENDIF
    ENDIF

    //TRAILING STOP
    TGL =5
    TGS=5
    if not onmarket then
    MAXPRICE = 0
    MINPRICE = close
    PREZZOUSCITA = 0
    ENDIF
    if longonmarket then
    MAXPRICE = MAX(MAXPRICE,close)
    if MAXPRICE-tradeprice(1)>=TGL*pointsize then
    PREZZOUSCITA = MAXPRICE-TGL*pointsize
    ENDIF
    ENDIF
    if shortonmarket then
    MINPRICE = MIN(MINPRICE,close)
    if tradeprice(1)-MINPRICE>=TGS*pointsize then
    PREZZOUSCITA = MINPRICE+TGS*pointsize
    ENDIF
    ENDIF
    if onmarket and PREZZOUSCITA>0 then
    EXITSHORT AT PREZZOUSCITA STOP
    SELL AT PREZZOUSCITA STOP
    ENDIF

    // DONCHIAN STOP
    DC=20
    e= Highest[DC](high)
    f=Lowest[DC](low)
    if longonmarket then
    laststop = f[1]
    endif
    if shortonmarket then
    laststop = e[1]
    endif
    if onmarket then
    sell at laststop stop
    exitshort at laststop stop
    endif

    set target pprofit 30
    set stop loss stoploss*pointsize

    • ALE • 04/15/2017 #

      The trailing stop start if close > tgl or close < tgs and move candles after candles.The second stop loss  is donchian channel level.During my prockbatest I’ve seen that a stop loss above 40 pip works well also. I’m happy to see that your reinvestment code have a good equity in this strategy.I’ve started demo last week, results are only in probacktest, but the code is easy and i’ve already tested trailing stop in real, with other strategies and it work well.I like this strategy because:Low risk, low drawdown since 1998, in the walk farward results are well balanced, the donchian level stop loss it’s a correct interpretation of stop loss after a breakout, and the breakout level are confirmed by long candles in many cases, obviously we cannot discuss Bill William fractal level 
      I’m worried to know if this code works in real time well. We have to wait

    • ALE • 04/15/2017 #

      Kasper your peace of code for reinvestment it’s excellence!

    • ALE • 04/15/2017 #

      piece 😛

    • Frytconcord • 04/15/2017 #

      Bonjour j’ai testé votre code, vraiment impressionnant. J’ai envie de le tester en reel. Ma question est comment inclure ou juste savoir le coût du stoploss ? Car j’ai un compte CFD risque limité. Merci de votre réponse. Et merci pour ce code.

  4. zilliq • 04/15/2017 #

    Thanks Ale,
    Did you try do do a Walk forward with it ?
    Zilliq

    • ALE • 04/15/2017 #

      you can see walk f.  picture above, it’s result with the original parameters 

  5. ALE • 04/15/2017 #

    Yes zilliq

  6. Paris • 04/15/2017 #

    maybe it is a good  idea to open a thread ….

  7. zilliq • 04/15/2017 #

    And the results are ?
    Thanks Ale

    • ALE • 04/15/2017 #

      Zilliq I don’t know if I’ve attached picture

    • Nicolas • 04/15/2017 #

      I have done walk forward myself with 200k bars, real ticks with 10 OOS periods and the results were nice, even with a larger spread than Ale mentioned. I kept the screenshots somewhere, maybe Ale could open a thread to discuss about it, good idea Paris! I think this one could be adapted to other Forex pairs also. 

  8. ALE • 04/15/2017 #

    @ Parisyes good Idea!

    • zilliq • 04/15/2017 #

      Thanks Ale

    • Nicolas • 04/15/2017 #

      Please use the new forum thread about this strategy to post picture: https://www.prorealcode.com/topic/fractal-breakout-intraday-strategy-eurusd-1h/

    • Frytconcord • 04/15/2017 #

      Hello Have you tested this code in real?
      Fractal breakout intraday Stratégie EUR / USD 1H

  9. Paris • 04/15/2017 #

    Sorry guys but i have not the same results at all .
    Does anybody have the same equity curve ? 

    • ALE • 04/15/2017 #

      Eur/usd 1 h – spread 0.6

    • Paris • 04/15/2017 #

      In fact i have the dame , just my back test is a little shorter i only have 85 000 candles . Maybe i  have an idéal to improve your back test , why ont to add a lot each 1000€ won . What do y ou think . I can give you a little snippet that do that .

  10. Paris • 04/15/2017 #

    In fact i have the same , just my back test is a little shorter i only have 85 000 candles . Maybe i  have an idéal to improve your back test , why not to add a contract each 1000€ won . What do y ou think . I can give you a little snippet that do that

    • ALE • 04/15/2017 #

      yes of course.. Have you seen Kasper’s code above?

  11. Paris • 04/15/2017 #

    OK mine is more simpler but does pretty thé same 

  12. ALE • 04/15/2017 #

    I’ve open a new topic here: https://www.prorealcode.com/topic/fractal-breakout-intraday-strategy-eurusd-1h/

  13. Francesco78 • 04/15/2017 #

    Thank you Ale, great code

  14. Paris • 04/15/2017 #

    snippet for modulation of contract 
    n = 1+(ROUND((strategyprofit)/7500))
    every 7500 € it adds a contract …. of course you cuold modify it 

    • ALE • 04/15/2017 #

      Thanks Paris

  15. criscolci • 04/15/2017 #

    Bella lì Ale!! Sei il n*1

  16. iramirez55 • 04/15/2017 #

    Bonita estrategia. Gracias ALE

    • ALE • 04/15/2017 #

      … thanks I hope could help our community!

  17. WimF • 04/15/2017 #

    It help me a lot.  Excellent id “Merci”

    • ALE • 04/15/2017 #

      🙂 Wim Thank you!

  18. GDKLockout • 04/15/2017 #

    Hi, Im new to this forum and automated trading, so please excuse the nooby question:
    If you have a trailing stop active why is the losses so high? $443 average loss??

    • ALE • 04/15/2017 #

      Hello
      because this trailing stop start next candles if condition is verified. 
      For more informations please use relative topic, don’t hesitate to ask more informations.

  19. ALE • 04/15/2017 #

    I have added the last version in the forum
    https://www.prorealcode.com/topic/fractal-breakout-intraday-strategy-eurusd-1h/

  20. Nicolas Pierre Louis • 04/15/2017 #

    Hello Ale,

    What do you think of ? :
    cp = 115
    tgl = 1
    tgs = 25

    have a good day

    Nico

    • ALE • 04/15/2017 #

      why do you want to works the trading system with a trailing stop long of 1 point and the trailing stop short of 25 points?

  21. Nicolas Pierre Louis • 04/15/2017 #

    oh yes I forgot : dc = 18 🙂

  22. supermyguel • 04/15/2017 #

    Ciao ALE. Recentemente sono passato a ProRealTime da VisualTrader e sto cercando di imparare la programmazione….. Sto studiando il tu Trading System con le modifiche di Elsborgtrading. Chiedevo per favore se potevi spiegrami perchè ci sono giorni interi in cui il sistema non entra in posizione e cosa significano queste due righe di codice “Capital = 10000” e “MAXpositionsize=5000
    MINpositionsize=1”. Grazie

  23. Kris75 • 04/15/2017 #

    @Ale
    Hi Ale,
    Thanks for this rocking algo 😉 there is though a counter performance in 2018 and it seems it is after HIL and LOL crossed as normaly HIL is strictly > LOL; I whish I could insert an image but it is not possible on comments section;
    very best,
    Chris

  24. Kris75 • 04/15/2017 #

    Sorry here is my question: >> how can we explain this and correct it?

  25. Samitha Prasanna • 04/15/2017 #

    Hi ALE, would you be able to provide the values for the below part of the code (time >=100000 and time < 230000) , my time zone is Australia Perth. thanks

  26. Player • 04/15/2017 #

    Bonjour,
    J’ai testé cette stratégie sur EurUSD en 1 heures sur 10000 unités et le résultat est catastrophique
    Aurais-je loupé quelque chose ?

    Merci

  27. Player • 04/15/2017 #

    Vue du rapport du Backtest https://ibb.co/8BMrBz6

avatar
Register or

Likes

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

+43 more likes

Related users ' posts
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...
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...
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...
Francesco78 Jan Wind, I obtain it from the backtest
Kris75 Hi Francesco, The results are totally different with the tickbytick mode; it becomes a losin...
UkDownUnder Takes to long!
Nicolas
6 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.
Alai-n Merci pour ce travail...
patmaba merci Alai-n. C'est ma première participation sur prorealcode, merci pour à toi pour ton co...
longtrade Can this be converted to a screener?
Nicolas Oui pourquoi pas? :)
claudiofred Bonjour Nicolas, merci encore pour ce super indicateur. se demander s'il est possible d'écr...
Nicolas Screener déjà présent sur le forum ici: https://www.prorealcode.com/topic/indicador-lastmans...
bazilou pouvez expliquer donchian bias merci
TempusFugit Masala, thanks for your contribution. I don´t like the offmarket spreads neither ;) I unders...
Uveus Tempus, me da un error al validar el codigo, sobre la variable N. Al crear el indicador me ...
TempusFugit Hi Uveus, I am guessing you inserted the code of the indicator into the system code, is ...
jobswaps vaya eres increible
jobswaps sigue subiendo mas contenido
Brisvegas If it seems to good to be true it is . Any long only system started at multi year lows will...
Nicolas https://www.prorealcode.com/topic/ayuda-screener-indicador-perfect-trend-line/#post-51291
Manu L. Bonjour Nicolas, suite a une de mes precedentes demande dans le forum indicateur, j'ai touv...
AntoGH C'est selon moi le meilleur indicateur, que j'ai vu, si vous trouvez mieux dîtes moi car dif...
Jiacky mma = average[per,1](close) should be mma = average[per,1](close * 1000). Otherwise TDF will...
JanWd Tried the code, nice concept, seems to work quit well for US/EUR 2hrs, Other markets seems n...
JR1976 Simple and nice code , congrats !!! Seems work well with TIme frame 1 h
phanz Hi all, Sorry revisiting an old post. This algo is simple, and simplicity is the ultimate ...
Trading_En_El_Ibex35 El screener no busca acciones que estén en máximos absolutos , busca acciones en las que el...
Andraxx lo de volumen aceptable, lo dices en relación al Ibex 35 supongo. Porque se margen de volume...
Juanjo Hola Queria preguntarte si la idea de maximos anuales es tuya, o bien está basada en el sis...
gblast I added this indicator to my pro real time but its not showing up on my candles. Its invisible
juanj And the point of violation is the close of the candle that violates the line by generating a...
juanj For the latest version of the strategy or to follow updates and developments see the thread ...
phanz i backtested it with 10K units of EURUSD 1 hour i get an equity curve that is going one way ...
rejo007 hello david, i'll try it could you tell me wich strategy do you use in real? thanks
David Somogyi Hello, I have a couple of DAX strategies of breakout and mean reversion. I'll try to post...
Roberto Blázquez Hi David, I just saw your strategy and it's good!!! I'm going to try it from today in real a...

Top