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 Hwop38, 05-04-2026, 07:02 PM
          0 responses
          164 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Started by CaptainJack, 04-24-2026, 11:07 PM
          0 responses
          317 views
          0 likes
          Last Post CaptainJack  
          Started by Mindset, 04-21-2026, 06:46 AM
          0 responses
          245 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          350 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          179 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Working...
          X