RSI_BB_Long 5min trading strategy

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

    My First code …

    EUR/USD mini ,Timeframe 5 min

    Only Long ,  and check RSI , Bollinger Band  with reinvestm. profit

    //////   RSI_BB_LONG  /////
    
    DEFPARAM CumulateOrders=False
    DEFPARAM FLATBefore = 083000
    DEFPARAM FLATAfter  = 120000
    
    
    REINV = 1 // set-up 0  for not reinvest.
    
    levier = 5
    
    
    
    IF REINV = 0 THEN
    n = levier
    ENDIF
    
    IF REINV = 1 THEN  // Reinvest capital
    capital = 2000 + strategyprofit
    n = (capital / 200) *levier
    ENDIF
    
    if n > 30 then
    n = 30
    endif
    
    // Variable
    
    c3  =  Low  <  Bollingerdown
    c4  =  Low[1]  <  Bollingerdown
    c6 =  Close   < Open
    c7 =  Close[1]   < Open[1]
    
    MM15 =  ExponentialAverage[20](close)
    // Range
    
    r1 = range[1] > range
    
    c1 = RSI[10] < 30
    
    
    IF c1  and c3 and c4   and c6 and c7 and r1 and  not  ONMARKET    THEN
    BUY n SHARES AT  High Stop
    //BUY 1 SHARES AT HIGH STOP
    //SET STOP %LOSS 0.8
    //SET TARGET $PROFIT 15
    
    ENDIF
    
    
    IF longonmarket   and  high > MM15   THEN
    SELL   AT MARKET
    ENDIF
    
    SET STOP %LOSS 0.4
    

    and somenthing else

    The Back test  is good  but only one year  back

    welcome your fdb

    14738697084cp8l1.png 14738697084cp8l1.png
    #13116 quote
    Nicolas
    Keymaster
    Master

    Hello JR1976,

    Thanks for your contribution, I have moved your post from the Library pending list to the forum.

    My test shows that the strategy isn’t so good before the last year. Did you include the spread in your backtests?

    Your idea is good : taking long position while piercing the lowest bollinger band, but while it is very effective in ranging market (price revert to its mean), it is not the case in trending one, that’s the main reason I believe it doesn’t perform well before 2015.

    rsi-bollinger-bands-trading-system-dont-perform-well.png rsi-bollinger-bands-trading-system-dont-perform-well.png
    #13121 quote
    JR1976
    Participant
    Veteran

    Hi Nicolas ,

    Thanks for your consultant , I confirm I used the spread 1 point

    regards.

    #13149 quote
    JR1976
    Participant
    Veteran

    HI Nicolas,

    I’am checked there is an error in the  code , because not start the levrier

    This the rule correct
    IF REINV = 1

    THEN  // Reinvest capital
    capital = 200 + strategyprofit
    n = (capital / 200) *levier
    ENDIF

    Could you please  check If  should be better  before 2015 ?

    #13155 quote
    JR1976
    Participant
    Veteran

    HI ,

    I tried to optimized   the code  to avoid the trend period …   the new variable is  to trade  IF

    c8 = dailyhigh > Dhigh(50)
    dailyHigh = DHigh(1)

    Could you please backtest 2014  to  complete the check  ??

    /////   RSI_BB_LONG_Pr  /////
    
    DEFPARAM CumulateOrders=False
    DEFPARAM FLATBefore = 083000
    DEFPARAM FLATAfter  = 120000
    
    REINV = 1 // set-up 0  for not reinvest.
    
    levier = 2
    
    IF REINV = 0 THEN
    n = levier
    ENDIF
    
    IF REINV = 1 THEN  // Reinvest capital
    capital = 200 + strategyprofit
    n = (capital / 150) *levier
    ENDIF
    
    if n > 30 then
    n = 30
    endif
    
    // Variable
    c1 = RSI[10] < 30
    c3  =  Low  <  Bollingerdown
    c4  =  Low[1]  <  Bollingerdown
    c6 =  Close   < Open
    c7 =  Close[1]   < Open[1]
    //new
    c8 = dailyhigh > Dhigh(50)
    dailyHigh = DHigh(1)
    
    MM15 =  ExponentialAverage[20](close)
    //MM100 =  ExponentialAverage[100](Dailyhigh)
    // Range
    
    r1 = range[1] > range
    IF c1  and c3 and c4   and c6 and c7 and r1 and  c8 and  not  ONMARKET    THEN
    BUY n SHARES AT  High Stop
    //BUY 1 SHARES AT HIGH STOP
    //SET STOP %LOSS 0.8
    //SET TARGET $PROFIT 15
    
    ENDIF
    IF longonmarket   and  high > MM15   THEN
    SELL   AT MARKET
    ENDIF
    
    SET STOP %LOSS 0.4
    #13159 quote
    Nicolas
    Keymaster
    Master

    I’m sorry, it is still not good. Please use the “Insert PRT code” when you add codes in your post, thank you.

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

RSI_BB_Long 5min trading strategy


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
JR1976 @jr1976 Participant
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 09/15/2016
Status: Active
Attachments: No files
Logo Logo
Loading...