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 CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      44 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      25 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      186 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      348 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      270 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X