RSI14 & DAX 5 minutes trading system

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #45862 quote
    JR1976
    Participant
    Veteran

    TF 5 min on CFD DAX mini, only little backtest to validate the robusteness of the strategy

     

    //-------------------------------------------------------------------------
    // Codice principale : RSI14 _DAX 5min buono ... da ottimaizzare STOP e TARGET P
    //-------------------------------------------------------------------------
    ////////////////rsi14 DAX 5 min /////////////////////////////////
    ////  short backtest ///
    // ......
    
    DEFPARAM CumulateOrders=false
    
    DEFPARAM FLATBefore = 083000
    DEFPARAM FLATAfter = 170000
    
    REINV = 0// "0" REinvestment
    //levier = 1.5
    // SOLITAMENTE 2 contratti per questioni di margine solo 1
    levier = 2
    
    IF REINV = 0 THEN
    n = levier // pas de réinvestissement
    ENDIF
    
    IF REINV = 1 THEN // réinvestissement
    capital = 200 + strategyprofit
    n = (capital / 200) *levier
    ENDIF
    //n1 = n+2
    //if n > 200 then
    //n = 100
    //endif
    
    // Indicator
    Short = RSI[14](close) crosses under 25
    Long = RSI[14](close) crosses over 75
    MM200 = Average[200](Close)
    
    // SET UP MASTER TREND
    Long1 = DCLose(1) > MM200 and Close > DClose(1)
    Short1 = DClose(1) < MM200 and Close < DCLose(1)
    //
    // SET UP LONG
    //if Currentdayofweek <> 5 then
    IF not onmarket and long and Long1 then
    
    BUY n SHARES AT market
    
    endif
    
    ////// SET UP SHORT ////////////
    
    //if Currentdayofweek <> 5 then
    IF short and short1 then
    //IF cs1 and r1 and r3 then
    //IF cs1 and r1 and r3 then
    SELLSHORT n SHARES at market
    
    endif
    
    SET target pprofit 20
    SET STOP pLOSS 30
    1505033091pl4c8.png 1505033091pl4c8.png
    #46124 quote
    JR1976
    Participant
    Veteran

    Hello ,

    there is  something  to  help me and  to check the robustness of this strategy ? Backtest with 200k bar  or other check ?

     

    Thanks

    REgards

    #46465 quote
    Nicolas
    Keymaster
    Master

    Here are the results of this trading system over 200.000 bars. Not too bad, I used 2 points spread.

    DAX-5-minutes-automatic-trading-result.png DAX-5-minutes-automatic-trading-result.png detailed-report-trading-system.png detailed-report-trading-system.png
    #46472 quote
    JR1976
    Participant
    Veteran

    Hi Nicolas ,

    thanks an advance for your check

    Any suggestion from the Community  to optimize the equity line  and to reduce the Drawdown   ?

     

    Regards .

    #46495 quote
    Nicolas
    Keymaster
    Master

    The risk/reward ratio is 0.66, due to stoploss superior to takeprofit value. You should try to investigate first on this purpose to reduce the effect that multiple losses in the same row can have on the overall result. This is what happened during year 2015 in backtest.

    JR1976 thanked this post
    #46727 quote
    JR1976
    Participant
    Veteran

    HI Nicolas ,

    I tried to  insert a little check with current day of week  ,  less trade  but the equity line is optimize

    Follow the  code , what do you think ?

     

    //-------------------------------------------------------------------------
    // Codice principale : RSI14 _DAX 5min buono ... da ottimaizzare STOP e TARGET P
    //-------------------------------------------------------------------------
    ////////////////rsi14 DAX 5 min /////////////////////////////////
    //// Guadango costante
    // ......
    
    DEFPARAM CumulateOrders=false
    
    DEFPARAM FLATBefore = 083000
    DEFPARAM FLATAfter = 180000
    
    
    
    REINV = 0// "0" REinvestment
    //levier = 1.5
    // SOLITAMENTE 2 contratti per questioni di margine solo 1
    levier = 1
    
    IF REINV = 0 THEN
    n = levier // pas de réinvestissement
    ENDIF
    
    IF REINV = 1 THEN // réinvestissement
    capital = 200 + strategyprofit
    n = (capital / 200) *levier
    ENDIF
    //n1 = n+2
    //if n > 200 then
    //n = 100
    //endif
    x1 = n+1
    // Indicator
    //Short = RSI[14](close) crosses under 25
    Short = RSI[14](close) crosses under 25
    Long = RSI[14](close) crosses over 75
    MM200 = Average[200](Close)
    
    // SET UP MASTER TREND
    Long1 = DCLose(1) > MM200 and Close > DClose(1)
    Short1 = DClose(1) < MM200 and Close < DCLose(1)
    //
    // SET UP LONG
    if Currentdayofweek < 3 then
    IF not onmarket and long and Long1 then
    BUY x1 SHARES AT market
    endif
    endif
    if Currentdayofweek > 3 then
    IF not onmarket and long and Long1 then
    BUY n SHARES AT market
    endif
    endif
    
    
    
    ////// SET UP SHORT ////////////
    
    if Currentdayofweek <3 then
    IF short and short1 then
    //IF cs1 and r1 and r3 then
    //IF cs1 and r1 and r3 then
    SELLSHORT x1 SHARES at market
    
    endif
    endif
    if Currentdayofweek > 3 then
    IF short and short1 then
    //IF cs1 and r1 and r3 then
    //IF cs1 and r1 and r3 then
    SELLSHORT n SHARES at market
    
    endif
    endif
    
    //if longonmarket then
    //sell n shares at low -2 stop
    //endif
    
    
    
    SET target pprofit 20
    SET STOP pLOSS 30
    #46751 quote
    Nicolas
    Keymaster
    Master

    Please, once again, use the <> button to insert code into your post, thanks in advance 😉

    So depending of the day of the week, you are modulating your exposure?

    #46765 quote
    JR1976
    Participant
    Veteran

    I  only  check in the code >  if current day of week is less than 3  ,   buy 2 contract , else buy only 1 contract …

    But the result of the equity seems better than the previous code  …. Backtest  only for 100k bar , I  don t Know before …

    Regards

    #46777 quote
    Nicolas
    Keymaster
    Master

    Good thing about the pattern you spot for the strategy, but the RR is still inferior to 1, it doesn’t sounds good 😐

    #46924 quote
    JR1976
    Participant
    Veteran

    Suggest me your calculation  formula of the RR ?

    Thanks

    #47199 quote
    Nicolas
    Keymaster
    Master

    The risk reward ratio is calculated mathematically by dividing the amount of profit the trader expects to have made when the position is closed (the reward) to the amount the trader stands to lose if the price moves in the unexpected direction (the risk).
    So basically, in your case, divide the takeprofit by your stoploss: 20/30 = 0.66

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.

RSI14 & DAX 5 minutes trading system


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
JR1976 @jr1976 Participant
Summary

This topic contains 10 replies,
has 2 voices, and was last updated by Nicolas
8 years, 5 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 09/12/2017
Status: Active
Attachments: 3 files
Logo Logo
Loading...