Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ToTime(Time[0]) of a different bars array

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

    ToTime(Time[0]) of a different bars array

    is it possible to get the time array of barsArray 1 or 2 for example? by default it gives the time at which barsarray 0 closes...and dont see the option to change the array
    thx

    #2
    Hi nightriderx,

    Yes, you can use Times[1][0] to refer to time stamps of the first added series, or BarsArray[1]

    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      i need the exact time, to the second, of last last trade. times[0][0].ticks returning a strange 16 digit number, last 8 being all zeros and first start with 6344...(not the 6 digit integer like the totime command)
      and using it as Times[0][0] also gives the time the bar closes...i suppose i could add a ticks array to see the exact time, but would like to avoid that if possible
      thx
      Last edited by nightriderx; 06-14-2011, 10:02 AM.

      Comment


        #4
        I don't believe .Ticks is what you're looking for. This is a .net structure:
        Gets the number of ticks that represent the date and time of this instance.


        If you want to print the time portion of secondary series, use:
        Print(ToTime(Times[1][0]));
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          ok.
          thank you!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          68 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          36 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          61 views
          1 like
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          62 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          53 views
          0 likes
          Last Post CarlTrading  
          Working...
          X