Strategy DayOpen Straddle for DAX

Viewing 15 posts - 1 through 15 (of 242 total)
  • Author
    Posts
  • #84123 quote
    Paul
    Participant
    Master

    Hi,

     

    This strategy is the DAX-open straddle which is posted in the library as DayOpen Straddle for DAX 3-minute timeframe.

     

    It’s based on the idea, that while trading is possible 24/7, the big institutions start their day at 9u.

    Here’s more info

    https://en.wikipedia.org/wiki/DAX

     

    That’s why I took 9u am as start and made it a trade only in the first hour.

     

    At 9’ am the strategy defines the open and buys x points above or sellshort x points below, whichever comes first.

    The assumption is, that once it’s opened, there is high probability that it continues at least x points in that direction.

     

    To make it work, there had to be added extra criteria, which are important.

     

    i.e. For a long position, the (current bar) high has to be lower than the lowest daily high up to 2 days back. If that’s the case, the index has room to increase.

    (downside is that when there’s a continues rally, you don’t get in)

     

    While it’s mentioned for the 3min bar, the focus should be on the 10- or 15-min bars.

    In my testing, on both timeframes, I start from 1 January 2015.

     

    I didn’t expect these kinds of results! Have a look and if you have any idea’s how to improve or find other markets please post!

     

    (pictures posted are with 0.6SL, 0.4MFE and no PT) (NOP 30 for 15min, NOP25 for 10min)

     

    Cheers,

    Paul

    GraHal, Nicolas, Balmora74 and capgros thanked this post
    Screenshot-2018-11-04-at-14.04.55-min.jpg Screenshot-2018-11-04-at-14.04.55-min.jpg Straddle-DayOpen.itf
    #84135 quote
    GraHal
    Participant
    Master

    This seems a very versatile strategy, I played with 2 variables and got results attached over 100k bars on the 1 min timeframe.

    I’ve set them going on Demo Forward Test, I’ll let you know how they go.

    Paul-2.jpg Paul-2.jpg Paul-1.jpg Paul-1.jpg
    #84198 quote
    Paul
    Participant
    Master

    Interesting results GraHal! Ofcourse i’am curious which variables you used.

    Meantime I coded that holidays where excluded, with the day before and after the holiday.

    Only focussed on the holidays which repeat every year.

    If you can exclude them, it’s easy swap around and only display the holidays which are traded.

    It isn’t worth it to include this code. Since results are slightly above 50 % winchance and with marginal profit.

    #84210 quote
    Paul
    Participant
    Master

    the code to combine Williams 3 bar trailing stop with MFE trailing stop

    MFETrailing=1

    WTrailing=1

     

    // MFETrailing
    if MFETrailing then
    trailingstop = (tradeprice/100)*ts
    if not onmarket then
    MAXPRICE = 0
    MINPRICE = close
    priceexit = 0
    endif
    if longonmarket then
    MAXPRICE = MAX(MAXPRICE,close)
    if MAXPRICE-tradeprice(1)>=trailingstop*pipsize then
    priceexit = MAXPRICE-trailingstop*pipsize
    endif
    endif
    if shortonmarket then
    MINPRICE = MIN(MINPRICE,close)
    if tradeprice(1)-MINPRICE>=trailingstop*pipsize then
    priceexit = MINPRICE+trailingstop*pipsize
    endif
    endif
    If onmarket and WTrailing=0 and priceexit>0 then
    sell at market
    exitshort at market
    endif
    endif
    
    // exit larry williams
    If WTrailing and MFETrailing then
    count=1
    i=0
    j=i+1
    tot=0
    while count<4 do
    tot=tot+1
    if (low[j]>=low[i]) and (high[j]<=high[i]) then
    //inside bar
    j=j+1
    else
    count=count+1
    i=i+1
    J=i+1
    endif
    wend
    
    basso=lowest[tot](low)
    alto=highest[tot](high)
    
    if close>alto[1] then
    ref=basso
    endif
    if close<basso[1] then
    ref=alto
    endif
    
    if onmarket and priceexit>0 then
    if   high<ref then
    sell at market
    endif
    If  low>ref then
    exitshort at market
    endif
    endif
    endif
    
    #84211 quote
    GraHal
    Participant
    Master

    Thank you Paul for sharing your latest good ideas!

    i’am curious which variables you used.

    Re my results posted above …

    For v1.0 – variable values I used

    sl = 0.9  // % Stoploss
    pt = 0.40  // % Profit Target
    ts = 0.35  // % MFETrailing
    
    // indicator settigns
    NOP=9 //15//number of points
    TimeOpen=080000

    For v1.1 – variable values I used

    sl = 0.9  // % Stoploss
    pt = 0.40  // % Profit Target
    ts = 0.35  // % MFETrailing
    
    // indicator settigns
    NOP=36 //15//number of points
    TimeOpen=080000

    My TimeOpen is set at 080000 because I am in the UK … 1 hour behind you in the Netherlands.

    #84224 quote
    Paul
    Participant
    Master

    I too found that the stoploss 0f 0.6 is too small and set it to 1%. A profit target at 1.5%.

    Also tested lower timesframes but in the end settled on 10min. because of the number trades, about 400 trades in 4 years.

    Now it include the MFE with williams 3 bar trailing stop and a break even stop.

    Compared new code left to original code right with same parameters. Still working on it.

    GraHal thanked this post
    Screenshot-2018-11-06-at-03.31.53-min.jpg Screenshot-2018-11-06-at-03.31.53-min.jpg
    #84244 quote
    xpiga
    Participant
    Junior

    Hi Paul. Great system!

    Could you copy here the complete code with all the new improvements? And, if passible, the new results in 200k bars?

    Thank you so much!!!

    #84300 quote
    volpiemanuele
    Participant
    Veteran

    Can I have the latest version of the strategy in order to improve it ?

    Thanks

    #84302 quote
    GraHal
    Participant
    Master

    This strategy is the DAX-open straddle which is posted in the library as DayOpen Straddle for DAX 3-minute timeframe.

    @xpiga and @volpiemanuele

    Latest full working System is in the Library, but please also help Paul with improvements … for example, he has posted a Trailing Stop idea to be added in, tested and improved (maybe?) in the post below

    Paul wrote:

    the code to combine Williams 3 bar trailing stop with MFE trailing stop

    Paul and NA thanked this post
    #84334 quote
    Paul
    Participant
    Master

    Still working on it.. A problem though,

    I want to skip the first 2 weeks every year since those two are bad for trading.

    Does PRT support week-numbers perhaps?

     

    I want to make it optional to exclude those days.

    How should I code this most efficiently?

    If you add the code below, and add trading=0 to the buy criteria, it doesn’t work.

    //skip first two weeks of the year (weeknumber 1 and 2)
    IF YEAR=2015 AND MONTH=1 AND (DAY>=1 AND DAY<=10) THEN
    TRADING = 1
    ELSE
    TRADING = 0
    ENDIF
    IF YEAR=2016 AND MONTH=1 AND (DAY>=1 AND DAY<=16) THEN
    TRADING = 1
    ELSE
    TRADING = 0
    ENDIF
    IF YEAR=2017 AND MONTH=1 AND (DAY>=1 AND DAY<=14) THEN
    TRADING = 1
    ELSE
    TRADING = 0
    ENDIF
    IF YEAR=2018 AND MONTH=1 AND (DAY>=1 AND DAY<=13) THEN
    TRADING = 1
    ELSE
    TRADING = 0
    ENDIF
    IF YEAR=2019 AND MONTH=1 AND (DAY>=1 AND DAY<=12) THEN
    TRADING = 1
    ELSE
    TRADING = 0
    ENDIF
    #84340 quote
    Vonasi
    Moderator
    Master

    You can do something like this to convert YYYYMMDD to MMDD and then make decisions based on that.

    mmdd = date - (round(date /10000) * 10000)
    
    if mmdd >= 0101 and mmdd <=0114 then
    tradeok = 0
    else
    tradeok = 1
    endif
    
    Paul and TempusFugit thanked this post
    #84353 quote
    Paul
    Participant
    Master

    That worked great Vonasi.

    Because the beginning of several years had bad trades, with this code it was easy to optimise and skip the first x days of the year.

    Also found wrong with my code.

    IF SkipFirstTwoWeeks=1 then
    IF YEAR=2015 AND MONTH=1 AND (DAY>=1 AND DAY<=18) THEN
    TRADING = 1
    ELSIF YEAR=2016 AND MONTH=1 AND (DAY>=1 AND DAY<=24) THEN
    TRADING = 1
    ELSIF YEAR=2017 AND MONTH=1 AND (DAY>=1 AND DAY<=22) THEN
    TRADING = 1
    ELSIF YEAR=2018 AND MONTH=1 AND (DAY>=1 AND DAY<=21) THEN
    TRADING = 1
    ELSIF YEAR=2019 AND MONTH=1 AND (DAY>=1 AND DAY<=20) THEN
    TRADING = 1
    ELSE
    TRADING = 0
    ENDIF
    ENDIF
    #84372 quote
    volpiemanuele
    Participant
    Veteran

    Please can you post the complete strategy with the william three bar trailing ? Thanks

    #84374 quote
    ullle73
    Participant
    Senior

    does not look like this is correct : “i.e. For a long position, the (current bar) high has to be lower than the lowest daily high up to 2 days back.” ? could you explain one more time? 🙂

    #84414 quote
    GraHal
    Participant
    Master

    does not look like this is correct

    Make it easier for us … please post the snippet of code you are referring to and a link to the post in which that snippet appears.

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

Strategy DayOpen Straddle for DAX


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Paul @micky75d Participant
Summary

This topic contains 241 replies,
has 39 voices, and was last updated by Monobrow
5 years, 1 month ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 11/04/2018
Status: Active
Attachments: 100 files
Logo Logo
Loading...