Long/Short Waves trading system

Viewing 15 posts - 1 through 15 (of 23 total)
  • Author
    Posts
  • #123100 quote
    nepu77
    Participant
    Average

    THE INDICATOR IS A LONG SHORT SYSTEM FOR EVERY MARKET.

    I USE THIS FOR THE TRADING SYSTEM:

    // Festlegen der Code-Parameter
    DEFPARAM CumulateOrders = False // Kumulieren von Positionen deaktiviert
    // Bedingungen zum Einstieg in Long-Positionen
    indicator1, ignored = CALL WAVE
    c1 = (indicator1 >= 1)
    IF c1 THEN
    BUY 1 SHARES AT MARKET
    ENDIF
    // Bedingungen zum Einstieg in Short-Positionen
    ignored, indicator2 = CALL WAVE
    c2 = (indicator2 <= -1)
    IF c2 THEN
    SELLSHORT 1 SHARES AT MARKET
    ENDIF
    // Stops und Targets
    SET STOP %TRAILING 0.5

     

    Paul thanked this post
    15850384388pcl4.png 15850384388pcl4.png WAVE.itf 15850384388pcl4-1.png 15850384388pcl4-1.png WAVE-1.itf
    #123233 quote
    Nicolas
    Keymaster
    Master

    Hi nepu77, thanks for sharing your trading strategy code with us, this is very kind of you. I moved it from the pending post of the library to the forum because the code of indicator is not open source. If you don’t want to share the code, that’s not a problem for me, but it could be interesting to know how it is functioning in order to detect the waves you are using in order to enter the market. Thanks again.

    #123244 quote
    nonetheless
    Participant
    Master

    Do you have any back tests with tick by tick data?

    Edmond thanked this post
    #123249 quote
    nepu77
    Participant
    Average

    It is ok for me the share also the Code. I Need a bit help and I have now no Ideas to get it profitable. By Tickdata it does not work, but it Shows me it could be very interessting System.

    this is the Code:

    //COPYRIGHT ® BY JÜRGEN STRASSER; http://WWW.FUTURES-TRADING.INFO
    once bars = 1
    once block = 1
    if barindex >= block11 + block then
    block11 = 0
    endif
    if currentyear >=2021 and currentmonth >=01 then
    abschaltung = 1
    endif
    if barindex >= MyIndex + bars then
    MyLimitBuy = 0
    endif
     
    
    //////////////////////////////////////
    
    c2 = (close[2]>open[2])[0]
    c3 = close[1]<=open[1]
    c5 = highest[2](high)
    Newlow=10000000
    FOR a111 = 0 TO 4 DO
    IF low[a111]<Newlow THEN
    Newlow = low[a111]
    ENDIF
    NEXT
    c7 = c5[1]<high
    c10 =  Newlow<low[1] and Newlow<low[0]
    
    if block11 < 1 and abschaltung = 0   and (  MyLimitBuy <1 and c2 and c3 and c7    and c10)[0] then
    indi = 1
    MyLimitBuy = close
    MyIndex = barindex
    block11 = barindex
    else
    indi = 0
    endif
    
    a1 =  (close[3]>open[3])[0]
    a2 = close[2]<=open[2]
    a5 = highest[3](high)
    Newlow2=10000000
    FOR a222 = 0 TO 5 DO
    IF low[a222]<Newlow2 THEN
    Newlow2 = low[a222]
    ENDIF
    NEXT
    a7 = a5[1]<high
    a10 =  Newlow2<low[2] and Newlow2<low[1] and Newlow2<low[0]
    if block11 < 1 and abschaltung = 0   and ( MyLimitBuy <1 and a1 and a2   and a7  and a10 )[0] then
    indi2 = 1
    MyLimitBuy = close
    MyIndex = barindex
    block11 = barindex
    else
    indi2 = 0
    endif
    
    b1 = (close[4]>open[4])[0]
    b2 = close[3]<=open[3]
    b6 = highest[4](high)
    Newlow3=10000000
    FOR a333 = 0 TO 6 DO
    IF low[a333]<Newlow3 THEN
    Newlow3 = low[a333]
    ENDIF
    NEXT
    b8 = b6[1]<high
    
    b12 =  Newlow3< low[3] and Newlow3<low[2] and Newlow3<low[1] and Newlow3<low[0]
    if  block11 < 1 and abschaltung = 0   and ( MyLimitBuy <1 and b1 and b2   and b8  and b12 )[0] then
    indi3 = 1
    MyLimitBuy = close
    MyIndex = barindex
    block11 = barindex
    else
    indi3 = 0
    endif
    
    g1 =  close[5]>open[5]
    g2 = close[4]<=open[4]
    g7 = highest[5](high)
    Newlow4=10000000
    FOR a444 = 0 TO 7 DO
    IF low[a444]<Newlow4 THEN
    Newlow4 = low[a444]
    ENDIF
    NEXT
    g9 = g7[1]<high
    g12 =  Newlow4<low[4] and Newlow4<low[3] and Newlow4<low[2] and Newlow4<low[1] and Newlow4<low[0]
    if block11 < 1 and abschaltung = 0  and ( MyLimitBuy <1 and g1 and g2 and  g9   and g12 )[0] then
    indi7 = 1
    MyLimitBuy = close
    MyIndex = barindex
    block11 = barindex
    else
    indi7 = 0
    endif
    h1 =  (close[6]>open[6])[0]
    h2 = close[5]<=open[5]
    h8 = highest[6](high)
    Newlow5=10000000
    FOR a555 = 0 TO 8 DO
    IF low[a555]<Newlow5 THEN
    Newlow5 = low[a555]
    ENDIF
    NEXT
    h10 = h8[1]<high
    
    h13 =Newlow5<low[5] and  Newlow5<low[4] and Newlow5<low[3] and Newlow5<low[2] and Newlow5<low[1] and Newlow5<low[0]
    if block11 < 1 and abschaltung = 0 and ( MyLimitBuy <1 and h1 and h2  and h10   and h13 )[0] then
    indi8 = 1
    MyLimitBuy = close
    MyIndex = barindex
    block11 = barindex
    else
    indi8 = 0
    endif
    j1 =  (close[7]>open[7])[0]
    j2 = close[6]<=open[6]
    Newlow6=10000000
    FOR a666 = 0 TO 9 DO
    IF low[a666]<Newlow6 THEN
    Newlow6 = low[a666]
    ENDIF
    NEXT
    j8 = highest[7](high)
    
    j10 = j8[1]<high
    j13 = Newlow6<low[6] and Newlow6<low[5] and  Newlow6<low[4] and Newlow6<low[3] and Newlow6<low[2] and Newlow6<low[1] and  Newlow6<low[0]
    if block11 < 1 and abschaltung = 0   and ( MyLimitBuy <1 and j1 and  j2  and j10 and j13 )[0] then
    indi9 = 1
    MyLimitBuy = close
    MyIndex = barindex
    block11 = barindex
    else
    indi9 = 0
    endif
    
    n1 =  (close[8]>open[8])[0]
    n2 = close[7]<=open[7]
    n8 = highest[8](high)
    Newlow7=10000000
    FOR a777 = 0 TO 10 DO
    IF low[a777]<Newlow7 THEN
    Newlow7 = low[a777]
    ENDIF
    NEXT
    n10 = n8[1]<high
    
    n13 = Newlow7<low[7] and Newlow7<low[6] and Newlow7<low[5] and Newlow7<low[4] and Newlow7<low[3] and Newlow7<low[2] and Newlow7<low[1] and  Newlow7<low[0]
    if block11 < 1 and abschaltung = 0   and ( MyLimitBuy <1 and n1 and  n2  and n10   and n13 )[0] then
    indi10 = 1
    MyLimitBuy = close
    MyIndex = barindex
    block11 = barindex
    else
    indi10 = 0
    endif
    
    //return indi as “3er”, indi2 as “3er-2″, indi3 as”3er-3”,   indi7 as “3er-4”, indi8 as “3er-5”, indi9 as “3er-6”, indi10 as “3er-7”
    ////////////////////////////////////////////////
    hc2 =   (close[2]<open[2])[0]
    hc3 = close[1]>=open[1]
    hc5 = lowest[2](low)
    Newhighest=0
    FOR ha111 = 0 TO 4 DO
    IF High[ha111]>Newhighest THEN
    Newhighest = High[ha111]
    ENDIF
    NEXT
    
    hc7 = hc5[1]>low
    
    
    hc10 =   Newhighest>high[0]and Newhighest>high[1]
    if block11 < 1 and abschaltung = 0   and ( MyLimitBuy <1 and  hc2 and hc3  and hc7  and hc10 )[0] then
    hindi = 1
    MyLimitBuy = close
    MyIndex = barindex
    block11 = barindex
    else
    hindi = 0
    endif
    ha1 = (close[3]<open[3])[0]
    ha2 = close[2]>=open[2]
    ha5 = lowest[3](low)
    Newhighest2=0
    FOR ha222 = 0 TO 5 DO
    IF High[ha222]>Newhighest2 THEN
    Newhighest2 = High[ha222]
    ENDIF
    NEXT
    ha7 = ha5[1]>low
    
    ha10 =  high[2]<Newhighest2 and high[1]<Newhighest2 and high[0]<Newhighest2
    if block11 < 1 and abschaltung = 0   and( MyLimitBuy <1 and ha1 and ha2  and ha7   and ha10 )[0] then
    hindi2 = 1
    MyLimitBuy = close
    MyIndex = barindex
    block11 = barindex
    else
    hindi2 = 0
    endif
    
    hb1 = (close[4]<open[4])[0]
    hb2 = close[3]>=open[3]
    hb6 = lowest[4](low)
    
    hb8 =hb6[1]>low
    Newhighest3=0
    FOR ha333 = 0 TO 6 DO
    IF High[ha333]>Newhighest3 THEN
    Newhighest3 = High[ha333]
    ENDIF
    NEXT
    
    hb11 =  Newhighest3>high[3] and Newhighest3>high[2] and Newhighest3>high[1] and Newhighest3>high[0]
    if block11 < 1 and abschaltung = 0  and (MyLimitBuy <1 and hb1 and hb2  and hb8  and   hb11)[0] then
    hindi3 = 1
    MyLimitBuy = close
    MyIndex = barindex
    block11 = barindex
    else
    hindi3 = 0
    endif
    
    hg1 = (close[5]<open[5])[0]
    hg2 = close[4]>=open[4]
    hg7 = lowest[5](low)
    
    hg9 = hg7[1]>low
    Newhighest4=0
    FOR ha444 = 0 TO 7 DO
    IF High[ha444]>Newhighest4 THEN
    Newhighest4 = High[ha444]
    ENDIF
    NEXT
    
    hg12 =  Newhighest4>high[4] and Newhighest4>high[3] and Newhighest4>high[2] and Newhighest4>high[1] and Newhighest4>high[0]
    
    if block11 < 1 and abschaltung = 0   and ( MyLimitBuy <1 and hg1 and hg2 and hg9   and hg12 )[0] then
    hindi7 = 1
    MyLimitBuy = close
    MyIndex = barindex
    block11 = barindex
    else
    hindi7 = 0
    endif
    hh1 =  (close[6]<open[6])[0]
    hh2 = close[5]>=open[5]
    hh8 = lowest[6](low)
    Newhighest5=0
    FOR ha555 = 0 TO 8 DO
    IF High[ha555]>Newhighest5 THEN
    Newhighest5 = High[ha555]
    ENDIF
    NEXT
    hh10 = hh8[1]>low
    hh13 =  Newhighest5>high[5] and Newhighest5>high[4] and Newhighest5>high[3] and Newhighest5>high[2] and Newhighest5>high[1] and Newhighest5>high[0]
    
    if block11 < 1 and abschaltung = 0   and (MyLimitBuy <1 and hh1 and hh2   and hh10   and hh13 )[0] then
    hindi8 = 1
    MyLimitBuy = close
    MyIndex = barindex
    block11 = barindex
    else
    hindi8 = 0
    endif
    
    hi1 =  (close[7]<open[7])[0]
    hi2 = close[6]>=open[6]
    
    hi8 = lowest[7](low)
    Newhighest6=0
    FOR ha666 = 0 TO 9 DO
    IF High[ha666]>Newhighest6 THEN
    Newhighest6 = High[ha666]
    ENDIF
    NEXT
    hi10 = hi8[1]>low
    
    hi13 = Newhighest6>high[6] and Newhighest6>high[5] and Newhighest6>high[4] and Newhighest6>high[3] and Newhighest6>high[2] and Newhighest6>high[1] and Newhighest6>high[0]
    
    if block11 < 1 and abschaltung = 0  and ( MyLimitBuy <1 and hi1 and hi2  and hi10   and hi13 )[0] then
    hindi9 = 1
    MyLimitBuy = close
    MyIndex = barindex
    block11 = barindex
    else
    hindi9 = 0
    endif
    
    hj1 = (close[8]<open[8])[0]
    hj2 = close[7]>=open[7]
    
    hj9 = lowest[8](low)
    Newhighest7=0
    FOR ha777 = 0 TO 10 DO
    IF High[ha777]>Newhighest7 THEN
    Newhighest7 = High[ha777]
    ENDIF
    NEXT
    hj11 = hj9[1]>low
    
    hj13 = Newhighest7>high[7] and Newhighest7>high[6] and Newhighest7>high[5] and Newhighest7>high[4] and Newhighest7>high[3] and Newhighest7>high[2] and Newhighest7>high[1] and Newhighest7>high[0]
    
    if block11 < 1 and abschaltung = 0   and ( MyLimitBuy <1 and hj1 and hj2  and hj11  and hj13 )[0] then
    hindi10 = 1
    MyLimitBuy = close
    MyIndex = barindex
    block11 = barindex
    else
    hindi10 = 0
    endif
    //return indi as “3er”, indi2 as “3er-2″, indi3 as”3er-3”, indi7 as “3er-4”, indi8 as “3er-5″, indi9 as”3er-6”, indi10 as “3er-7”
    
    if abschaltung = 0 and timer1 = 1 and  longindex >=1 and close[2]<open[2] and close[1]>open[1]  then
    all = lowest[3](low)
    endif
    if abschaltung = 0 and timer1 = 1 and  shortindex >=1 and close[2]>open[2] and close[1]<open[1] then
    al2 = highest[3](high)
    endif
    
    if barindex >= timer + 3 then
    timer1 = 1
    endif
    once longindex =0
    once shortindex =0
    
    once barslong = 50000
    once barsshort = 50000
    if  not shortindex >=1  and abschaltung = 0 and  (hindi=1 OR hindi10=1 OR hindi2=1 OR hindi3=1 OR hindi7=1 OR hindi8=1 OR hindi9=1 )  then
    timer1 = 0
    timer = barindex
    al2 = highest[10](high)
    shortindex = Barindex
    longindex = 0
    pause = 0
    endif
    if shortindex >=1 and CLOSE>al2[0] and not longindex >=1and abschaltung = 0 then
    shortindex = 0
    pause = 1
    endif
    IF BarIndex >= shortindex + barsshort THEN
    shortindex = 0
    ENDIF
    
    if  not longindex >=1 and abschaltung = 0 and (indi=1 OR indi2=1 OR indi3=1 OR indi7=1 OR indi8=1 OR indi9=1 OR indi10=1) then
    timer1 = 0
    timer = barindex
    all = lowest[10](low)
    longindex = Barindex
    shortindex = 0
    pause = 0
    endif
    if longindex >=1 and CLOSE<all[0] and not shortindex >=1and abschaltung = 0 then
    longindex =0
    pause = 1
    endif
    IF BarIndex >= longindex + barslong THEN
    longindex = 0
    ENDIF
    
    vc3 = highest[10](high)
    vc4 = lowest[10](low)
    if pause = 1 and vc3[1]<high and abschaltung = 0 then
    timer1 = 0
    timer = barindex
    longindex = barindex
    all = lowest[5](low)
    shortindex = 0
    pause = 0
    endif
    if pause = 1 and vc4[1]>low and abschaltung = 0 then
    timer1 = 0
    timer = barindex
    shortindex = barindex
    al2 = highest[5](high)
    longindex = 0
    pause = 0
    endif
    if not longindex >=1 and shortindex >=1 and high>vc3[1]  and abschaltung = 0 then
    timer1 = 0
    timer = barindex
    longindex = barindex
    shortindex = 0
    all = lowest[10](low)
    pause = 0
    endif
    if not shortindex >=1 and longindex >=1 and low<vc4[1] and abschaltung = 0 then
    timer1 = 0
    timer = barindex
    shortindex = barindex
    longindex = 0
    al2 = highest[10](high)
    pause = 0
    endif
    if   longindex >=1 and abschaltung = 0 then
    long =1
    endif
    if  longindex=0 and abschaltung = 0 then
    long =0
    endif
    if   shortindex >=1 and abschaltung = 0 then
    short = -1
    endif
    if  shortindex =0 and abschaltung = 0 then
    short = 0
    endif
    if long = 1 and  abschaltung = 0 then
    BACKGROUNDCOLOR (255,255,0,25)
    drawtext(“▪”,barindex,all[0],dialog,standard,10) coloured(255,0,0,50)
    endif
    if short = -1 and  abschaltung = 0 then
    BACKGROUNDCOLOR (255,0,0,25)
    drawtext(“▪”,barindex,al2[0],dialog,standard,10) coloured(255,0,0,50)
    endif
    return long as “long”, short as “short”

     

    Paul and Edmond thanked this post
    #123258 quote
    robertogozzi
    Moderator
    Master

    >> For clarity of messages on ProRealCode’s forums, please use the “insert code PRT” button to separate the text of the code part! Thank you! <<
    🙂

    #123273 quote
    GraHal
    Participant
    Master

    it does not work

    You know it’s an Indicator right? Not an Auto-System?

    Anyway attached is the code working as an Auto-System with results attached .

    Spread = 2 so it would not make any money currently (without changes) as spread = 10 ish on the DJI.

    Strass.jpg Strass.jpg STRASSER-DJI-H4-v1.itf
    #123281 quote
    Paul
    Participant
    Master

    @nepu77 a very interesting concept! Thanks for posting.

    #123285 quote
    Edmond
    Participant
    Veteran

    Thank you very much for the concept Nepu. Be careful, as pointed out Nonetheless, your backtest is not in tick by tick. Attached is the backtest of your initial strategy on Dax in daily.

    Sorry, my mistake, you were on the DJ, which is much better. Attached in tick by tick

    Tick-by-tick.png Tick-by-tick.png DJ-in-tick-by-tick.png DJ-in-tick-by-tick.png
    #123288 quote
    GraHal
    Participant
    Master

    Attached in tick by tick

    Are we all talking about the Long / Short Waves Systems here or what?? 🙂

    #123295 quote
    Edmond
    Participant
    Veteran

    Yes Grahal, sorry if my message is not clear, I edited it. I used the code of the strategy indicated in the first post + the indicator Wave-1.itf on DJ, daily, spread 2 in tick by tick.

    DJ-Day.png DJ-Day.png
    #123297 quote
    nepu77
    Participant
    Average

    The System I have written Comes from Elliottwave or in Germany there is “Markttechnik” but with new Ideas.

    When you use the 1 Day Chart, you have on every Market 80% of the Day-Range. This is a Backtest with 0.5% Takeprofit.

    I think  that´s very very good. But it is Nothing to earn Money and that´s not what i can understand.

    So I think we only Need a good way for Stops

    1.png 1.png
    #123299 quote
    Francesco
    Participant
    Veteran

    @nepu77 as the other guys told you, i also suggest to do your backtests enabling the tick by tick mode.

    #123301 quote
    nepu77
    Participant
    Average

    And how you can see i am not a good coder , and i have no ideas anymore to get a super system

    #123372 quote
    Roger
    Participant
    Veteran

    I have managed to backtest by tick by tick mode, only from August 2018 to today.

    Before August 2018 there must be some “data holes” that generate errors…

    Here is the result attached. I modified the trailing stop to 0.25%

    Basically it takes position every night and cut the loss very quickly. I dont know what to think.

    @nepu77 did you create the code for the indicator yourself ?

    waves.png waves.png
    #123376 quote
    nepu77
    Participant
    Average

    @Roger thank you … this are the Tipps I Need .

    Yes it is all by my own … also the idea

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

Long/Short Waves trading system


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
nepu77 @nepu77 Participant
Summary

This topic contains 22 replies,
has 9 voices, and was last updated by nepu77
5 years, 10 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 03/25/2020
Status: Active
Attachments: 16 files
Logo Logo
Loading...