Dow market opening breakout backtest/walkforward

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #183893 quote
    Mobos
    Participant
    New

    Dear PRT users

    I have adapted a code from this website to suit my needs. The strategy I intend to trade is that I would like to trade the breakout of a range during the first 5 minutes of the Dow Jones session (153500h GMT +1 time). The range is determined by the 15 minutes preceding the session. Stop loss is the range+2 pts and target is the range*5.7. This strategy has given satisfying results when traded manually since September 2020 and automatically until July 2021. I have thus started playing around with the time allowed to open a position by increasing it from 153500 GMT+1 to 154500h and the results look much more stable. However, now I am unsure if the strategy is curve fitted. In PRT I used the maximum amount of data (15k units) in the 15 minute time frame. Walk forward testing shows various efficiency levels.

    If someone who is more proficient in walk forward testing and optimizing could give their comments and thoughts, it would be really helpful.

    As you can see in the two attached images, the equity curve is very even, which is why I suspect it to be overfit. In the report you may see the starting and ending equity as per backtest.

    //-------------------------------------------------------------------------
    // Main code : DOW ORB 1545
    //-------------------------------------------------------------------------
    //-------------------------------------------------------------------------
    // DOW simple breakout during first 15 minutes of open market and all day open
    //-------------------------------------------------------------------------
    
    Defparam cumulateorders = false
    Defparam flatafter = 210000
     
    n = 0.4
     
    IF Time = 153000 THEN
    top = highest[1](high)
    bottom = lowest[1](low)
    amplitude = top - bottom
    buytime = 0
    selltime = 0
    ENDIF
     
    if Time > 151500 AND Time <= 154500 THEN
     
    IF buytime = 0 THEN
    buy n share at top stop
    ENDIF
     
    IF selltime = 0 THEN
    sellshort n share at bottom stop
    ENDIF
     
    ENDIF
     
    If longonmarket THEN
    buytime = 1
    ENDIF
     
    IF shortonmarket THEN
    selltime = 1
    ENDIF
     
    set stop ploss amplitude+2
    set target pprofit amplitude*5.7
    
    report.jpg report.jpg breakout-equity-curve.jpg breakout-equity-curve.jpg
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.

Dow market opening breakout backtest/walkforward


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Mobos @mobos Participant
Summary

This topic contains 1 voice and has 0 replies.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 12/27/2021
Status: Active
Attachments: 2 files
Logo Logo
Loading...