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.
-
-
10/04/2017 at 8:30 PM #4822310/04/2017 at 8:34 PM #4822410/04/2017 at 8:38 PM #4822510/05/2017 at 12:42 PM #48275
I tried a quick test of TypicalPrice instead of close but did not see an improvement.
I agree that entry is generally very easy but getting out with a profit is the tough bit!
Why do you say that IG and strategies that use tick data are a problem? Are you saying that backtest results that get in and out on the same candle cannot be relied upon?
On a separate note…. I don’t generally like adding extra filters to a working strategy but I have recently began to like the Cumulative RSI[2] so I added it as a filter to your Fractal Breakout strategy and first impressions were that it seemed to give a higher success rate at the price of less bets obviously. The higher the CumRSI2 for a BUY the better the odds of a win were and the reverse for a SELL so I even tried increasing or reducing the bet size depending upon the CumRSI2 level at the time of entry. Seemed to work quite well. Just an idea that you might want to play with.
10/05/2017 at 1:40 PM #4829010/05/2017 at 2:21 PM #4829510/05/2017 at 3:05 PM #48301Fractal Breakout with Cumulative RSI2 plus ATR Stops and TakeProfit123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121//EURUSD(-) - IG MARKET// TIME FRAME 1H// PROBACKTEST TICK by TICK - 200.000 bars// SPREAD 0.6 PIP// ALE - KASPER - modified by VonasiDEFPARAM CumulateOrders = falseCP = 101 //Fractal PeriodAve = 7 //AverageTrueRange PeriodTGLMult = 0.6 //ATR multipier for TGLSTPMult = 1.8 //ATR multiplier for StopLossAddOn = 1.1 //Added to STPMult for TakeProfit//KASPER CODE OF REINVESTMENTReinvest=1if 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=1StopLoss = StoplossEndif///BILL WILLIAM FRACTAL INDICATOR//CP=PERIODif 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[2](RSI[2](Close)))/2RSILow = RSI2 < 20RSIHigh = RSI2 > 80//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 * 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 * 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 STOPENDIF// DONCHIAN STOPDC=20e= Highest[DC](high)f=Lowest[DC](low)if longonmarket thenlaststop = f[1]endifif shortonmarket thenlaststop = e[1]endifif onmarket thensell at laststop stopexitshort at laststop stopendifset target pprofit TakeProfitset stop loss stoploss*pointsizeOK here you go ozz87 – please be gentle with me as this is the first code I’ve posted. I’ve modified ALE’s code with a Cumulative RSI2 filter. Long trades are entered only if CumRSI2 is above a certain level. The higher the level the better the win rate (testing has shown) – but also obviously fewer bets due to the added filter. Short trades are the opposite and only entered if CumRSI2 is below a certain level. The PositionSize is multiplied by a factor depending upon how high or low the CumRSI2 is – so the higher the probability of a win the higher the stake. I have also attempted to base the StopLoss and TakeProfit and Trailing StopLoss on Average True Range but this is a work in progress! I tested it with a 0.9 spread rather than the 0.6 ALE used.
10/05/2017 at 4:09 PM #4831310/05/2017 at 5:32 PM #48324Thanks Vonasi, Good Idea.
I want to explain my opinion:
I think that we don’t look for a multiplied position to increase our profit, but to find other forex pair.
Cumrsi could be a good filter, but I’d try to optimize period instead of 2 , because on 1 h time frame it’s too fast, usually it’s very good on dailytime frame.
About Stop loss and Take profit: Atr it’s very volatily so I can suggest to average it.We coul’d try to add an long average to filter position.
10/05/2017 at 5:37 PM #4832510/05/2017 at 5:39 PM #48326About IG tick data, the problem is not the same candle, but tick data. Many test with low time frame show that date tick of probacktest are different on real market. For example in backtest you touch a trailing stop and close position, while in real it not happend, etc etc… To survive with this problem it’s necessary to have a strategy that doesn’t depend from tick data .
10/05/2017 at 5:40 PM #4832710/05/2017 at 5:42 PM #4832910/05/2017 at 5:47 PM #48330ALE – I’m not a fan of MA filtering – way too much lag and confusion when price is near the MA. The Cumulative RSI2 is fast and that is what I like about it. Having said that I have not tried stretching the period out but on every other strategy I have tried that on I have have always found 2 to be the best period.
I tested the strategy with and without the positionsize multiplying and it was a definite improvement to profits with it. I maybe need to scale the sizing back as the starting bet size is too big the way it is at the moment. If it increases profitability I think it should stay and then move on to other possible pairs.
On a separate note I have tried coding a similar strategy that looks for bounces/tests of fractal levels rather than breakout but breakout seems more consistent and profitable so far.
10/05/2017 at 6:34 PM #48336 -
AuthorPosts