Fractal breakout intraday Strategy EUR/USD 1H –

Forums ProRealTime English forum ProOrder support Fractal breakout intraday Strategy EUR/USD 1H –

Viewing 15 posts - 286 through 300 (of 360 total)
  • #48559

    I guess there must be a difference but I’ve only ever developed and tested on DFB so not able to be much help. Hopefully someone more experienced will chip in with an answer to the positionsize problem.

    #48560

    I changed the maxpositionsize to 5 (5000 was a stresstest, I could read earlier in this thread).

    I changed

    to

    This is the tick-by-tick results.

     

    #48568

    Ronny: Cool. Will test tomorrow.

    #48569

    Thanks for that Ronny. It seems that the ATR based Stoploss and TakeProfit although profitable may not necessarily be an improvement on fixed SL and TP levels. Early on there is a big drawdown which is what I always fear with short period ATR based decisions. A big candle can leave you vulnerable with a big stoploss calculated from it. Pity really as markets are changing animals and ATR always seems to be a good way to stay in tune with the market but unfortunately ATR can be too spiky or too laggy depending how fast or slow you set it – just like any MA.

    Out of interest how did you decide on the fixed levels for SL and TP that you chose – was it an optimization backtest?

    #48585

    @ronny

    in resume, you have this code?

    because on backtest, they are a problem

     

    //EURUSD(DFB) – IG MARKET
    // TIME FRAME 1H
    // PROBACKTEST TICK by TICK
    // SPREAD 0.9 PIP
    // ALE – KASPER – VONASI

    DEFPARAM CumulateOrders = false

    CP = 101 //Fractal Period
    RSINum = 2
    Ave = 7 //AverageTrueRange Period
    TGLMult = 0.6 //ATR multipier for TGL
    STPMult = 1.8 //ATR multiplier for StopLoss
    AddOn = 1.1 //Added to STPMult for TakeProfit
    RSIHighLevel = 80

    RSILowLevel = 100 – RSIHighLevel

    //KASPER CODE OF REINVESTMENT
    Reinvest=1
    if reinvest then
    Capital = 5000
    Risk = 1//0.1//in % pr position
    StopLoss = AverageTrueRange[Ave] * STPMult
    TakeProfit = AverageTrueRange[Ave] * STPMult + AddOn

    REM Calculate contracts
    equity = Capital + StrategyProfit
    maxrisk = (equity*(Risk/100))
    MAXpositionsize=5
    MINpositionsize=1
    Positionsize= MAX(MINpositionsize,MIN(MAXpositionsize,abs(((maxrisk/StopLoss)))))
    else
    Positionsize=1
    StopLoss = AverageTrueRange[Ave] * STPMult
    TakeProfit = AverageTrueRange[Ave] * STPMult + AddOn
    Endif

    ///BILL WILLIAM FRACTAL INDICATOR
    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

    //CumulativeRSI2
    RSI2 = (SUMMATION[RSINum](RSI[RSINum](Close)))/RSINum
    RSILow = RSI2 < RSILowLevel
    RSIHigh = RSI2 > RSIHighLevel

    //LONG and SHORT CONDITIONS
    if (time >=100000 and time < 230000) then
    C1 = (close CROSSES OVER HIL)
    D1 = (close CROSSES UNDER LOL)

    IF c1 and NOT ShortOnMarket and RSIHigh THEN
    PositionMultiple = (RSI2/100) + 1//Increase PositionSize depending on CumRSI2 level
    PositionSize = (PositionSize/((RSIHighLevel/100)+1)) * PositionMultiple
    PositionSize = Round(PositionSize * 100)
    PositionSize = PositionSize / 100
    BUY positionsize CONTRACT AT MARKET
    ENDIF

    IF D1 and NOT LongOnMarket and RSILow THEN
    PositionMultiple = ((100-RSI2)/100) + 1//Increase PositionSize depending on CumRSI2 level
    PositionSize = (PositionSize/((RSIHighLevel/100)+1)) * PositionMultiple
    PositionSize = Round(PositionSize * 100)
    PositionSize = PositionSize / 100
    SELLSHORT positionsize CONTRACT AT MARKET
    ENDIF
    ENDIF

    //TRAILING STOP
    TGL = AverageTrueRange[Ave] * TGLMult
    TGS = TGL
    if not onmarket then
    MAXPRICE = 0
    MINPRICE = close
    PriceExit = 0
    ENDIF
    if longonmarket then
    MAXPRICE = MAX(MAXPRICE,close)
    if MAXPRICE-tradeprice(1)>=TGL*pointsize then
    PriceExit = MAXPRICE-TGL*pointsize
    ENDIF
    ENDIF
    if shortonmarket then
    MINPRICE = MIN(MINPRICE,close)
    if tradeprice(1)-MINPRICE>=TGS*pointsize then
    PriceExit = MINPRICE+TGS*pointsize
    ENDIF
    ENDIF
    if onmarket and PriceExit>0 then
    EXITSHORT AT PriceExit STOP
    SELL AT PriceExit STOP
    ENDIF

    set target profit TakeProfit
    set stop ploss stoploss

    #48607

    @vonasi

    I kind of agree with the ATR-way of setting TP and SL. But I feel I lose control with the risk managment, and ususally prefer to use the fixed ones. The values I used in the backtest is from the top of my head at the time. I have now run a WF-test which returned a takeprofit of 50 and stoploss at 75… Every trader has his own risk profile 🙂 The results from the testing of this strategy seems to return too good of values, it’s easy to think overfit. But as I said, the results of live trading a similar strategy returns good results (but not in significant numbers yet).


    @rejo007

    Yes, there’s something wrong with the reinvest code. I don’t know what.

     

    #48630

    Thanks for doing that test Ronny. Interesting that your off the top of your head numbers had higher TP than SL but the WF test gave higher SL  than TP. What was the win rate and returns like compared to your numbers? I prefer at least 1:1 Risk to Reward as even by tossing a coin I can be right 50% of the time – although give me a strategy with an almost certain 100% win rate and I’ll obviously take a worse R/R ratio!

    Is the strategy that you say you are testing live ALE’s original strategy or another one that you have – if another one would you be able to share it for comparison purposes?

    #48631

    The higher the stoploss is the higher win percentage you will have, as you say. And often much better results. The problem is the DD that will occur, that can wipe us out. I agree with you that RR of 1:1 is minimal. For that reason I’m a bit hesitant to let the optimalization “decide” this values. I’ll try with some values I’ll like to live with, and run OOS without any optimalization. For the TP and SL.

    Here’s the code running live since May:

     

    #48642

    Ronny

     

    Then you have run algon live for 4 months now.

    Has it gone as you expected?

    In that case you can increase the position size as it looks stable 🙂

    #48662

    The results are in post 48533.

    #48665

    Thanks for sharing that Ronny. It looks very similar to what ALE first posted on this thread except with different fractal look back periods for upper and lower fractals and also with a candle body size condition that is not used. My quick backtest of it shows that it performed better in the past than recently which makes me think it may be a little over fitted. Different periods for upper and lower fractals rings alarm bells for fitting. The fractal period is my major concern with this strategy as it is the most likely thing to be fitted to past market movements. Having said that a wide range of cp numbers result in profit of some sort or other so it does still seem to be a method worth progressing with.

    Can I ask where you got that strategy from? Is there an old thread that I missed that I could read?

    #48669

    Tried to optimize usd/chf. Also tried WF with…. average results. Should mention I’m new to using that. Anyway, uploading results if anyone wants to use it.

    #48677

    Very good. Now you start using the WFA tool correctly. This makes it of course much more difficult to create a good strategy but it says so much more as a standard backtest.

    2 users thanked author for this post.
    #49247

    Bonjour à tous, Quelqu’un at-il eu la dernière version du code FBS qui fonctionne avec IG PRT.

    there are many different version. which is the most optimized? Thank you for your answers

    #49348

    Here is a GBPUSD 15M LONG
    version of the strategy (100,000 bars, backtest tick by tick, 2 point spread)

    With the reinvestment version with the Kasper code, in my example the risk per position is 2%

    Can you tell me what you think?
    If somebody would have time to do it with the version 200.000 bars this would be well. thank you

Viewing 15 posts - 286 through 300 (of 360 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login