Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT7 64-bit multi-instrument issue/question

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

    NT7 64-bit multi-instrument issue/question

    I've been trying to program a strategy on NT7 64-bit that utilizes an index as a 2nd instrument. The strategy runs just fine if I add a stock (say Add("MSFT", PeriodType.Day, 1)) but doesn't run if I Add("^DJIA", PeriodType.Day, 1) or ^SP500, ^VIX, etc. I know the historical data exist for these indices in my DB, and I can chart the indices just fine. I also get no error message on the Log tab from the control panel. I'm referencing the appropriate instrument from the strategy using BarsArray / BarsInProgress, and I know it works since all I have to do is substitute a stock such as AA, AAPL, MSFT, etc in the Add line and it works just fine. I'm stuck - any thoughts / help would be much appreciated.

    #2
    BTW I am currently only using the strategy for backtesting - so no trades are executed when run on historical data if I Add an index, but trades are executed and run if I Add a stock. I downloaded daily index data from Yahoo. thanks-

    Comment


      #3
      mkalayog, could you please post the code you're using? I just created a very simple script to test this out and everything worked as expected.
      Attached Files
      AustinNinjaTrader Customer Service

      Comment


        #4
        An index works fine as a second instrument; make sure to use ToDay(Time[0]) to strip away the time when checking date equivalence; the time part for a daily bar's timestamp will change based on the session selected.

        I've posted a few multi-instrument indicators you can look at; one of them (Beta) uses ^SP500 as it's default second instrument.

        Comment


          #5
          Ok thanks, had to do w/ the fact that Vol = 1 for all indices - modified to make it work!

          Comment

          Latest Posts

          Collapse

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