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 9:45 PM #34347
Stanton got this working
e= Highest[DC](high)
f=Lowest[DC](low)
by doing this
12345678910111213141516DEFPARAM CumulateOrders = falseIf NOTONMARKET ThenDC=20// period of Donchian StopEndifIF 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 10:09 PM #34350ok I’ve already posted code with first the first correction of stanton:
Updated the code like this. Just assigned a default value to the variables. can be overwritten if long or short.
123456789101112131415161718<span class="token keyword">DEFPARAM</span> <span class="token keyword">CumulateOrders</span> <span class="token operator">=</span> <span class="token boolean">false</span><span class="token comment" spellcheck="true">//LONG VARIABLES</span>DC<span class="token operator">=</span><span class="token number">20</span><span class="token comment" spellcheck="true">// period of Donchian Stop</span>TGL<span class="token operator">=</span><span class="token number">5</span><span class="token comment" spellcheck="true">//Trailing Stop pip distance</span>TGS<span class="token operator">=</span><span class="token number">5</span>TP<span class="token operator">=</span><span class="token number">30</span><span class="token keyword">IF</span> <span class="token keyword">LONGONMARKET</span> <span class="token keyword">THEN</span>DC<span class="token operator">=</span><span class="token number">20</span><span class="token comment" spellcheck="true">// period of Donchian Stop</span>TGL<span class="token operator">=</span><span class="token number">5</span><span class="token comment" spellcheck="true">//Trailing Stop pip distance</span>TP<span class="token operator">=</span><span class="token number">30</span><span class="token comment" spellcheck="true">//take profit</span><span class="token comment" spellcheck="true">//SL=50// stop loss</span><span class="token keyword">ELSIF</span> <span class="token keyword">SHORTONMARKET</span> <span class="token keyword">THEN</span>DC<span class="token operator">=</span><span class="token number">20</span><span class="token comment" spellcheck="true">// period of Donchian Stop</span>TGS<span class="token operator">=</span><span class="token number">5</span>TP<span class="token operator">=</span><span class="token number">30</span><span class="token comment" spellcheck="true">//SL=50</span><span class="token keyword">ENDIF</span>05/04/2017 at 2:45 PM #34518This one really looks promising. Nice work Ale! But i wonder which are the latest versions of the different files. There are so many versions on the last pages, it is little confusing.
I’m just running a WF-test on FBS_EURUSD_30M_V2 (i hope this wasnt the wrong version).
What do you guys who set this life use for values for CP and TP?
Will of course share my WF-result (if the PC doesnt crash LOL).
05/04/2017 at 3:27 PM #3453205/04/2017 at 6:16 PM #3456605/04/2017 at 6:17 PM #3456705/04/2017 at 8:02 PM #3457005/04/2017 at 10:42 PM #34580@stanton
i thought to optimize last 5 year, but not finish yet but seem that 1H eurusd work well with:
cp 104
tgl 9
tgs 11
i let you know finish test tomorrow
1 user thanked author for this post.
05/05/2017 at 10:03 AM #3460805/05/2017 at 10:23 AM #3461205/05/2017 at 5:05 PM #3464905/05/2017 at 5:08 PM #3465105/05/2017 at 9:16 PM #34657Sorry guys, the comment I wrote on the trailing start doesn’t seem to be completely valid. But there is a reason behind it. I added the comment because when I’d a look earlier at the minimum stop distance for this pair it was set to 6 pips, but in my WF testing I got a suggested result of like 2 or 3, and if I would put on a trailing stop starting so tight there would not be enough space for the price to move because we need to keep in mind that the first break even level is set our entry level + the value of TGS. (Btw the 100 000 bars backtest result is better with TGL = 3 and TGS = 1 but I’m not sure if it works in reality and when the minimum stop distans gets increased like it must have been when I first checked your system will fail)
I suggest also to try the MFE stop from Nicolas (https://www.prorealcode.com/blog/learning/trailing-stop-max-favorable-excursion-mfe/), sometime it’s better than the fixed step trailing one (but not always).
Another thing I’ve been trying which is not yet in this code is a dynamic profit target based on ATR. Especially with forex it helps to adjust the target level after the current volatility of the market.
One issue I’ve been facing with the FX pairs attached to the Asian session is that the time restriction doesn’t work as well as on pairs connected to the European and American session.
Ale has done a great work on the EURUSD and I hope that more people could have a look at other markets in the meantime in order to speed up the development. Start with the lowest spreads and keep on testing different combinations and timeframes!
Cheers and have a great weekend!
1 user thanked author for this post.
05/06/2017 at 6:11 AM #34665Hello victor
thank you very much for your support
I’m agree with your ideas, I’ve start with Trailing stop =5 because it’s the minimum distance stop for this pair
Eurusd response better then the others, many others market need a fixed stop, filter to entry at market, and dynamic take profit
Tksnks
Ale
05/11/2017 at 3:20 PM #35221Good afternoon Ale ,
First of all congratulations for the excellent TS and the good explanations of that .
My question is, in the previous post you talk about :
@KASPER This is results with 1 lot and risk 0.3
If I use 4 lot ( in EUR/USD mini ) , I reduce the capital to 5000 and I set the risk ..3
What do you Think
Example
12345678910111213141516<span class="token comment" spellcheck="true">//KASPER CODE OF REINVESTMENT</span>Reinvest<span class="token operator">=</span><span class="token number">1</span><span class="token keyword">if</span> reinvest <span class="token keyword">then</span>Capital <span class="token operator">=</span> <span class="token number">5000</span>Risk <span class="token operator">=</span> 3<span class="token comment" spellcheck="true">//0.1//in % pr position</span>StopLoss <span class="token operator">=</span> <span class="token number">48</span><span class="token comment" spellcheck="true"><span class="token keyword">REM</span> Calculate contracts</span>equity <span class="token operator">=</span> Capital <span class="token operator">+</span> StrategyProfitmaxrisk <span class="token operator">=</span> <span class="token keyword">round</span><span class="token punctuation">(</span>equity<span class="token operator">*</span><span class="token punctuation">(</span>Risk<span class="token operator">/</span><span class="token number">100</span><span class="token punctuation">)</span><span class="token punctuation">)</span>MAXpositionsize<span class="token operator">=</span><span class="token number">5000</span>MINpositionsize<span class="token operator">=4</span>Positionsize<span class="token operator">=</span> <span class="token keyword">MAX</span><span class="token punctuation">(</span>MINpositionsize<span class="token punctuation">,</span><span class="token keyword">MIN</span><span class="token punctuation">(</span>MAXpositionsize<span class="token punctuation">,</span><span class="token keyword">abs</span><span class="token punctuation">(</span><span class="token keyword">round</span><span class="token punctuation">(</span><span class="token punctuation">(</span>maxrisk<span class="token operator">/</span>StopLoss<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token comment" spellcheck="true">//*Pointsize))))</span><span class="token keyword">else</span>Positionsize<span class="token operator">=4</span>StopLoss <span class="token operator">=</span> <span class="token number">48</span><span class="token keyword">Endif</span> -
AuthorPosts