• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi instrument backtesting on non-existing data

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

    Multi instrument backtesting on non-existing data

    I am playing around with a strategy that trades off of weekly bars. The strategy is adding multiple instruments

    I'm back testing from 2005. One of the instruments only has data back to 2008. When I run strategy analyzer, it only gives me results from 2008 on. Is there a way to force the back test from 2005, but ignoring the instrument that doesn't have data from 2005-2007?

    Thanks

    #2
    Hello lookOutBelow,

    NinjaTrader will process your strategy (OnBarUpdate) as long as you have Historical Data for the other instrument, but it sounds like you are using that DataSeries in your logic or the Series that you are submitting your orders to.

    Do you have a CurrentBars check at the beginning of your strategy?
    JCNinjaTrader Customer Service

    Comment


      #3
      Hi JC,

      No, I do not have a CurrentBars check. I tried it to see what would happen, but it didn't change the results.

      Comment


        #4
        Hello lookOutBelow,

        Are you using the DataSeries that you do not have any data for until 2008 in your logic or are you submitting your orders to that Series?
        JCNinjaTrader Customer Service

        Comment


          #5
          I did have logic to it, but before posting this message, I removed any attempts to access the data or attempts to trade on that symbol. The only thing left in the code was the adding of the instrument.

          Add("EDV",PeriodType.Week,1);

          As soon as I comment this line out, it works as I would expect it to (back to 2005).

          Comment


            #6
            Hello lookOutBelow,

            In your Strategy Parameters can you change the "Bars Required" to "0" to have your strategy try to process this right away.
            JCNinjaTrader Customer Service

            Comment


              #7
              It will fail if I change it to 0. The data for the other instruments (that have data to 2005) are looking back as far as 15 weeks. I guess I can eliminate that, to test it out.

              Comment


                #8
                Hello lookOutBelow,

                If you require 15 bars of data to process this strategy how you would like you may want to add your own CurrentBars check but check for the series that you do not have data for until 2008 separately and still use Bars Required 0.

                Let me know if this works like you are wanting it to.
                JCNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Miguel_88, Today, 06:41 PM
                0 responses
                1 view
                0 likes
                Last Post Miguel_88  
                Started by spikeruk, Today, 01:49 PM
                1 response
                11 views
                0 likes
                Last Post NinjaTrader_PaulH  
                Started by Yandychang, Today, 02:16 PM
                5 responses
                17 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Started by priceisking, Today, 01:16 PM
                2 responses
                8 views
                0 likes
                Last Post priceisking  
                Started by kashyapjdave, 03-23-2017, 12:12 AM
                11 responses
                1,959 views
                0 likes
                Last Post forextrader2003  
                Working...
                X