Fractal breakout intraday Strategy EUR/USD 1H –

Viewing 15 posts - 256 through 270 (of 360 total)
  • Author
    Posts
  • #48223 quote
    ALE
    Moderator
    Master

    Yes of course are Numbers, but i find  good result using close bias..

    as you know,  close level it is a foundamental level in  trading letterature … not else

    #48224 quote
    ALE
    Moderator
    Master

    About typicalprice maybe that i have had test .. i dont remember

     

    as you know there’s infinite bias to entry in the market, the different could be to manage exit

    #48225 quote
    ALE
    Moderator
    Master

    In prt using ig data, it’s important to avoid strategy depending in tick data.

    #48275 quote
    Vonasi
    Moderator
    Master

    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.

    #48290 quote
    ozz87
    Participant
    Senior

    Vonasi: Could you upload that code? I tried to add RSI to a strategy but couldn’t get it to work…

    #48295 quote
    Vonasi
    Moderator
    Master

    I’m playing around with it at the moment but will try to post something when I’ve tidied it up a bit!

    ozz87 thanked this post
    #48301 quote
    Vonasi
    Moderator
    Master
    //EURUSD(-) - IG MARKET
    // TIME FRAME 1H
    // PROBACKTEST TICK by TICK - 200.000 bars
    // SPREAD 0.6 PIP
    // ALE - KASPER - modified by Vonasi
     
    DEFPARAM CumulateOrders = false
    
    CP = 101 //Fractal Period
    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
    
    //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=Capital
    MINpositionsize=1
    Positionsize= MAX(MINpositionsize,MIN(MAXpositionsize,abs(((maxrisk/StopLoss)))))
    else
    Positionsize=1
    StopLoss = Stoploss
    Endif
     
    ///BILL WILLIAM FRACTAL INDICATOR
    //CP=PERIOD
    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[2](RSI[2](Close)))/2
    RSILow = RSI2 < 20
    RSIHigh = RSI2 > 80
     
    //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 * 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 * 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
     
    // DONCHIAN STOP
    DC=20
    e= Highest[DC](high)
    f=Lowest[DC](low)
    if longonmarket  then
    laststop = f[1]
    endif
    if shortonmarket  then
    laststop = e[1]
    endif
    if onmarket then
    sell at laststop stop
    exitshort at laststop stop
    endif
     
    set target pprofit TakeProfit
    set stop loss stoploss*pointsize
    

    OK 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.

    #48313 quote
    ozz87
    Participant
    Senior

    Vonasi: Thanks! Trying to find what’s wrong when i try backtest, I don’t get any results (eur/usd mini, 1 hour)

    #48324 quote
    ALE
    Moderator
    Master

    Thanks 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.

    #48325 quote
    Vonasi
    Moderator
    Master

    Not sure why that would be ozz87. I’m on an IG PRT account – are you? Maybe something to do with CONTRACT. I’m no expert! – maybe someone else can help?

    #48326 quote
    ALE
    Moderator
    Master

    About 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 .

    #48327 quote
    ALE
    Moderator
    Master

    @ ozz what’s the problem?

    #48329 quote
    ALE
    Moderator
    Master

    I notice that Vonasi is using a different market ? It’s correct?

    #48330 quote
    Vonasi
    Moderator
    Master

    ALE – 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.

    #48336 quote
    ALE
    Moderator
    Master

    Very good

    a suggest ma because i’m using it with cumrsi2 in Other daily strategies.. but with 1 h tf I dont know, and i’m agre with you.

    as soon as possibile i start ti improve fravtal strategy..

Viewing 15 posts - 256 through 270 (of 360 total)
  • You must be logged in to reply to this topic.

Fractal breakout intraday Strategy EUR/USD 1H –


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
ALE @aleale Moderator
Summary

This topic contains 359 replies,
has 1 voice, and was last updated by RandyG
2 years, 6 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 04/16/2017
Status: Active
Attachments: 174 files
Logo Logo
Loading...