DOW M15 with Wilder average (Intraday / swing)

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #114746 quote
    juju333
    Participant
    Average

    Hi ! Here is my first very simple code, for DOW M15 (tested with 100 000 periods). 1 contract, 10 000 €, spread 2.5 pts, 1€ / order to represent overnight charges.

    Every comments (or test on 200000 periods) are welcome :-).

    DEFPARAM CumulateOrders = False // Cumul des positions désactivé
    
    noEntryBeforeTime = 000000
    timeEnterBefore = time >= noEntryBeforeTime
    noEntryAfterTime = 230000
    timeEnterAfter = time < noEntryAfterTime
    
    // Conditions pour ouvrir une position long
    indicator1 = WilderAverage[20](close)-WilderAverage[50](close)
    c1 = (indicator1 CROSSES OVER 0)
    indicator5 = MACD[7,14,5] (close)
    c5 = (indicator5 > 0)
    
    IF c1 AND c5 AND timeEnterBefore AND timeEnterAfter THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF
    
    // Conditions pour ouvrir une position short
    indicator10 = WilderAverage[20](close)-WilderAverage[50](close)
    c10 = (indicator10 CROSSES UNDER 0)
    indicator13 = MACD[7,14,5] (close)
    c13 = (indicator13 < 0)
    
    IF NOT LONGONMARKET AND c10 AND c13 AND timeEnterBefore AND timeEnterAfter THEN
    SELLSHORT 1 CONTRACT AT MARKET
    ENDIF
    
    // Stops et objectifs
    SET STOP pLOSS 108
    SET TARGET pPROFIT 525

     

    dowm-1576159013l48pc.png dowm-1576159013l48pc.png
    #114804 quote
    Nicolas
    Keymaster
    Master

    Hi Juju,

    Thanks for sharing your idea.

    The strategy suffer from over optimization as you can see with 100k bars of out of sample testing. It is always a good idea to optimize with split periods between In Sample and Out Of Sample periods, to validate robustness of optimized variables.

    juju333 thanked this post
    DOW-15-minutes.png DOW-15-minutes.png
    #114812 quote
    juju333
    Participant
    Average

    Hi Juju,

    Thanks for sharing your idea.

    The strategy suffer from over optimization as you can see with 100k bars of out of sample testing. It is always a good idea to optimize with split periods between In Sample and Out Of Sample periods, to validate robustness of optimized variables.

    Thank you Nicolas for the long term back testing ! 2019 alone seems a very good year, which is not the case the years before… Indeed, TP and SL are optimised only with my 100 approach, maybe someone could fin best values in the long term ? What would you advice for me with only a 100K approach ?

    #114813 quote
    juju333
    Participant
    Average

    Finally, around 100% in 8 years (minus overnight charges, which might be high du to a very long time on market) : is this strategy worth optimizing it or is it quite common ? this 0 crossing of wilder average 20/50 is quitte efficient in my ‘manual’ trading setup and easy to automate. MACD prevents from taking too much wrong signals.

    #114965 quote
    Nicolas
    Keymaster
    Master

    2019 alone seems a very good year, which is not the case the years before

    Of course, and surely because of optimization! If you optimize your variables, any strategy would look good for sure. That’s why I encourage you to explore concept of optimization into splitted periods aka “walk forward analysis”. There are plenty of topics discussing concept of robustness, but you can start with these videos:

    French videos:

    https://www.prorealcode.com/blog/video-tutorials/analyse-walk-forward-prorealtime/

    https://www.prorealcode.com/blog/video-tutorials/recapitulatif-sur-lutilisation-du-module-walk-sous-prorealtime/

    French topic: https://www.prorealcode.com/topic/optimisation-et-analyse-walk-forward-_-aides/

    #115116 quote
    juju333
    Participant
    Average

    Thank you Nicolas, i’ll go and read all that

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

DOW M15 with Wilder average (Intraday / swing)


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
juju333 @juju333 Participant
Summary

This topic contains 5 replies,
has 2 voices, and was last updated by juju333
6 years, 2 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 12/13/2019
Status: Active
Attachments: 1 files
Logo Logo
Loading...