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/19/2018 at 10:14 AM #7086005/19/2018 at 10:21 AM #70861
What might the reason be for the sudden loss in momentum?
At a guess the take profit and stop loss levels just happen to fit the period that it was developed on better than the period since then. This is always a problem with TP and SL levels they are very easy to curve fit to past data. The general theory of the strategy is good but the difference between profits and loss will always come down to how the market is currently moving in relation to these TP and SL fixed levels.
05/20/2018 at 10:15 AM #7092505/20/2018 at 10:20 AM #70927IMO, this is a great strategy with nice potential, OOS speaks for itself
The
IMO, this is a great strategy with nice potential, OOS speaks for itself.
The 30min strategy on 1h or the latest 1h on 1h?
05/20/2018 at 12:41 PM #70942IMO, this is a great strategy with nice potential, OOS speaks for itself.
I don’t disagree – I just think it is difficult to get excited about the OOS 18.2 pips profit over six trades in one year and 90% of that profit came from just two trades. The lack of any losing trades is exciting though.
It will be interesting to see how this one continues with further real life forward testing.
11/16/2018 at 11:57 AM #85020Can anybody see why I am getting the Rejects for the reason shown (red arrow) on the code below please?
Why is the code trying to take a limit position at a price that is clearly not obtainable (blue arrow)?
And then – in the same second, 100012 code tried to take a stop position at a realistic price as expected ( black arrow).
Version below may include changes I have made.
Hope that makes sense?
Thank You in Advance
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124//-------------------------------------------------------------------------// Main code : ! Fractal BOut EURUSD 1H RonGH//-------------------------------------------------------------------------//-------------------------------------------------------------------------// Main code : ! Fractal BOut EURUSD 1H RonGH//-------------------------------------------------------------------------//-------------------------------------------------------------------------// Main code : ! Fractal BOut EURUSD 1H RonGH//-------------------------------------------------------------------------//-------------------------------------------------------------------------// Main code : ! Fractal BOut EURUSD 1H RonGH//-------------------------------------------------------------------------//https://www.prorealcode.com/topic/fractal-breakout-intraday-strategy-eurusd-1h/page/20///Ronny #48560//EURUSD(DFB) - IG MARKET// TIME FRAME 1H// PROBACKTEST TICK by TICK// SPREAD 0.9 PIP// ALE - KASPER - VONASIDEFPARAM CumulateOrders = falseCP = 101 //Fractal PeriodRSINum = 2Ave = 7 //AverageTrueRange PeriodTGLMult = 0.6 //ATR multipier for TGLSTPMult = 1.8 //ATR multiplier for StopLossAddOn = 1.1 //Added to STPMult for TakeProfitRSIHighLevel = 80RSILowLevel = 100 - RSIHighLevel//KASPER CODE OF REINVESTMENTReinvest=0 //changeif reinvest thenCapital = 5000Risk = 1//0.1//in % pr positionStopLoss = AverageTrueRange[Ave] * STPMultTakeProfit = AverageTrueRange[Ave] * STPMult + AddOnREM Calculate contractsequity = Capital + StrategyProfitmaxrisk = (equity*(Risk/100))MAXpositionsize=CapitalMINpositionsize=1Positionsize= MAX(MINpositionsize,MIN(MAXpositionsize,abs(((maxrisk/StopLoss)))))elsePositionsize=2TakeProfit = 40 //changeStopLoss = 50 //changeEndif///BILL WILLIAM FRACTAL INDICATORif Close[cp] >= highest[2*cp+1](Close) thenLH = 1elseLH = 0endifif Close[cp] <= lowest[2*cp+1](Close) thenLL = -1elseLL = 0endifif LH = 1 thenHIL = Close[cp]endifif LL = -1 thenLOL = Close[cp]endif//CumulativeRSI2RSI2 = (SUMMATION[RSINum](RSI[RSINum](Close)))/RSINumRSILow = RSI2 < RSILowLevelRSIHigh = RSI2 > RSIHighLevel//LONG and SHORT CONDITIONSif (time >=100000 and time < 230000) thenC1 = (close CROSSES OVER HIL)D1 = (close CROSSES UNDER LOL)IF c1 and NOT ShortOnMarket and RSIHigh THENPositionMultiple = (RSI2/100) + 1//Increase PositionSize depending on CumRSI2 levelPositionSize = (PositionSize/((RSIHighLevel/100)+1)) * PositionMultiplePositionSize = Round(PositionSize * 100)PositionSize = PositionSize / 100BUY positionsize CONTRACT AT MARKETENDIFIF D1 and NOT LongOnMarket and RSILow THENPositionMultiple = ((100-RSI2)/100) + 1//Increase PositionSize depending on CumRSI2 levelPositionSize = (PositionSize/((RSIHighLevel/100)+1)) * PositionMultiplePositionSize = Round(PositionSize * 100)PositionSize = PositionSize / 100SELLSHORT positionsize CONTRACT AT MARKETENDIFENDIF//TRAILING STOPTGL = AverageTrueRange[Ave] * TGLMultTGS = TGLif not onmarket thenMAXPRICE = 0MINPRICE = closePriceExit = 0ENDIFif longonmarket thenMAXPRICE = MAX(MAXPRICE,close)if MAXPRICE-tradeprice(1)>=TGL*pointsize thenPriceExit = MAXPRICE-TGL*pointsizeENDIFENDIFif shortonmarket thenMINPRICE = MIN(MINPRICE,close)if tradeprice(1)-MINPRICE>=TGS*pointsize thenPriceExit = MINPRICE+TGS*pointsizeENDIFENDIFif onmarket and PriceExit>0 thenEXITSHORT AT PriceExit STOPSELL AT PriceExit STOPENDIFset target profit TakeProfitset stop ploss stoploss11/16/2018 at 12:10 PM #8502311/16/2018 at 12:15 PM #85024Stoploss can’t be too far related to the margin required..
This is why I am confused … isn’t the StopLoss = 50 at Line 50 and used in Line 124 (set stop ploss stoploss)?
Also it is Limit Orders (not Stops) that are being rejected as being too far from price.
11/16/2018 at 1:02 PM #85026You need to add a p
set target pprofit TakeProfit\set stop ploss stoploss11/16/2018 at 1:12 PM #85027@GraHal TGL is 0, because it’s a price and does not need to be converted using POINTSIZE. Replace those lines with:
123456789101112if longonmarket thenMAXPRICE = MAX(MAXPRICE,close)if MAXPRICE-tradeprice(1)>=TGL then//*pointsize thenPriceExit = MAXPRICE-TGL//*pointsizeENDIFENDIFif shortonmarket thenMINPRICE = MIN(MINPRICE,close)if tradeprice(1)-MINPRICE>=TGS then//*pointsize thenPriceExit = MINPRICE+TGS//*pointsizeENDIFENDIFThis will affect performance a bit.
11/16/2018 at 3:10 PM #85040You don’t need to add a P, since those values are differences in price, not in Pips,
11/16/2018 at 5:48 PM #8505411/16/2018 at 6:22 PM #85056You don’t need to add a P, since those values are differences in price, not in Pips,
You are right, but it doesn’t matter if the instrument has a pipsize = 1, and this is the case for DAX.
11/16/2018 at 6:43 PM #85059Nicolas, this is EurUsd, not DAX.
Indeed lines 49-50 should have * POINTSIZE before the comment, so their values match lines 38-39 which are in price (probably Francesco78 referred to lines 49-50). So GraHal will have to choose one of the two ways and use PROFIT/LOSS with/without P accordingly.
11/16/2018 at 8:52 PM #85065 -
AuthorPosts