Fractal breakout intraday Strategy EUR/USD 1H –
Forums › ProRealTime English forum › ProOrder support › Fractal breakout intraday Strategy EUR/USD 1H –
- This topic has 359 replies, 1 voice, and was last updated 1 year ago by RandyG.
-
-
05/02/2017 at 1:37 PM #34259
I think I’ve found it. I used the GRAPH Function to find the negative value.
I’ll pop it back Live and let you know if it goes okay.
Profit over 100,00 bars is the same with my changes below.
(I’m getting worried now … I might make a coder after all!? 🙂
Naah … I’m just not too bad at fixing things in general).1234567This line47 FS = (CLOSE-OPEN) <= - RS*POINTSIZEshould read47 FS = (OPEN-CLOSE) >= RS*POINTSIZE05/02/2017 at 1:40 PM #3426005/02/2017 at 2:21 PM #3427105/02/2017 at 2:26 PM #3427205/02/2017 at 2:33 PM #34277I think this might be the issue as these variables need to be set outside the if statement as DC will not be set.
1234567891011IF LONGONMARKET THENDC=20// period of Donchian StopTGL=5//Trailing Stop pip distanceTP=30//take profit//SL=50// stop lossELSIF SHORTONMARKET THENDC=20TGS=5TP=30//SL=50ENDIFthis code will fail as dc is only set if you long or short
12e= Highest[DC](high)f=Lowest[DC](low)05/02/2017 at 2:40 PM #34278Updated the code like this. Just assigned a default value to the variables. can be overwritten if long or short.
123456789101112131415161718DEFPARAM CumulateOrders = false//LONG VARIABLESDC=20// period of Donchian StopTGL=5//Trailing Stop pip distanceTGS=5TP=30IF LONGONMARKET THENDC=20// period of Donchian StopTGL=5//Trailing Stop pip distanceTP=30//take profit//SL=50// stop lossELSIF SHORTONMARKET THENDC=20// period of Donchian StopTGS=5TP=30//SL=50ENDIF05/02/2017 at 3:07 PM #34281Ah Gotcha!
Thanks Stanton, I made your changes and popped it back in Live … I let you know how it goes, should know by 15.30 UST+1 as mine is the 30 min version!
Almost feels like fun now with the speedy iterative fixes! 🙂
GraHal
05/02/2017 at 3:32 PM #3428205/02/2017 at 5:38 PM #3429505/02/2017 at 6:17 PM #3429705/02/2017 at 8:34 PM #34329HELLO,
DO YOU THINK THAT IS CORRECT ?:
123456789101112131415161718DEFPARAM CumulateOrders = false//VARIABLESDC=DC// period of Donchian StopTGL=TGL//Trailing Stop pip distanceTGS=TGSTP=TP//SL=SLIF LONGONMARKET THENDC=20// period of Donchian StopTGL=5//Trailing Stop pip distanceTP=30//take profit//SL=SL// stop lossELSIF SHORTONMARKET THENDC=20// period of Donchian StopTGS=5TP=30//SL=SLENDIF05/02/2017 at 8:44 PM #34330Dont think that will work as DC will only be given a value if you are on the Market.
This code gets run if you on the market or not.
12e= Highest[DC](high)f=Lowest[DC](low)At that point DC = null
Which will give an error
You could also do this.
1234567891011121314151617181920212223242526DEFPARAM CumulateOrders = false//VARIABLESIF LONGONMARKET THENDC=20// period of Donchian StopTGL=5//Trailing Stop pip distanceTP=30//take profit//SL=SL// stop lossELSIF SHORTONMARKET THENDC=20// period of Donchian StopTGS=5TP=30//SL=SLENDIFif longonmarket thenf=Lowest[DC](low)laststop = f[1]endifif shortonmarket thene= Highest[DC](high)laststop = e[1]endifif onmarket thensell at laststop stopexitshort at laststop stopendif05/02/2017 at 8:55 PM #3433105/02/2017 at 9:04 PM #3433305/02/2017 at 9:19 PM #34338 -
AuthorPosts