Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi Instrument: Both Instruments Within Trading Hours?

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

    Multi Instrument: Both Instruments Within Trading Hours?

    Howdy--

    I'm interested in determining if all the instruments that I added via Initialize() are trading and not outside the instrument specific exchange trading hours.

    For instance, the ES and TF trade on different exchanges and trading hours, so when you add the TF as a secondary series to a chart, gaps appear on the TF when it's not trading and similar gas appear on the ES when it's not trading.

    So at the indicator level, when I add the TF via Initialize(), I want to test if both instruments are trading.

    Is there a special NT keyword that would identify the state of each instrument or is the only way to do this by looking at Times[0] and Times[1]?

    Thanks

    Aventeren

    #2
    Bars not lining up

    So a follow on issue that I seeing with a chart with multi instruments, is that the bars do not line up. For instance, I have a 60 min ES 09-14 chart, and I added the NQ, TF and YM 09-14 contracts on the chart in their own separate panels. The ES, NQ and YM bars all line up (maybe because they are all using the same session template?), but the TF bars are slightly offset. I have attached a screenshot of what I am seeing:

    What's going on behind the scenes that would cause the TF bar series to be offset from the other bars?

    How will these secondary bar offsets impact indicator/strategy development (i.e., do I need special code to filter out these instances somehow)?

    I'm just getting my feet wet on multiple instruments, and this is a weird one for me.

    Thanks for your help,

    Aventeren
    Attached Files

    Comment


      #3
      Hello Aventeren,

      Thank you for your post.

      There is no function to compare the added series and the main series. Using Times is a good idea in order to compare the timestamps of the series in the code.
      The reason you see misaligned bars is due to the bars closing and opening at different times per the Session Templates used for each individual instrument. You can view what each instrument uses by going to Tools > Instrument Manager > search for the instrument > then select the instrument and Edit > the Session Template is listed under the same name. You can view the session times and time zone by going to Tools > Session Manager > select the Session Template you would like to view.

      For information on Session Templates and the Session Manager please visit the following link: http://www.ninjatrader.com/support/h...on_manager.htm

      Comment

      Latest Posts

      Collapse

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