Triple EMA RSI Optimised Strategy

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #130343 quote
    boonet
    Participant
    Senior

    Optimised Triple EMA cross strategy which checks for bullish or bearish trend for buying or shorting.

    I am also using the RSI criteria to sell or buy contracts when oversold or overbought.

    Replace x,y,z values with EMA values which work best for your instrument.

    This is a winner on FTSE 100 stocks with over 70% winnings with only £500 account balance

    This is a simple but effective program written by me as a newbie. Feel free to use it and feedback with any improvements.

    Triple_EMA_Cross_RSI_Optima_V1.itf
    #130345 quote
    Francesco
    Participant
    Veteran

    Code is not available, probably you protected it during the export from the platform.
    Please write it here throguh the “Insert PRT Code” option, and tell us on which timeframe should it work on.

    robertogozzi thanked this post
    #130347 quote
    boonet
    Participant
    Senior
    // Triple EMA RSI Optimised
    //Naveen Reddy Ala
    //Optimised Triple MA Crossing
    //Trend Following
    //FTSE 100(UKX) 15M Recommended Values of x,y,z -
     
    //Gainers - (7,49,55)
    //Winners (7,50,55)
    //Gainer & Winner - (9,39,55)
    //Favourites - 7,48,55
    // Spread 2
    
    
    amount=1
    
    //x=9
    //y=39
    //z=55
    
    
    //BUY LONG
    indicator1 = exponentialAverage[x](close)
    indicator2 = exponentialAverage[y](close)
    trendEMA =exponentialAverage[z](close)
    bullish = indicator1 crosses over trendEMA
    bearish = indicator1 crosses under trendEMA
    myRSI = RSI[14](close)
    SmoothRSI = Average[10](myRSI)
    myRSI = RSI[14](close)
    SmoothRSI = Average[10](myRSI)
    overbought = SmoothRSI >= 90
    oversold = SmoothRSI <= 15
    //
    c1 = (indicator1 crosses over indicator2)
    
    IF c1 THEN
    IF bullish then
    BUY amount shares AT MARKET nextbaropen
    ENDIF
    ENDIF
    
    If LONGONMARKET and overbought then
    SELL  AT MARKET nextbaropen
    ENDIF
    
    
    
    //SELL LONG
    indicator3 = exponentialAverage[x](close)
    indicator4 = exponentialAverage[y](close)
    trendEMA =exponentialAverage[z](close)
    bullish = indicator1 crosses over trendEMA
    bearish = indicator1 crosses under trendEMA
    c2 = (indicator3 CROSSES UNDER indicator4)
    
    IF c2 THEN
    IF bearish then
    SELL  AT MARKET nextbaropen
    ENDIF
    ENDIF
    
    //SELL SHORT
    indicator5 = exponentialAverage[x](close)
    indicator6 = exponentialAverage[y](close)
    trendEMA =exponentialAverage[z](close)
    bullish = indicator1 crosses over trendEMA
    bearish = indicator1 crosses under trendEMA
    c3 = (indicator5 CROSSES UNDER indicator6)
    
    IF c3 THEN
    IF bearish then
    SELLSHORT amount shares AT MARKET nextbaropen
    ENDIF
    ENDIF
    
    
    //Exit SHORT
    indicator7 = exponentialAverage[x](close)
    indicator8 = exponentialAverage[y](close)
    trendEMA =exponentialAverage[z](close)
    bullish = indicator1 crosses over trendEMA
    bearish = indicator1 crosses under trendEMA
    c4 = (indicator7 CROSSES OVER indicator8)
    
    IF c4 THEN
    IF bullish then
    EXITSHORT  AT MARKET nextbaropen
    ENDIF
    ENDIF
    
    IF SHORTONMARKET and oversold then
    EXITSHORT AT MARKET
    ENDIF
    
    //SET STOP %LOSS 20
    //SET TARGET pPROFIT 200
    
    robertogozzi thanked this post
    Triple_EMA_Cross_RSI_Optima_V1-1.itf V1.png V1.png
    #130354 quote
    robertogozzi
    Moderator
    Master

    Thank you boonet for your contribution. It’ s a good start

    A couple of suggestions:

    • performance looks extremely high due to an insufficient initial Capital, €500 is not enough for a drawdown of €800 (+ margin requirements), 5K€ would be a better choice (and balance performance will be ten times less)
    • backtest period is so small, try using 100K units

    Moreover, did you select the tick-by-tick mode?

    boonet thanked this post
    #130383 quote
    Francesco
    Participant
    Veteran

    Very bad on 200k; you overoptimized the system on a very short backtest time range and an highly ruinous strategy results

    1-10.jpg 1-10.jpg 2-9.jpg 2-9.jpg
    #130429 quote
    Nicolas
    Keymaster
    Master

    Use Out Of Sample validation by using the walk forward analysis tool available in the optimization window, it will surely be an eye opener for you about what is overfitting.

    boonet thanked this post
    #130529 quote
    boonet
    Participant
    Senior

    Yes, I ran the test using the tick-by-tick mode.

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

Triple EMA RSI Optimised Strategy


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
boonet @boonet Participant
Summary

This topic contains 6 replies,
has 4 voices, and was last updated by boonet
5 years, 9 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 05/06/2020
Status: Active
Attachments: 5 files
Logo Logo
Loading...