Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Get date of a bar in another chart

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

    Get date of a bar in another chart

    Hi, how can you access the date of the latest bar of an instrument in a different chart?
    For example I need to check if the EOD data has been updated by checking if the date of SPY's current bar with ToDay(); matches the nyse advancing issues.
    thanks
    Last edited by frizshizzle; 09-08-2010, 04:52 PM.

    #2
    Hello frishizzle,

    Welcome to the NinjaTrader forums!

    If you're using NinjaTrader 7, you can add a secondary series to the indicator to the Indicators Initialize method. .
    Add("^NYSE", PeriodType.Minute, 1);

    You can then check the Times[1][0] property for the most recent time object of this secondary series.

    if (ToDay (Time[0]) == ToDay(Times[1][9]))

    You can see a sample multi instrument implementation through Tools > Edit NinjaScript > Strategy.

    You can see here for a reference sample on manipulating Date / Time objects.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thanks worked great.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      600 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      347 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