DAX 5 min long+short

Viewing 15 posts - 1 through 15 (of 33 total)
  • Author
    Posts
  • #52846 quote
    Barney
    Participant
    Senior

    Has made a simple code for DAX 30 which runs between 09:00  and 17:20.

    According to the 100k backtest, is looks ok..

    It would be interesting to see a 200k backtest on it 🙂

    Spread 1p.

    DEFPARAM CumulateOrders = False
    
    DEFPARAM FLATBEFORE = 090000
    
    DEFPARAM FLATAFTER = 172000
    
    // Conditions to enter long positions
    indicator1 = BollingerDown[19](close)
    c1 = (close <= indicator1)
    indicator2 = Stochastic[15,3](close)
    c2 = (indicator2 CROSSES UNDER 13)
    
    IF c1 AND c2 THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF
    
    // Conditions to enter short positions
    indicator10 = BollingerUp[21](close)
    c10 = (close >= indicator10)
    indicator20 = Stochastic[14,3](close)
    c20 = (indicator20 CROSSES OVER 70)
    
    IF c10 AND c20 THEN
    SELLSHORT 1 CONTRACT AT MARKET
    ENDIF
    
    // Stops and targets
    
    SLL = 27 
    TPL = 14
    if longonmarket then
    SET STOP pLOSS SLL
    sET TARGET pPROFIT TPL
    ENDIF
    
    SLS = 30
    TPS = 10
    if SHORTonmarket then
    SET STOP pLOSS SLS
    sET TARGET pPROFIT TPS
    ENDIF
    Degardin Arnaud and Nicolas thanked this post
    d.jpg d.jpg
    #52858 quote
    Eric
    Participant
    Master

    Avg gain 2,29

    not much room for slippage but on limit orders you could get positive slippage (det du förlorar på karusellen tar du kanske igen på gungorna?)

    #52873 quote
    Henrik
    Participant
    Veteran

    Hi!

     

    Here is 200bars

     

    Regards

    Henrik

    Screenshot_35.png Screenshot_35.png
    #52877 quote
    Aloysius
    Participant
    Veteran

    Hi Barney, here is the backtest with 200000 bars.

    Capture-1.jpg Capture-1.jpg
    #52879 quote
    AutoStrategist
    Participant
    Veteran

    Sorry Barney, couldn’t resist 🙂

    Barney.jpg Barney.jpg
    #52905 quote
    Leo
    Participant
    Veteran

    Sorry Barney, couldn’t resist 🙂

    Haha!!! It so early in the morning and it is awesome to read a joke in the forum! Hahah! XD

    #52908 quote
    jebus89
    Participant
    Master

    Doh 🙂 Been there done that Barney..

    #52992 quote
    Barney
    Participant
    Senior

    Thanks for the 200k backtest!

    I do not feel completely satisfied with the result though.

    Seems to be difficult to get simple codes to work, it feels like you need a 200 k test to see if algon is something to have or not(especially at 5 min algos).

     

     

    ba.png ba.png
    #52996 quote
    jebus89
    Participant
    Master
    If it was easy….. 😉 I know exactly how you feel. Before i got the 200K backtest premium for myself, i had several systems that looked so good in 100K, when in 200K tho… Even made a post about it: https://www.prorealcode.com/topic/creating-strategies-questions-about-backtest-and-periods/ In short, it just does not feel sexy when its HORRIBLE before 2016, but SEXY after 😀 I guess that if you curve-fit something there might be a chance that the same curve might work tomorrow.. I mean you can be pretty sure that it will STOP working i guess… and thats why i dont want to run stuff that only looks good on 100K… Even though i have for example the linked system going in demo, making money, i just know that its going to stop working maybe tomorrow, or maybe in a week or maybe in a month. I’d rather have a more robust system than that… Ps: i do not have alot of experience with live automated systems trading 🙂
    #53099 quote
    Nicolas
    Keymaster
    Master
    All periods and stoploss / takeprofit values have been optimized, that’s why it is curvefitted. You can do optimisation of course, but do WFA to prove robustness of it! The past 100k bars before your own test are pure Out Of Sample data that could validate or not your strategy, but it doesnt. You have 2 ways to make things better:
    1. develop your idea on at least 1 In Sample period (70% of data) and test in the next 30%
    2. if you are in a optimisation process, do a simple WFA with one or many IS/OOS iterations to find the good edge
    Come one Barney, I know you can make it!
    swsb_character_fact_barney_550x960.png swsb_character_fact_barney_550x960.png
    #53482 quote
    raphaelopilski
    Participant
    Senior
    what is WFA? @Nicolas
    #53548 quote
    jebus89
    Participant
    Master
    https://www.prorealcode.com/blog/learning/prorealtime-walk-analysis-tool/ This was one of the reasons i came to this forum! Big thanks to nicolas for the good work 🙂
    #53641 quote
    Barney
    Participant
    Senior

    Ok, here coms a code that is not over optimized. Simple code again thugh!

    DAX 5 min spread 1.

    DEFPARAM CumulateOrders=False
    defparam flatbefore = 090000
    defparam flatafter = 173000
    
    indicator1 = ExponentialAverage[46](close)
    indicator2 = ExponentialAverage[10](close)
    c1 = (indicator1 > indicator2[1])
    indicator3 = AroonUp[20]
    indicator4 = Aroondown[76]
    c2 = (indicator3 CROSSES OVER indicator4)
    
    indicator100 = close
    indicator101 = Supertrend[7,1]
    c100 = indicator100 > indicator101
    
    IF c1 and c2 and c100 THEN
    BUY 1 CONTRACTs AT MARKET
    ENDIF
    
    set stop ploss 20
    set target pprofit 10

    Would be nice if someone would try 200k on it 🙂

    Skärmavbild-2017-11-22-kl.-16.44.jpg Skärmavbild-2017-11-22-kl.-16.44.jpg
    #53661 quote
    Despair
    Blocked
    Master
    #53665 quote
    Barney
    Participant
    Senior
    Thanks Despair for the 200k test. Will probably start it live 🙂
Viewing 15 posts - 1 through 15 (of 33 total)
  • You must be logged in to reply to this topic.

DAX 5 min long+short


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Barney @rickardktm Participant
Summary

This topic contains 32 replies,
has 13 voices, and was last updated by T-rader
8 years, 3 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 11/15/2017
Status: Active
Attachments: 12 files
Logo Logo
Loading...