RSI and IBS based EA

Forums ProRealTime Deutsch forum ProOrder Support RSI and IBS based EA

  • This topic has 14 replies, 5 voices, and was last updated 5 years ago by avatarMarc.
Viewing 15 posts - 1 through 15 (of 15 total)
  • #53697

    Hi together,

    I’d like to share my code with you and want to know if there is any mistake within this code?

    Here are the rules for this system:

    Enter Long when:

    • When RSI with Period 2 is below or equal 10 on previous periods close
    • When RSI with Period 2 is above or equal 10 at close of current periods close
    • When IBS is below or equal 50 on previous periods close
    • When IBS is above or equal 50 at close of current period
    • Open Long at next bar open

    Exit Long when:

    • RSI rises above 80 at close of previous period, close position at next bar open

    Enter Short when:

    • When RSI with Period 2 is above or equal 90 on previous periods close
    • When RSI with Period 2 is below or equal 90 at close of current periods close
    • When IBS is above or equal 50 on previous periods close
    • When IBS is below or equal 50 at close of current period
    • Open Short at next bar open

    Exit Short when:

    • RSI falls below 20 at close of previous period, close position at next bar open

     

    Here is the code:

    //INDICATOR
    IBS = (Close-Low) / (HIGH-LOW) * 100
    RSI2 = RSI[2](close)

    //SIGNAL
    IBSLONGTRIGGER = 50
    IBSSHORTTRIGGER = 50

    RSILONGTRIGGER = 10
    RSILONGEXIT = 80
    RSISHORTTRIGGER = 90
    RSISHORTEXIT = 20

    //ENTRY CONDITION
    l1 = not LongOnMarket
    l1 = l1 and IBS[1] >= IBSLONGTRIGGER[1] and IBS[2] <= IBSLONGTRIGGER[2] and RSI2[1] >= RSILONGTRIGGER[1] and RSI2[2] <= RSILONGTRIGGER[2]

    b1 = not ShortOnMarket
    b1 = b1 and IBS[1] <= IBSSHORTTRIGGER[1] and IBS[2]>= IBSSHORTTRIGGER[2] and RSI2[1] <= RSISHORTTRIGGER[1] and RSI2[2] >= RSISHORTTRIGGER[2]

    //EXIT CONDITION
    l2 = LongOnMarket
    l2 = RSI2[1] >= RSILONGEXIT[1]

    b2 = ShortOnMarket
    b2 = RSI2[1] <= RSISHORTEXIT[1]

    //LONG ENTRY
    IF NOT LongOnMarket AND l1 THEN
    BUY 1 CONTRACTS AT MARKET NextBarOPen
    ENDIF

    //LONG EXIT
    If LongOnMarket AND l2 THEN
    SELL AT MARKET NextBarOpen
    ENDIF

    //SHORT ENRTRY
    IF NOT ShortOnMarket AND b1 THEN
    SELLSHORT 1 CONTRACTS AT MARKET NextBarOpen
    ENDIF

    //SHORT EXIT
    IF ShortOnMarket AND b2 THEN
    EXITSHORT AT MARKET NextBarOpen
    ENDIF

    #53699

    Code amended…

     

    //INDICATOR
    IBS = (Close-Low) / (HIGH-LOW) * 100
    RSI2 = RSI[2](close)

    //SIGNAL
    IBSLONGTRIGGER = 50
    IBSSHORTTRIGGER = 50

    RSILONGTRIGGER = 10
    RSILONGEXIT = 80
    RSISHORTTRIGGER = 90
    RSISHORTEXIT = 20

    //ENTRY CONDITION
    l1 = not LongOnMarket
    l1 = l1 and IBS[1] >= IBSLONGTRIGGER[1]
    l1 = l1 and IBS[2] <= IBSLONGTRIGGER[2]
    l1 = l1 and RSI2[1] >= RSILONGTRIGGER[1]
    l1 = l1 and RSI2[2] <= RSILONGTRIGGER[2]

    b1 = not ShortOnMarket
    b1 = b1 and IBS[1] <= IBSSHORTTRIGGER[1]
    b1 = b1 and IBS[2]>= IBSSHORTTRIGGER[2]
    b1 = b1 and RSI2[1] <= RSISHORTTRIGGER[1]
    b1 = b1 and RSI2[2] >= RSISHORTTRIGGER[2]

    //EXIT CONDITION
    l2 = LongOnMarket
    l2 = l2 and RSI2[1] >= RSILONGEXIT[1]

    b2 = ShortOnMarket
    b2 = b2 and RSI2[1] <= RSISHORTEXIT[1]

    //LONG ENTRY
    IF l1 THEN
    BUY 1 CONTRACTS AT MARKET NextBarOpen
    ENDIF

    //LONG EXIT
    If l2 THEN
    SELL AT MARKET NextBarOpen
    ENDIF

    //SHORT ENRTRY
    IF b1 THEN
    SELLSHORT 1 CONTRACTS AT MARKET NextBarOpen
    ENDIF

    //SHORT EXIT
    IF b2 THEN
    EXITSHORT AT MARKET NextBarOpen
    ENDIF

    #53715

    Deutsch im deutschen Forum, englisch im englischen Forum. 🙂

    #53718

    okay…danke für die Info…

    #53761

    für welches finanzinstrument möchtest du diese strategie anwenden – ausserdem noch interessant in welchem zeitfenster soll es laufen?

    #53772

    Hey Mast,

    folgendes ist mir aufgefallen:

    Meinst Du soetwas?

    #53775

    Hallo zusammen, also natürlich möchte ich möglichst beliebige Instrumente handeln. Den TF sehe ich bei 1h, 4h und 1D, wobei es interessant wäre dies auch unter 2h zu testen. 

    Sicher würde es, je nach Instrument dann auch Sinn machen Zeiten fest zu legen wann gehandelt werden soll.

    Aktuell nutze ich eine Demo mit EOD Daten und wollte mal die 14 Tage Version nutzen um eben kleinere TF zu testen.

    bzgl des codeschnipsels muss ich mich mal rein denken…habe gestern erst angefangen mich mit prorealcode zu befassen.

     

    vg marc

    #53795

    Ich habe übrigens den Code ein wenig geändert…

    Hier ist nun ein MA-Filter drin:

    //INDICATOR
    IBS = (Close-Low) / (HIGH-LOW) * 100
    RSI2 = RSI[2](close)
    MA = average[maperiod](close)

    //CONTRACTSIZE
    X = 10

    //MOVING AVERAGE PERIOD
    maperiod = 144

    //SIGNAL
    IBSLONGTRIGGER = 50
    IBSSHORTTRIGGER = 50

    RSILONGTRIGGER = 10
    RSILONGEXIT = 80
    RSISHORTTRIGGER = 90
    RSISHORTEXIT = 20

    //ENTRY CONDITION
    l1 = NOT LongOnMarket
    l1 = l1 and IBS > IBSLONGTRIGGER
    l1 = IBS[1] < IBSLONGTRIGGER[1]
    l1 = l1 and RSI2 > RSILONGTRIGGER
    l1 = RSI2[1] < RSILONGTRIGGER[1]
    l1 = l1 and low[1] > MA

    b1 = NOT ShortOnMarket
    b1 = b1 and IBS < IBSSHORTTRIGGER
    b1 = IBS[1] > IBSSHORTTRIGGER[1]
    b1 = b1 and RSI2 < RSISHORTTRIGGER
    b1 = RSI2[1] > RSISHORTTRIGGER[1]
    b1 = b1 and high [1] < MA

    //EXIT CONDITION
    l2 = LongOnMarket
    l2 = RSI2 > RSILONGEXIT

    b2 = ShortOnMarket
    b2 = RSI2 < RSISHORTEXIT

    //LONG ENTRY
    IF l1 THEN
    BUY X CONTRACTS AT MARKET NextBarOpen
    ENDIF

    //LONG EXIT
    If l2 THEN
    SELL X CONTRACTS AT MARKET NextBarOpen
    ENDIF

    //SHORT ENTRY
    IF b1 THEN
    SELLSHORT X CONTRACTS AT MARKET NextBarOpen
    ENDIF

    //SHORT EXIT
    IF b2 THEN
    EXITSHORT AT MARKET NextBarOpen
    ENDIF

    #53846

     

     

    1 user thanked author for this post.
    #53876

    Hi Maste 

     

    habs mal im dow im m1 durchgezogen

    PF 1,16

    TQ 70 %

    6000 Trades aber crv 1:2,  4€ GW : 9,5, € verlust

     

    im H1 PF 0,6

    crv von 1:4 

     

    Gruß

    #54236

    Hallo axmichi,

    Berauschend ist das nicht…wahrscheinlich ist 1 Minute klein als TF um da wirklich aussagekräftige Ergebnisse zu bekommen. Im Dax lief es beim Taily TF ganz gut mit einem ordentlichen PF von 3,96.

    ich habe mal die trialversiob mit Echtzeitdaten bzw. den untertägigen Daten freischalten lassen und teste es mal heute selber aus.

    Das Grundgerüst dieses Systems beruht auf der Idee von Larry Williams RSI2a-Strategie.

     

    vg Marc 

    #54244

    Du weißt das du traillingstops usw, nicht mehr verwenden brauchst, da sie nicht mehr greifen, akzeptiert werden. Thema garantierte Stops

    #54259

    Du weißt das du traillingstops usw, nicht mehr verwenden brauchst, da sie nicht mehr greifen, akzeptiert werden. Thema garantierte Stops

    Auf Stopps habe ich mich seltenst verlassen dürfen. Ich benutze da lieber valide Signale…wie im o.g. System

    #76827

    Gedächtnisstütze:
    Einige Parameter angepasst:
    RSI Close mit HA-Berechnung

     

    #77781

    here antoher code with some variables for testing.

     

Viewing 15 posts - 1 through 15 (of 15 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login