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 charlesugo_1, 05-26-2026, 05:03 PM
          0 responses
          52 views
          0 likes
          Last Post charlesugo_1  
          Started by DannyP96, 05-18-2026, 02:38 PM
          1 response
          142 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 05-11-2026, 05:56 AM
          0 responses
          160 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 05-10-2026, 08:12 PM
          0 responses
          96 views
          0 likes
          Last Post CarlTrading  
          Started by Hwop38, 05-04-2026, 07:02 PM
          0 responses
          276 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Working...
          X