Is this system to good too be true?

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #25197 quote
    NDT
    Participant
    Junior

    Hi All,

    I’ve created my first system using two moving averages and have been testing it on the DAX, IT40 and Japan 225.

    The result I’m getting from the back tests are pretty good, since 2013, but I’m worried that I’m missing something and this system is to good too be true….

    The code is below:

    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated
    DEFPARAM FLATAFTER = 215500
    
    // Conditions to enter long positions
    indicator1 = ExponentialAverage[10](close)
    indicator2 = ExponentialAverage[35](close)
    c1 = (indicator1 CROSSES OVER indicator2)
    
    IF c1 THEN
    BUY 10 PERPOINT AT MARKET
    ENDIF
    
    // Conditions to exit long positions
    indicator3 = ExponentialAverage[10](close)
    indicator4 = ExponentialAverage[35](close)
    c2 = (indicator3 CROSSES UNDER indicator4)
    
    IF c2 THEN
    SELL  AT MARKET
    ENDIF
    
    // Conditions to enter short positions
    indicator5 = ExponentialAverage[10](close)
    indicator6 = ExponentialAverage[35](close)
    c3 = (indicator5 CROSSES UNDER indicator6)
    
    IF c3 THEN
    SELLSHORT 10 PERPOINT AT MARKET
    ENDIF
    
    // Conditions to exit short positions
    indicator7 = ExponentialAverage[10](close)
    indicator8 = ExponentialAverage[35](close)
    c4 = (indicator7 CROSSES OVER indicator8)
    
    IF c4 THEN
    EXITSHORT  AT MARKET
    ENDIF
    
    // Stops and targets
    SET STOP pTRAILING 6
    

    Too good to be true, or is this system displaying good results?

    Screen-Shot-2017-02-15-at-18.29.08.png Screen-Shot-2017-02-15-at-18.29.08.png
    #25201 quote
    Raul Vg
    Participant
    Senior

    What timeframe do you use?

    #25203 quote
    Raul Vg
    Participant
    Senior

    With timeframe of 1 hour and a. Stop so short may not be real and the problem of zero bars

    #25208 quote
    Joachim Nilsson
    Participant
    Average

    Yes i´m sorry but it´s too good to be true. A 6p trailing stop on such a high timeframe doesn’t´t work.

    #25210 quote
    Raul Vg
    Participant
    Senior

    Test it in demo for a while and compare the results with the backtest

    #25214 quote
    Joachim Nilsson
    Participant
    Average

    I tweaked it a bit and now it performs quiet well.

    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated
    
    DEFPARAM FLATAFTER = 215500
    
    n=5
    m=19
    
    // Conditions to enter long positions
    indicator1 = ExponentialAverage[n](close)
    indicator2 = ExponentialAverage[m](close)
    c1 = (indicator1 CROSSES OVER indicator2)
    
    IF c1 THEN
    BUY 10 PERPOINT AT MARKET
    ENDIF
    
    // Conditions to exit long positions
    indicator3 = ExponentialAverage[n](close)
    indicator4 = ExponentialAverage[m](close)
    c2 = (indicator3 CROSSES UNDER indicator4)
    
    IF c2 THEN
    SELL  AT MARKET
    ENDIF
    
    // Conditions to enter short positions
    indicator5 = ExponentialAverage[n](close)
    indicator6 = ExponentialAverage[m](close)
    c3 = (indicator5 CROSSES UNDER indicator6)
    
    IF c3 THEN
    SELLSHORT 10 PERPOINT AT MARKET
    ENDIF
    
    // Conditions to exit short positions
    indicator7 = ExponentialAverage[n](close)
    indicator8 = ExponentialAverage[m](close)
    c4 = (indicator7 CROSSES OVER indicator8)
    
    IF c4 THEN
    EXITSHORT  AT MARKET
    ENDIF
    
    // Stops and targets
    SET STOP ploss 180
    set target pprofit 150
    
    #25215 quote
    StantonR
    Participant
    Senior

    Ran the following code on japan 225 with good results.

    Only problem is the draw down is too high

    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated
    
    DEFPARAM FLATAFTER = 215500
    
    n=5
    m=19
    
    // Conditions to enter long positions
    indicator1 = ExponentialAverage[n](close)
    indicator2 = ExponentialAverage[m](close)
    c1 = (indicator1 CROSSES OVER indicator2)
    
    IF c1 THEN
    BUY 1 contract AT MARKET
    ENDIF
    
    // Conditions to exit long positions
    indicator3 = ExponentialAverage[n](close)
    indicator4 = ExponentialAverage[m](close)
    c2 = (indicator3 CROSSES UNDER indicator4)
    
    IF c2 THEN
    SELL  AT MARKET
    ENDIF
    
    // Conditions to enter short positions
    indicator5 = ExponentialAverage[n](close)
    indicator6 = ExponentialAverage[m](close)
    c3 = (indicator5 CROSSES UNDER indicator6)
    
    IF c3 THEN
    SELLSHORT 1 contract AT MARKET
    ENDIF
    
    // Conditions to exit short positions
    indicator7 = ExponentialAverage[n](close)
    indicator8 = ExponentialAverage[m](close)
    c4 = (indicator7 CROSSES OVER indicator8)
    
    IF c4 THEN
    EXITSHORT  AT MARKET
    ENDIF
    
    // Stops and targets
    SET STOP ploss 180
    set target pprofit 150
    
    Capture-1.jpg Capture-1.jpg
    #25220 quote
    NDT
    Participant
    Junior

    Thank you so much everyone for your feedback and for adjusting the code! That’s so kind of you :).

    I’m slightly confused though (pardon my ignorance here) but why are the back tests so mis-leading if in the real world they’re not really valid? And how can you determine if a system you’ve developed in actually going to work…?

    Best wishes

    #25222 quote
    Eric
    Participant
    Master
    #25224 quote
    Wing
    Participant
    Veteran

    In any backtest on the 10.2 version of PRT, trades that reach the SL and TP within the same bar that the trade is opened, will always count as a win. That is what can mislead you, which is why you must check for how many bars your trades in the backtest are held.

    #25227 quote
    NDT
    Participant
    Junior

    Thank you so much Eric and Wing! 🙂

    #35839 quote
    Francesco78
    Participant
    Master

    It is flat after February no? Overfitting  here I presume.

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

Is this system to good too be true?


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
NDT @ndt Participant
Summary

This topic contains 11 replies,
has 7 voices, and was last updated by Francesco78
8 years, 9 months ago.

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