Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi Instrument Time Series

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

    Multi Instrument Time Series

    Hi,

    When backtesting a strategy with multi instruments on it, NT only reports trades from the less period database instrument.

    I imagine ninjatrader pairs all instruments from the most recent data instrument ?

    if so, is there any way that ninjatrader don`t do it, and takes each complete instrument database without cuts ?

    thanks in advance.

    Fer
    Last edited by fercho; 05-25-2014, 07:50 PM.

    #2
    Hello Fer,

    Thank you for your post.

    Are you referring to Futures instruments and NinjaTrader merging the previous contracts?

    Comment


      #3
      Hi Patrick, nope just for stock in daily database.

      For example, two stocks AAPL and MSFT.

      AAPL having daily data from 1980 and MSFT from 1990.

      Add both instruments to initialize in a strategy, but I only get backtest result from 1990 altought AAPL daily database is from 1980.

      My question is, NinjaTrader groups both database from the most recent one (MSFT) and from that date starts ?

      Thanks.

      Fer

      Comment


        #4
        Hello Fer,

        That is correct, the calculations are performed on both sets and you likely have if(CurrentBars[0] <= BarsRequired || CurrentBars[1] <= BarsRequired) in your code, which means both bar series need to have enough bars before the calculations are made.

        Comment


          #5
          Hi yes I had deleted the "if(CurrentBars[0] <= BarsRequired || CurrentBars[1] <= BarsRequired)" and I still have the issue

          Any way to fix it ?
          Last edited by fercho; 05-27-2014, 03:47 PM.

          Comment


            #6
            Hello fercho,

            Thank you for your response.

            The CurrentBars is only an example, there is no method around this as it is expected behavior. If you are loading additional bar series the code will need both sets of data to begin the calculations.

            Comment


              #7
              Thanks Patrick I imagine that there´s no way to fix that, the only method is backtesting individual instruments apart and with an Excel add the trades and do the math, I guess....

              Thanks again for fast support.

              Comment

              Latest Posts

              Collapse

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