DayOpen Straddle for DAX 3-minute timeframe

DayOpen Straddle for DAX 3-minute timeframe

A simple concept.

Define the DayOpen using time.

Buy x points above, sellshort x points below the DayOpen.

One position max a day, Long or Short.

ExtraTradeCriteria is optional.

Test DAX 30 Cash, 3 minutes, spread 1, 100k bars

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

New! PRC is also now on YouTube, subscribe to our channel for exclusive content and tutorials

  1. Paul • 19 days ago #

    works also great on 10 minutes and 15 minutes dax.
    Only get’s activated in the first hour.
    The assumption is that the dax takes off at 9u.
    When the enter criteria is reached, there’s a high chance it gives the opportunity to take another number of points at a small risk.
    NOP 15 for 3 min
    NOP 25 for 10min
    NOP 30 for 15min
    The code below has an extra exit criteria.

  2. criscolci • 19 days ago #

    thanks Paul!

  3. fserra • 19 days ago #

    Sorry Paul but I can’t see the same result on the same instrument, actually it show opposite performance . Should I do some particular settings? Can you help me?

  4. Jan Wind • 19 days ago #

    Hi Paul,

    thanks a lot for for the strategy !! it works well for the DAX 3 minutes graph (tested with 85.000 bars, from 20 feb till 26 okt,, only 13% in the market,) ,
    Hopefully it keeps profitable, as the testing period of a half year seems short.

    I hope when playing around with the profit can be increased without being much longer in the market.

    Just a remark
    If I want only 1 opening trade per day, I add the condition ” OTD = Barindex – TradeIndex(1) > IntradayBarIndex” at the open buy / open sell condition, meaning that only one opening trade can be made during the day.
    Bardindex counts the total bars in the graph
    TradeIndex(1) counts the total bars in the graph till the last trade
    IntradayBarindex counts the bars from the beginning of the day in the graph.
    If you change the formula to Tradeindex(2), it allow 2 trades during the day (Be aware, closing is also counted as a trade.)

    I wonder why you include Daysforbidden in your code to exclude Sunday. You can turn off weekend bars, (saterday and sunday) in the ProRealTrade graphs (Options –> Platform Options –> Time Zones and Trading Hours), and trading is not influenced by eventual existing weekend bars. so no need to exclude Sunday in the trading code. Be aware that setting intraday charts with specific times like 6:00 to 22:00 instead of trading hours can have huge impact on auto trading results !

  5. sublime06 • 19 days ago #

    bon travail

  6. Paul • 19 days ago #

    @fserra.
    I think all the needed information in available. So perhaps it’s a time-zone setting on your side?

    @Jan Wind
    I switched from 3 minutes and focused on the period from 1-1-2015 for 10 and 15 minutes.
    That’s about 150k bars for the 10 min., 100k bars for the 15 min, (300-400 trades)

    The number of trades, for long and short and in total is covered in the code.
    There are other ways to program it. Thanks for the tip.

    The daysforbidden is set to 0, because I don’t’ want it to be used, but still be able to test if there is a poor day in a week.

    Profit can be increased at a cost of %win chance. Remove MFE or make it bigger and/or use a high profit target i.e. 1.5%

  7. Jan Wind • 18 days ago #

    Hi Paul,
    I have played around, also with 10 minutes. seems that your delivered setting with the 3 minutes graph is still the most profitable, and most constant.
    The 3 minutes algo is improving when increasing the SL and Trailing SL and get rid of the take profit , and in this case adding an opening condition “not on market” to let the profits grow instead of a new morning opening.

    (Waarschijnlijk zouden we ook in het Nederlands kunnen schrijven ? )
    Mvg Jan

  8. Paul • 18 days ago #

    Hoi Jan
    Eigenlijk is NL schrijven wel een stukje makkelijker!
    B.v. SL en TSL beide op 1, zonder PT heeft goede resultaten en met mijn waarden stijgt het van 4000 naar 6000. Win% nog steeds rond 50%
    Een kleine verbetering is een extra exit scenario. Als de high > dhigh[1]+nop dan sluiten, en andersom voor short.
    Weet nog niet wat not on market precies toevoegd, dat zou ik moeten vergelijken. Als het goed is wordt een positie, met een grotere TSL en zonder PT ook ‘s-nachts aangehouden. Wat ik nu bedenk zou het ook wel interessant zijn, om als je een positie nog hebt van een dag tevoren, er 1 kan toevoegen als het getriggered wordt.
    Later nog even meer testen!
    Gr Paul

  9. DANY • 17 days ago #

    Hi Paul,
    try this version of your Tsystem on DAX 15 Min

  10. DANY • 17 days ago #

    //————————————————————————-
    // Main code : Straddle DayOpen
    //————————————————————————-

    // common rules
    DEFPARAM CUMULATEORDERS = false
    DEFPARAM PRELOADBARS = 10000

    // positionsize and stops
    positionsize = 1
    SL = 0 //0.60 // % Stoploss
    TP = 0 //0.40 // % Profit Target

    NOP = 15 //number of points
    TimeOpen = 090000
    lasttime = 100000
    closetime = 210000

    tradetime = time >= TimeOpen and time DayOpen+NOP then
    lx=1
    else
    lx=0
    endif

    if low < DayOpen-NOP then
    sx=1
    else
    sx=0
    endif

    // trade criteria extra
    min1 = MIN(dhigh(0),dhigh(1))
    min2 = MIN(dhigh(1),dhigh(2))

    max1 = MAX(dlow(0),dlow(1))
    max2 = MAX(dlow(1),dlow(2))

    tcxLong = high MAX(max1,max2)

    // long entry
    If not onmarket and tradetime then
    if lx and tcxLong then
    buy positionsize contract at market
    endif

    if sx and tcxShort then
    sellshort positionsize contract at market
    endif
    endif

    // exit at closetime
    If onmarket then
    if time >= closetime then
    sell at market
    exitshort at market
    endif
    endif

    If SL > 0 then
    set stop ploss SL
    endif

    if TP>0 then
    set target pprofit TP
    endif

  11. jebus89 • 16 days ago #

    Hi, on 3 minute chart on 200K backtest its clearly flat, hinting that this might be curvefit.
    The 200K backtest on 15m is looking alot better, gonna see if i can reoptimise. will share if i find anything

  12. Paul • 16 days ago #

    Dany, the code gave some errors.
    Jebus89 plz share if you have improvements or the code can be better coded.
    here are the things i work on
    – german holidays and the day before exclude from trading, just closing if a position is openend from a day before
    – perhaps split NOP, so NOPlong and NOPshort and test or walk forward.
    – NOP instead of points use %
    – Use MFE in conjunction with Larry Williams 3bar trailing stop to maximise profits.
    – Use breakeven stop maybe

  13. DANY • 16 days ago #

    Sorry Paul, here is it

    //————————————————————————-
    // Main code : Straddle DayOpen
    //————————————————————————-

    // common rules
    DEFPARAM CUMULATEORDERS = false
    DEFPARAM PRELOADBARS = 10000

    positionsize = 1
    SL = 0
    TP = 0

    NOP = 15 //number of points
    TimeOpen = 090000
    lasttime = 100000
    closetime = 210000

    tradetime = time >= TimeOpen and time DayOpen+NOP then
    lx=1
    else
    lx=0
    endif

    if low < DayOpen-NOP then
    sx=1
    else
    sx=0
    endif

    // trade criteria extra
    min1 = MIN(dhigh(0),dhigh(1))
    min2 = MIN(dhigh(1),dhigh(2))

    max1 = MAX(dlow(0),dlow(1))
    max2 = MAX(dlow(1),dlow(2))

    tcxLong = high MAX(max1,max2)

    // long entry
    If not onmarket and tradetime then
    if lx and tcxLong then
    buy positionsize contract at market
    endif

    if sx and tcxShort then
    sellshort positionsize contract at market
    endif
    endif

    // exit at closetime
    If onmarket then
    if time >= closetime then
    sell at market
    exitshort at market
    endif
    endif

    If SL > 0 then
    set stop ploss SL
    endif

    if TP>0 then
    set target pprofit TP
    endif

    • xpiga • 15 days ago #

      Hello DANY. There is still a mystake in your code in line 18. Could you please solve it?
      I’m looking forward to trying out your new improvement.
      Thank you

  14. xpiga • 15 days ago #

    Hi! Thank you so much for this system! Would it be a good idea to optimize also the % Stoploss, % Profit Target and % MFETrailing? Or that would be overoptimization?
    Thank you!

  15. Paul • 14 days ago #

    Thanks GraHal for the suggestion. I will open a topic for the strategy.
    Dany, there are still errors. Perhaps have a look and post in the topic I will open.
    Xpiga thnx for the comment. I don’t think those 3 (SL/PT/MFE) or trailing stop, count as over-optimisation. The most important is the SL. Up to 1% is fine.

  16. Paul • 12 days ago #

    updates are posted in topic below
    https://www.prorealcode.com/topic/dayopen-straddle-for-dax/#post-84224

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
TraderFelix
4 months ago
Bebbo Thank you for your contribution. I have tested your system on some instruments and I like i...
Nicolas Thank you Xusto. Thank you a lot for your contribution :) Since your code is a Pathfinder'...
Xusto Hello, Fully Agree, I will update it with your advice. Btw Can would you like share you co...
Petersson Kristian Hi when I do back test I get 0 results, what do I do wrong? Trade Well Chris
JohnScher Yes i did before, see library/strategys/repulse and dpo https://www.prorealcode.com/proreal...
JohnScher Don't know what you're doing wrong. Import ITF and observe time zone settings. This should...
osupero https://www.screencast.com/t/QmSXRbBR
osupero https://www.screencast.com/t/2fCW8fkGsOeZ....solo posiciones largas por ahora
osupero https://www.screencast.com/t/MIaSZ2PRg
Eric If you have a high percentage winners and the trades are closed with take profit the spread ...
Casenova I Agree with you JaunJ, and Yes Eric, what you say makes sense too. Optimizing the Stop Loss...
ET Thanks for the system Casenova. In determining the high of the past 4 bars, is there a reaso...
JanWd Hey Doctrading, I tried your code, optimising the A and V and the RSI period, see below. ...
Glen Marquis This will work as there is plenty of room for the Target before the Stop, yet the Stop would...
magicT I did a copy and paste of this code and PRT 10.3 returns a synthax mistake: OneTradePerD...
FULVIO09 Attualmente non c'è sufficiente volatilità : la condizione "C0 = AverageTrueRange[1500](Clos...
vlongobardo67 Ma io intendevo in backtest ! Scusa non l’ho menzionato.
ciniselloftse salve fulvio .il trading sistem e sempre profittevole?
beeb Hallo Dominik, das mit dem deutsch schreiben kommt mir sehr gelegen. Komme auch aus Deutschl...
vlongobardo67 hi Beeb, I imported the file in my platform but is does open any order. What is wrong , wha...
fserra Ciao, scusami ma non mi esegue il back test, da cosa può dipendere? Grazie
Nicolas
9 months ago
Nicolas https://www.prorealcode.com/topic/mt4-fractal-box/
matthieuatd Bonjour Merci pour ce code il m'apporte beaucoup par contre est il possible que tu réalises...
Nicolas Merci, faire une demande dans le forum approprié.
Yannick TradingDayLong = dayofweek = 1 or dayofweek = 2 or dayofweek = 3 or dayofweek = 4 or dayof...
Marlon Hey JohnScher, your code works fine, but my results aren't as good as yours. Even if I use ...
DarioMazza Bha... this code dont work. gg
ALE
11 months ago
ALE P01 , it’s the first patner of the indicator, I hope to add others in future.
ALE We can discuss about the strategy here: https://www.prorealcode.com/topic/scalping-indicator/
settival CIAO ALE CREDO DI AVER SETTATO PER BENINO LO SCALPING INDICATOR MA NON VISUALIZZO I SEGNALI ...
Alai-n Merci pour ce travail...
patmaba merci Alai-n. C'est ma première participation sur prorealcode, merci pour à toi pour ton co...
Yannick Hello There is a mistake in trailing stop code, I think that this should fix the problem s...
Paul About the trailing-stop the way it's coded. That works for backtesting only, just look at th...
Jonny sorry paul, but system says that is not possible to put many stop order combined...what have...
BC
1 year ago
TempusFugit Thanks Bin, nice code, I can use several ideas of the way you build it
DarioMazza Thanks Bin, great concentration, i understand the first idea, but may u indicate me the asse...
Bin Hi Mazza This robot is optimized for DAX30.
Nicolas What do you want to do exactly? Because dots are plotted afterwards..
rama I want to place buy or sell order just after the last man , what is the code to use ? i tr...
Nicolas But it should, please open a new specific topic in the ProOrder automatic trading forum.

Top