Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BackTest bug using Multi-timeframe

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

    BackTest bug using Multi-timeframe

    I believe that I have found a major bug with regard to multi-timeframe back testing.
    In the attached document are the details for 3 trades that would have only been successful if the sub time frame bars were processed in the reverse time order.

    This bug has plagued me by indicating successful back test results which should not have been and vice-versa. Also, leading me down avenues of code which would not work in the real world.

    If I am wrong about my findings, I'd like to get an explanation as to why the back-test process produces such anomalous results.

    Check out the document here...
    Last edited by dsidlo; 02-18-2009, 04:05 PM. Reason: google docs does not publish pdfs publicly.

    #2
    Please reattach. Thank you.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Josh View Post
      Please reattach. Thank you.
      I've uploaded to google-docs added a link. It was too big for the forum's requirements.

      Comment


        #4
        "Sorry, the page (or document) you have requested is not available."

        Maybe you could zip it up and try attaching.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Josh View Post
          "Sorry, the page (or document) you have requested is not available."

          Maybe you could zip it up and try attaching.
          Too large as a zip file as well.
          I posted it to freedrive.com. I hope you can download this one.

          Comment


            #6
            David,

            What I suggest you try is to print the time from both time frames and then you can evaluate it exactly step by step.

            Add this to your code:
            Code:
            Print(Time[0] + " BarsInProgress: " + BarsInProgress);
            Remember, in backtesting if you are submitting to primary it does not consider secondary at all. It just processes from primary bars. If you want the additional granularity in backtesting, please see this reference sample: http://www.ninjatrader-support2.com/...ead.php?t=6652
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Josh View Post
              David,

              What I suggest you try is to print the time from both time frames and then you can evaluate it exactly step by step.

              Add this to your code:
              Code:
              Print(Time[0] + " BarsInProgress: " + BarsInProgress);
              Remember, in backtesting if you are submitting to primary it does not consider secondary at all. It just processes from primary bars. If you want the additional granularity in backtesting, please see this reference sample: http://www.ninjatrader-support2.com/...ead.php?t=6652
              Thanks, I will review my code with that in mind...

              Comment


                #8
                Josh,

                Thanks for the advice. Being very specific about what time frame to use on the Enter and Exit commands seems to have fixed the issue.

                Thanks for the prompt response.

                Comment

                Latest Posts

                Collapse

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