Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtest ignores part of data in daily data

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

    Backtest ignores part of data in daily data

    Hi,
    I have a strange problem. When running a strategy with daily bars it only start using data from a certain point. For instance if I run backtest from 2007 to 2011 it starts working only from 2009, and I'll get results for 2009-2011. It starts at different points with different instruments (for instance ZS start from 2009 and ES from the end of 2007).
    I made sure that all data is available and I can see it the chart tub.
    When trying to run it with data feed connected it gives an error of invalid symbol for the first symbol it needs to use, even though it works perfectly fine with a sample strategy.
    When I run it in debug mode I see that the first OnBarUpdate() iteration skips the previous data and just start from a certain point (in my example the first bar will be 12/31/2009 when the from value is 1/1/2007).

    Please tell me what I can possibly be doing wrong.

    #2
    orenshkol, would this be a multi series strategy you're using here? What would be the first date then that all your series would have surpassed the BarsRequired you have set from the UI (usually 20 bars)?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thanks,
      I indeed had some multi-series piece of code buried in the strategy.

      Comment


        #4
        You're welcome, so with that being removed or BarsRequired adjusted to a lower value do you get a more consistent outcome now?
        BertrandNinjaTrader Customer Service

        Comment


          #5
          With the code removed. Changing BarsRequired didn't have any affect.

          Comment


            #6
            orenshkol,

            What time frame are you working with on the second test from Betrand?

            Are you running a CurrentBar check of any kind for the OnBarUpdate()?
            Cal H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by AttiM, 02-14-2024, 05:20 PM
            12 responses
            212 views
            0 likes
            Last Post DrakeiJosh  
            Started by cre8able, 02-11-2023, 05:43 PM
            3 responses
            236 views
            0 likes
            Last Post rhubear
            by rhubear
             
            Started by frslvr, 04-11-2024, 07:26 AM
            8 responses
            114 views
            1 like
            Last Post NinjaTrader_BrandonH  
            Started by stafe, 04-15-2024, 08:34 PM
            10 responses
            47 views
            0 likes
            Last Post stafe
            by stafe
             
            Started by rocketman7, Today, 09:41 AM
            3 responses
            11 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Working...
            X