Dax Daily Open Long – timeframe 4 hours

Dax Daily Open Long – timeframe 4 hours

A simple code with differently weighted averages and a stop by repulse.
Supplemented by the seasonal pattern multiplier and a re-invest strategy.
If necessary, the latter can also be omitted, but it still remains a gain that achieves a higher performance than the Dax itself.

Time conditions should be adapted to your timezone. Timeframe = H4.
You can also do without the fixed TP and SL. The insurance can stay.

kind regards

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?

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

  1. Vonasi • 01/03/2018 #

    JohnScher has requested that I post my very slightly modified version of his strategy that gives better profits and a higher win/loss ratio on here but unfortunately I am unable to post code for some strange reason. Please go to
    https://www.prorealcode.com/topic/wanted-small-code-snippet/#post-57152
    where you can find the new code. You may wish to adjust the SET Target %Profit to 3.75 instead of the 3 that it is as this is a more optimized number.

  2. AVT • 01/03/2018 #

    What does the last sentence mean: The insurance can stay. (A typical german is over-insured, but a “Robot insurance” is really the final straw). Thx.

  3. JohnScher • 01/03/2018 #

    The “insurance” is against the general dangers such as the sudden appearance of a black hole in the middle of the earth or simply against an exploding nuclear power plant.

  4. Kv6 • 01/03/2018 #

    I’m trying to make a probacktest in the suggested 4H timeframe and don’t perform any operations…

  5. JohnScher • 01/03/2018 #

    @Kv6

    Try this code, see below.

    Please pay attention to the correct time settings.
    The trade starts at 09:00 GMT+1 or 08:00 GMT.
    Correspondingly then the closes
    09.00/13.00/17.00/21.00 GMT+1
    08.00/12.00/16.00/22.00 GMT

    Here in the code i use GMT+1

    Then it should work.

    If it doesn’t work, please use ScreenShots.

  6. JohnScher • 01/03/2018 #

    // MainCode: DailyOpenLong
    // Dax 1 Euro
    // TimeFrame 4H
    // created by JohnScher
    // with SaisonalPatternMultiplier from Pathfinder-Systems
    // with Re-Invest-Strategie

    //……………………………………………………..
    // Start
    //……………………………………………………..

    defparam cumulateorders = false

    // saisonal pattern muliplier

    ONCE January1 = 3 //0 risk(3)
    ONCE January2 = 0 //3 ok
    ONCE February1 = 3 //3 ok
    ONCE February2 = 3 //0 risk(3)
    ONCE March1 = 3 //0 risk(3)
    ONCE March2 = 2 //3 ok
    ONCE April1 = 3 //3 ok
    ONCE April2 = 3 //3 ok
    ONCE May1 = 1 //0 risk(1)
    ONCE May2 = 1 //0 risk(1)
    ONCE June1 = 1 //1 ok 2
    ONCE June2 = 2 //3 ok
    ONCE July1 = 3 //1 chance
    ONCE July2 = 2 //3 ok
    ONCE August1 = 2 //1 chance 1
    ONCE August2 = 3 //3 ok
    ONCE September1 = 3 //0 risk(3)
    ONCE September2 = 0 //0 ok
    ONCE October1 = 3 //0 risk(3)
    ONCE October2 = 2 //3 ok
    ONCE November1 = 1 //1 ok
    ONCE November2 = 3 //3 ok
    ONCE December1 = 3 // 1 chance
    ONCE December2 = 2 //3 ok

    // set saisonal multiplier
    currentDayOfTheMonth = Day
    midOfMonth = 15
    IF CurrentMonth = 1 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = January1
    ELSE
    saisonalPatternMultiplier = January2
    ENDIF
    ELSIF CurrentMonth = 2 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = February1
    ELSE
    saisonalPatternMultiplier = February2
    ENDIF
    ELSIF CurrentMonth = 3 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = March1
    ELSE
    saisonalPatternMultiplier = March2
    ENDIF
    ELSIF CurrentMonth = 4 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = April1
    ELSE
    saisonalPatternMultiplier = April2
    ENDIF
    ELSIF CurrentMonth = 5 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = May1
    ELSE
    saisonalPatternMultiplier = May2
    ENDIF
    ELSIF CurrentMonth = 6 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = June1
    ELSE
    saisonalPatternMultiplier = June2
    ENDIF
    ELSIF CurrentMonth = 7 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = July1
    ELSE
    saisonalPatternMultiplier = July2
    ENDIF
    ELSIF CurrentMonth = 8 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = August1
    ELSE
    saisonalPatternMultiplier = August2
    ENDIF
    ELSIF CurrentMonth = 9 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = September1
    ELSE
    saisonalPatternMultiplier = September2
    ENDIF
    ELSIF CurrentMonth = 10 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = October1
    ELSE
    saisonalPatternMultiplier = October2
    ENDIF
    ELSIF CurrentMonth = 11 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = November1
    ELSE
    saisonalPatternMultiplier = November2
    ENDIF
    ELSIF CurrentMonth = 12 THEN
    IF currentDayOfTheMonth 25
    c2 = TEMA [4] (close) > ExponentialAverage [4] (close)
    c3 = Repulse [3] (close) > 0.3

    IF TradingDayLong and TradingTimeLong Then
    If c1 and c2 and c3 THEN
    buy position*saisonalpatternmultiplier CONTRACT AT MARKET
    Endif
    ENDIF

    // set stop loss
    IF time = 090000 or time = 130000 or time = 170000 or time = 210000 then
    If Repulse[3](close)< -0.3 Then
    sell at market
    Endif
    ENDIF

    // set target profit set stop loss
    //set target %profit 3
    Set stop %loss 5
    // end maincode

  7. Kv6 • 01/03/2018 #

    Line 111: I replaced “IF CurrentDayOfTheMonth 25” with “IF CurrentDayOfTheMonth <= 25 THEN"
    In the end, when I try to validate, the error shown in the screenshot comes out.

  8. JohnScher • 01/03/2018 #

    Are you sure you changed in my code the line 111?

  9. JohnScher • 01/03/2018 #

  10. JohnScher • 01/03/2018 #

    Add PRT code – function don´t work correct on my personal computer
    i try againe

  11. JohnScher • 01/03/2018 #

    next try

    doesn´t work
    so here it is

    // MainCode : DailyOpenLong
    // Dax 1 Euro
    // Timezone GMT
    // TimeFrame4H
    // created by JohnScher
    // with SainsonalPatternMultiplier from Pathfinder-Systems
    // with Re-Invest-Strategie

    //……………………………………………………..
    // Start
    //……………………………………………………..

    defparam cumulateorders = false

    // saisonal pattern muliplier

    ONCE January1 = 3 //0 risk(3)
    ONCE January2 = 0 //3 ok
    ONCE February1 = 3 //3 ok
    ONCE February2 = 3 //0 risk(3)
    ONCE March1 = 3 //0 risk(3)
    ONCE March2 = 2 //3 ok
    ONCE April1 = 3 //3 ok
    ONCE April2 = 3 //3 ok
    ONCE May1 = 1 //0 risk(1)
    ONCE May2 = 1 //0 risk(1)
    ONCE June1 = 1 //1 ok 2
    ONCE June2 = 2 //3 ok
    ONCE July1 = 3 //1 chance
    ONCE July2 = 2 //3 ok
    ONCE August1 = 2 //1 chance 1
    ONCE August2 = 3 //3 ok
    ONCE September1 = 3 //0 risk(3)
    ONCE September2 = 0 //0 ok
    ONCE October1 = 3 //0 risk(3)
    ONCE October2 = 2 //3 ok
    ONCE November1 = 1 //1 ok
    ONCE November2 = 3 //3 ok
    ONCE December1 = 3 // 1 chance
    ONCE December2 = 2 //3 ok

    // set saisonal multiplier
    currentDayOfTheMonth = Day
    midOfMonth = 15
    IF CurrentMonth = 1 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = January1
    ELSE
    saisonalPatternMultiplier = January2
    ENDIF
    ELSIF CurrentMonth = 2 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = February1
    ELSE
    saisonalPatternMultiplier = February2
    ENDIF
    ELSIF CurrentMonth = 3 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = March1
    ELSE
    saisonalPatternMultiplier = March2
    ENDIF
    ELSIF CurrentMonth = 4 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = April1
    ELSE
    saisonalPatternMultiplier = April2
    ENDIF
    ELSIF CurrentMonth = 5 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = May1
    ELSE
    saisonalPatternMultiplier = May2
    ENDIF
    ELSIF CurrentMonth = 6 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = June1
    ELSE
    saisonalPatternMultiplier = June2
    ENDIF
    ELSIF CurrentMonth = 7 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = July1
    ELSE
    saisonalPatternMultiplier = July2
    ENDIF
    ELSIF CurrentMonth = 8 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = August1
    ELSE
    saisonalPatternMultiplier = August2
    ENDIF
    ELSIF CurrentMonth = 9 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = September1
    ELSE
    saisonalPatternMultiplier = September2
    ENDIF
    ELSIF CurrentMonth = 10 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = October1
    ELSE
    saisonalPatternMultiplier = October2
    ENDIF
    ELSIF CurrentMonth = 11 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = November1
    ELSE
    saisonalPatternMultiplier = November2
    ENDIF
    ELSIF CurrentMonth = 12 THEN
    IF currentDayOfTheMonth 25
    c2 = TEMA [4] (close) > ExponentialAverage [4] (close)

    IF TradingDayLong and TradingTimeLong Then
    If c1 and c2 THEN
    buy position*saisonalpatternmultiplier contracts at market
    Endif
    ENDIF

    // condition to exit
    IF time = 080000 or time = 120000 or time = 160000 or time = 200000 then
    If Repulse[3](close)< -0.3 Then
    sell at market
    Endif
    ENDIF

    // set target profit set stop loss
    //set target %profit 3
    Set stop %loss 5
    // Stop Loss as an insurace e.g. an exploiting nuclear power plant
    // end maincode

    // end

    all right?

  12. Mags67 • 01/03/2018 #

    Sorry don’t get your system to work. Miss definition of c1, december etc.

    Pls try again!

  13. Yannick • 01/03/2018 #

    Hello It doesn’t work for me also

  14. JohnScher • 01/03/2018 #

    this one runs

    // MainCode : DailyOpenLong
    // Dax 1 Euro
    // TimeFrame4H
    // created by JohnScher
    // with SainsonalPatternMultiplier from Pathfinder-Systems
    // with Re-Invest-Strategie

    //……………………………………………………..
    // Start
    //……………………………………………………..

    defparam cumulateorders = false

    // saisonal pattern muliplier

    ONCE January1 = 3 //0 risk(3)
    ONCE January2 = 0 //3 ok
    ONCE February1 = 3 //3 ok
    ONCE February2 = 3 //0 risk(3)
    ONCE March1 = 3 //0 risk(3)
    ONCE March2 = 2 //3 ok
    ONCE April1 = 3 //3 ok
    ONCE April2 = 3 //3 ok
    ONCE May1 = 1 //0 risk(1)
    ONCE May2 = 1 //0 risk(1)
    ONCE June1 = 1 //1 ok 2
    ONCE June2 = 2 //3 ok
    ONCE July1 = 3 //1 chance
    ONCE July2 = 2 //3 ok
    ONCE August1 = 2 //1 chance 1
    ONCE August2 = 3 //3 ok
    ONCE September1 = 3 //0 risk(3)
    ONCE September2 = 0 //0 ok
    ONCE October1 = 3 //0 risk(3)
    ONCE October2 = 2 //3 ok
    ONCE November1 = 1 //1 ok
    ONCE November2 = 3 //3 ok
    ONCE December1 = 3 // 1 chance
    ONCE December2 = 2 //3 ok

    // set saisonal multiplier
    currentDayOfTheMonth = Day
    midOfMonth = 15
    IF CurrentMonth = 1 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = January1
    ELSE
    saisonalPatternMultiplier = January2
    ENDIF
    ELSIF CurrentMonth = 2 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = February1
    ELSE
    saisonalPatternMultiplier = February2
    ENDIF
    ELSIF CurrentMonth = 3 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = March1
    ELSE
    saisonalPatternMultiplier = March2
    ENDIF
    ELSIF CurrentMonth = 4 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = April1
    ELSE
    saisonalPatternMultiplier = April2
    ENDIF
    ELSIF CurrentMonth = 5 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = May1
    ELSE
    saisonalPatternMultiplier = May2
    ENDIF
    ELSIF CurrentMonth = 6 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = June1
    ELSE
    saisonalPatternMultiplier = June2
    ENDIF
    ELSIF CurrentMonth = 7 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = July1
    ELSE
    saisonalPatternMultiplier = July2
    ENDIF
    ELSIF CurrentMonth = 8 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = August1
    ELSE
    saisonalPatternMultiplier = August2
    ENDIF
    ELSIF CurrentMonth = 9 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = September1
    ELSE
    saisonalPatternMultiplier = September2
    ENDIF
    ELSIF CurrentMonth = 10 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = October1
    ELSE
    saisonalPatternMultiplier = October2
    ENDIF
    ELSIF CurrentMonth = 11 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = November1
    ELSE
    saisonalPatternMultiplier = November2
    ENDIF
    ELSIF CurrentMonth = 12 THEN
    IF currentDayOfTheMonth 25
    c2 = TEMA [4] (close) > ExponentialAverage [4] (close)

    IF TradingDayLong and TradingTimeLong Then
    If c1 and c2 THEN
    buy position*saisonalpatternmultiplier CONTRACT AT MARKET
    Endif
    ENDIF

    // set stop loss
    IF time = 090000 or time = 130000 or time = 170000 or time = 210000 then
    If Repulse[3](close)< -0.3 Then
    sell at market
    Endif
    ENDIF

    // set target profit set stop loss
    //set target %profit 3
    Set stop %loss 5
    // end maincode

    // end

  15. JohnScher • 01/03/2018 #

    Why do i have problems to insert a code with “add prt code” ??

  16. Yannick • 01/03/2018 #

    Hello
    The problem of the code might the time of the candle if you modifiy by TradingtimeLong = time > 075900 and time<095000 For GMT/UTC +1 (Europe).
    i have also a problem with add prt code

  17. Yannick • 01/03/2018 #

    TradingDayLong = dayofweek = 1 or dayofweek = 2 or dayofweek = 3 or dayofweek = 4 or dayofweek = 5
    TradingtimeLong = time > 075900 and time 25
    c2 = TEMA [4] (close) > ExponentialAverage [4] (close)

    IF TradingDayLong and TradingTimeLong Then
    If c1 and c2 THEN
    buy position*saisonalpatternmultiplier CONTRACT AT MARKET
    Endif
    ENDIF

    // set stop loss

    If Repulse[3](close)< -0.3 Then
    sell at market
    Endif

    // set target profit set stop loss
    set target %profit 3
    Set stop %loss 5
    // end maincode

  18. Marlon • 01/03/2018 #

    Hey JohnScher,
    your code works fine, but my results aren’t as good as yours. Even if I use the same timeframe as you.
    What is wrong with my code? I just copied it.
    Did I miss something?

  19. DarioMazza • 01/03/2018 #

    Bha… this code dont work. gg

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
danhei Hi I am tryong to figure out how trist strategy works. I am new to pro real time. Can some...
Plop61 Hello,Thank you for sharing this beautiful strategy.Is it possible to indicate the code for ...
NoName Thank you very much for this fascinating trading system. It is still proving to be extremely...
ALE
7 years ago
pollon Ciao Ale,  anche a me da questo errore  "QQE_QUDAX1HBUY"  "QQE_QUDAX1HSELL"  "UNIV_QUDAX...
reb Hi Ale do you trade these QU strategies?  Are the results same as backtests Thnaks in adv...
avatar
crazytrader Hi anyone that has run this lately?
larouedegann best with this hour IF TIME =081000 THEN plushaut=highest[2](high) plusbas = lowest[2](lo...
CanAny1Trade Hi! I'm trying to put together a similar indicator but struggling. I want to mark the NY Pit...
ALE Hi Pat This code was nothing more than an experiment
pat95162 Hi Ale Do you have same results as me ? The strategy works very well in 2017 and now in 2-...
Nicolas Built on the history means that it suits the history. Always develop ideas in In-Sample peri...
ALE
8 years ago
ALE no, only with TF 15m
enzo_52 Grazie tante, Thanks so much 
JanWd Hallo Ale, First of all, thank you for this strategy. Could you explain what the BLUSTER ...
Elsborgtrading No that is wrong :) 1st runs always- then only run 2nd if 1st is on market with positions(ar...
Elsborgtrading It can only be fully automated if IG change minimum SLto 7 at night on DAX multi timefra...
Elsborgtrading A small example. the strategy would have opened 3 position on Dec 4th 2016 and keept it for ...
Cosmic1
8 years ago
Cosmic1 @JadeDB What times are you putting in?
sincitytrader I tried this one out recently,  and wasn't profitable for me.
Cosmic1 Yes, not great lately. I stopped this live at the end of last year. Will wait to see when th...
Philip Raphael Hey! Thank so much for sharing this wonderful indicator! I have always tried to code a simil...
CKW Hi Philip, What do you mean "Years" are not defined ? candle? If to code yearly candle size...
dakaodo Years not defined was probably b/c Phillip copied and pasted the code into PRT instead of im...
zilliq The reasons why I think it's time consuming and we loose time to try to do backests and Auto...
filiprb Hello Zilliq, You don't need a system to produce a walk forward test. You can easily create...
Philip Raphael It is incredible! Thanks for sharing, Doctrading!
Reiner
8 years ago
Nicolas You should join and read the forum thread about this strategy. There are plenty of different...
Reiner Hi djtaktik and welcome, I have answered your question in the related Pathfinder forum beca...
danver34 is this version the definitive one or from the original one have there been modifications to...
Reiner
8 years ago
Nicolas Overfit on past history obviously. But it doesn't mean that it would still underperformed in...
Francesco78 Thank you for the clarifications Nicolas, I am more aware of the meaning of the backtesting ...
CanAny1Trade Hi all, could a simple indicator be made to mark the traditional Pit based ORB? I'm tryi...
Fabio Anthony Terrenzio this strategy works only in a well defined trend
brosly Good afternoon I am trying to get the complete code of lex strategy made by adolfo since I s...
dreif123 hi Adolfo, is Alex Auto Trading Botindex working on DAX as well ? if so , can you post the...
hvluthy@sunrise.ch I'm very interested to try out your strategy, but as a bloody newbie I need some help regard...
Scalp Hola Adolfo, tengo una variante de tu estrategia, pero no se programar, me puedes ayudar al ...
ALZ Hi, I tested this strategy and that doesn't work.. strategy is losing.. Does anyone curr...
Nicolas Ahah, I'm not the author of this one :) I know you are a great coder Wilko, why don't you p...
Wilko Thanks for the flattery! I will, I promise.  /F
Nicolas Still don't have seen anything from your own :) You promised me! Ahaha 
Andres Uffff, I didn't adjust the different index spreads. With the heavy spread of Italy It's nega...
davidp13 Good day. I know this was posted such a long time ago, but I though rebuilding the system on...
davidp13 Also to note that the one position in my code does not close the other, which as far as I kn...
Dave Hi, I'm new to coding and have been trying to modify the code a little to backtest an idea I...
Nicolas Better use the forums for coding assistance please. You'll get more results there for sure.
Dave Apologies - only just learning the site layout. Maybe you could delete the post?
Nicolas FR/Bonjour Steftonio, non pas de frais overnight calculé sur la durée du backtest, c'est une...
avatar
Anonymous Any reason why in 2016 this system is doing very bad respect the previous years?
Nicolas "very bad" is relative to the account equity. I do not forward test this strategy since I po...

Top