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 cmoran13, 04-16-2026, 01:02 PM
      0 responses
      43 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      25 views
      0 likes
      Last Post PaulMohn  
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      162 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      98 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      158 views
      2 likes
      Last Post CaptainJack  
      Working...
      X