Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Back testing multiple time frame results

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Back testing multiple time frame results

    Hello,

    When I back test a multi time frame strategy the results show that the exits occurred before the trade entries. In the strategy back test results, the summary tab shows average time in trade as negative minutes, for example, -22.4 mins. The trade details tab will show trade entries after the trade exit times. This is happening for long and short trades on whatever instrument I test it on in tick periods or minute periods.

    Would someone be able to back test my strat with a primary time frame of 1 minute and two additional time frames of;

    PHP Code:
    Add(PeriodType.Minute, 15);
    Add(PeriodType.Minute, 60); 
    
    ........and see if they get the same results please? I thought it was my data time stamps but checked them and they are OK.

    I have attached an image of the results as they look in the chart tab where you can see the stop loss or profit targets hit before the trades are entered! I have attached the trade details results also with exit and entry times.

    Click image for larger version

Name:	TF 09-10 (1 Min)  14_07_2010.jpg
Views:	1
Size:	105.4 KB
ID:	896690

    Click image for larger version

Name:	NinjaTrader Trade List, 21_06_2010 - 20_09_2010.jpg
Views:	1
Size:	345.7 KB
ID:	896691

    BackTestMultiTimeFrameATRCancel.zip


    If someone could back test the strat and see if they get the same results I would really appreciate it!


    Thanks.

    #2
    Hello MrTicks,

    Thank you for the report. Can you let us know how you backtested this? Through a chart or Strategy Analyzer?
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Check your Orders Screen to make sure they are actually exiting before the entry. If that is happening its likely due to your order management logistics. I have had this problem in the past and it was due to orders entering on a smaller granularity time period than what was displayed on the chart and the exits also exiting on the same time frame but in chart view it can make it look like they are backwards.

      Comment


        #4
        Originally posted by NinjaTrader_RyanM View Post
        Hello MrTicks,

        Thank you for the report. Can you let us know how you backtested this? Through a chart or Strategy Analyzer?

        Hello - I ran it through the Strategy Analyzer. The image of the chart is from the chart tab in the back test settings.

        Comment


          #5
          Originally posted by neb1998 View Post
          Check your Orders Screen to make sure they are actually exiting before the entry. If that is happening its likely due to your order management logistics. I have had this problem in the past and it was due to orders entering on a smaller granularity time period than what was displayed on the chart and the exits also exiting on the same time frame but in chart view it can make it look like they are backwards.
          I changed the primary bar series in this example to 60 minutes. So I launched the chart on a minute time bar series.

          Then in the strat I had;

          COBC=FALSE and
          PHP Code:
          /* Add a secondary bar series. 
                      Very Important: This secondary bar series needs to be smaller than the primary bar series.
                      
                      Note: The primary bar series is whatever you choose for the strategy at startup. In this example I will reference the primary as a 60 min bars series. */
                      // Add our execution data series; BarsInProgress index = 1
                      Add(PeriodType.Minute, 15);
                      Add(PeriodType.Minute, 5); 
          
          So my,
          BIP0=60 min
          BIP1= 15 min
          BIP2= 5 min

          .........and now I don't have the issue anymore. My new problem is entries and exits on the same bar! Which is a new problem I can address.

          Comment


            #6
            Thanks, neb, for the assist. Glad to hear it's working as you expect, MrTicks. Please let us know if there's anything else to look into here.
            Ryan M.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_RyanM View Post
              Thanks, neb, for the assist. Glad to hear it's working as you expect, MrTicks. Please let us know if there's anything else to look into here.
              Thanks, will do! A good weekend to you both!

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              663 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              376 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              110 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              575 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              580 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X