RSI-EMA EurUsd M15

Viewing 15 posts - 46 through 60 (of 80 total)
  • Author
    Posts
  • #173178 quote
    phoentzs
    Participant
    Master

    My backtest looks different. You have some attitude different.

    #173205 quote
    OboeOpt
    Participant
    Veteran

    Did you change the time setting?

    I don´t get how to change the time setting unfortunately…

    IF Time >= h1 AND Time <= h2 THEN
    Shouldn´t there be h1 = 010000 somewhere for example?

    #173206 quote
    GraHal
    Participant
    Master

    Did you look in the variables settings in the Optimiser?

    You need None’s time settings (for UK ) to read as the equivalent / same time in your country.

    OboeOpt thanked this post
    #173207 quote
    OboeOpt
    Participant
    Veteran

    Aah didn´t Think about that it was variables in the optimizer…

    #173212 quote
    phoentzs
    Participant
    Master

    Why is nobody telling me that this strategy might work well in some indices as well? 😉

    #173227 quote
    nonetheless
    Participant
    Master

    there’s an error in the code that i posted, this should work slightly better

    GraHal and phoentzs thanked this post
    #173232 quote
    murre87
    Participant
    Senior

    Do u find this values good?

    #173239 quote
    VinzentVega
    Participant
    Veteran

    Attached backtest with some modifications. Test period from 1/1018 – 3/2021

    GraHal and phoentzs thanked this post
    #173250 quote
    phoentzs
    Participant
    Master

    Thank you for your interest. But I’m not sure if this version is over-optimized. Tonight I will test over all 200000bars. The good thing about the original version is that it has consistently won over the years.

    #173257 quote
    VinzentVega
    Participant
    Veteran

    Possibility of over-optimizitaion is always omnipresent. I always finish my backtests 3 or 4 months before the current date. And then I check if the algo works under non-optimized conditions.

    #173262 quote
    phoentzs
    Participant
    Master

    From the performance data and the small drawdown, I would prefer my V2 from post # 173131. Over 200000bars great, but over 1000000bars not so good. In terms of durability, the original version and the version by Yet are arguably the best.

    #175654 quote
    jth82
    Participant
    Average

    With a few modifications this potentially works quite well on the US Crude market also. My PRT/IG only has price data as far back as February 2020 however so not sure how well it does in a longer backtest.

    (Edit – Times in the code are London time)

    //-------------------------------------------------------------------------
    // Hauptcode : #KISS RSI5 US Crude M15
    //Spread = 2.8
    //-------------------------------------------------------------------------
    DEFPARAM CumulateOrders = false
    defparam preloadbars = 2000
     
    Nlong = 1
    Nshort = 1
     
    MAXSHARES = abs(COUNTOFPOSITION) <= 1
     
    //EMA-Trend
    EMA1 = ExponentialAverage[60](close)
    EMA3 = ExponentialAverage[60](close)
     
    EMAlong = close > EMA3
    EMAshort = close < EMA3
     
    steigunglong = EMA1 > EMA1[1]
    steigungshort = EMA1 < EMA1[1]
     
    myATR = AverageTrueRange[50](close)
     
    //RSI5-Eingang
    myRSI = RSI[5](close)
    rsilong = (myRSI[1] > 35) and (myRSI < 35)
    rsishort = (myRSI[1] < 70) and (myRSI > 70)
     
    rsilongraus = myRSI > 80
    rsishortraus = myRSI < 15
     
    IF Time >= 000000 AND Time <= 210000 THEN
     
    IF rsilong and EMAlong and steigunglong and MAXSHARES THEN
    BUY Nlong shares at market
    SET STOP LOSS myATR*7
    Set target profit myATR*7
    ENDIF
     
    IF rsishort and EMAshort and steigungshort and MAXSHARES THEN
    sellshort Nshort shares at market
    SET STOP LOSS myATR*8
    Set target profit myATR*8
    ENDIF
    endif
     
    if longonmarket and rsilongraus then
    sell at market
    endif
    if shortonmarket and rsishortraus then
    exitshort at market
    endif
     
    if time = 210000 and dayofweek = 5 then
    sell at market
    EXITSHORT at market
    endif
     
    //************************************************************************
    //trailing stop function
    trailingstartL = 30 // trailing will start @trailinstart points profit
    trailingstartS = 35 // trailing will start @trailinstart points profit
    trailingstepL = 5 // trailing step to move the "stoploss"
    trailingstepS = 5 // trailing step to move the "stoploss"
    //reset the stoploss value
    IF NOT ONMARKET THEN
    newSL=0
    ENDIF
    //manage long positions
    IF LONGONMARKET THEN
    //first move (breakeven)
    IF newSL=0 AND close-tradeprice(1)>=trailingstartL*pipsize THEN
    newSL = tradeprice(1)+trailingstepL*pipsize
    ENDIF
    //next moves
    IF newSL>0 AND close-newSL>=trailingstepL*pipsize THEN
    newSL = newSL+trailingstepL*pipsize
    ENDIF
    ENDIF
    //manage short positions
    IF SHORTONMARKET THEN
    //first move (breakeven)
    IF newSL=0 AND tradeprice(1)-close>=trailingstartS*pipsize THEN
    newSL = tradeprice(1)-trailingstepS*pipsize
    ENDIF
    //next moves
    IF newSL>0 AND newSL-close>=trailingstepS*pipsize THEN
    newSL = newSL-trailingstepS*pipsize
    ENDIF
    ENDIF
    //stop order to exit the positions
    IF newSL>0 THEN
    SELL AT newSL STOP
    EXITSHORT AT newSL STOP
    ENDIF
    #175656 quote
    phoentzs
    Participant
    Master

    Do you have a picture of the backtest? I don’t have a laptop here to look at your strategy.

    #175657 quote
    jth82
    Participant
    Average

    Backtest with £1/point on UK spread bet demo account.

     

    Feb 2020 is as far as PRT will let me go on US Crude 15m unfortunately.

    #175659 quote
    phoentzs
    Participant
    Master

    That doesn’t look bad. Start in demo and see if it works that well.

Viewing 15 posts - 46 through 60 (of 80 total)
  • You must be logged in to reply to this topic.

RSI-EMA EurUsd M15


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
phoentzs @phoentzs Participant
Summary

This topic contains 79 replies,
has 14 voices, and was last updated by fifi743
2 years, 11 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 05/17/2021
Status: Active
Attachments: 24 files
Logo Logo
Loading...