ALE

Fractal breakout intraday Strategy EUR/USD 1H

Category: Strategies By: ALE Created: April 15, 2017, 9:20 AM
April 15, 2017, 9:20 AM
Strategies
48 Comments
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


//EURUSD(-) - IG MARKET
// TIME FRAME 1H
// PROBACKTEST TICK by TICK - 200.000 bars
// SPREAD 0.6 PIP
// ALE

DEFPARAM CumulateOrders = false
///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

Download
Filename: FBS_EURUSD_WALKF_1H.jpeg
Downloads: 829
Download
Filename: FRACTAL-BREAKOUT-EURUSD-1H.itf
Downloads: 2118
ALE
ALE Master
My name is Alessandro, i'm a trader since 2006 You can find me on my website: <a href="http://www.automatictrading.it/" rel="dofollow">www.automatictrading.it</a> <strong>(trading programming services Italy)</strong> Italy
Author’s Profile

Comments

Player
7 years ago
#

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

Player
7 years ago
#

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

Samitha Prasanna
7 years ago
#

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

Kris75
8 years ago
#

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

Kris75
8 years ago
#

@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

supermyguel
8 years ago
#

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

Nicolas Pierre Louis
8 years ago
#

oh yes I forgot : dc = 18 :)

Nicolas Pierre Louis
8 years ago
#

Hello Ale, What do you think of ? : cp = 115 tgl = 1 tgs = 25 have a good day Nico

ALE
ALE
8 years ago
#

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?

ALE
ALE
9 years ago
#

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

GDKLockout
9 years ago
#

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
ALE
9 years ago
#

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.

WimF
9 years ago
#

It help me a lot.  Excellent id "Merci"

ALE
ALE
9 years ago
#

:-) Wim Thank you!

iramirez55
9 years ago
#

Bonita estrategia. Gracias ALE

ALE
ALE
9 years ago
#

... thanks I hope could help our community!

criscolci
9 years ago
#

Bella lì Ale!! Sei il n*1

ALE
ALE
9 years ago
#

magari!

Paris
9 years ago
#

snippet for modulation of contract 

n = 1+(ROUND((strategyprofit)/7500))

every 7500 € it adds a contract .... of course you cuold modify it 

ALE
ALE
9 years ago
#

Thanks Paris

Francesco78
9 years ago
#

Thank you Ale, great code

ALE
ALE
9 years ago
#

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

Paris
9 years ago
#

OK mine is more simpler but does pretty thé same 

Paris
9 years ago
#

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
ALE
9 years ago
#

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

ProRealCode ProRealCode
Loading...