Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Date & Time Series

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

    Date & Time Series

    Hello,

    When writing indicator, we can access bar close, open, high, low & volume values via series like this Close[0], for 1 bar ago Close[1]. Also can i access Date & Time series? I mean Date[0], Date[1], Time[0], Time[1].

    Thanks.

    #2
    Hello aytacasan,

    Yes, all bars will have a date / time structure accessible with Time[0], Time[1], Time[2], etc.

    You can access specific elements (date, hour, seconds, etc) with this Time property. This reference sample can help with this:
    Manipulating DateTime objects
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thanks for your response,

      So we don't have date[] & time[] series separately. We have only time[] series but time[0] which current bar time contain Date&time values together.

      And We can change current bar color via BarColor = Color.Blue. Could you please tell me how can i change bars ago bar bar color property? I mean how can i write this X bars ago bar color = Color.Red.

      Regards.

      Comment


        #4
        Correct - Time[0] contains the entire date / time structure.

        You can use BarColorSeries to change color for the specified number of bars back.

        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Yes, all bars will have a date / time structure accessible with Time[0], Time[1], Time[2], etc.
          Yes but the documentation does not tell you the contents will all be zero (so useless) if you are using another indicator as input series. See this thread http://www.ninjatrader.com/support/f...ad.php?t=35107

          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
          163 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