Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

on setting DateTimeSeries

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

    on setting DateTimeSeries

    The help guide on DateTimeSeries.Set(DateTime value) states:

    Setting a value on a DateTimeSeries object is automatically aligned to the current bar being evaluated. The example given is:
    myDateTimeSeries.Set(DateTime.Now);

    This example has no problem as Now is assigned to the current bar.

    However, if the assigned value for DataTime is yesterday, then the current bar is assigned a time different from computer clock. Would this cause confusion?

    Thanks.

    #2
    Not sure what you mean. DateTime.Now is your current PC clock time.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      DateTime.Now is teh example given by the help guide. When it is set as yesterday such as DateTime(Time[0].Year, Time[0].Month, Time[0].day-1, 1, 00, 00), then the current bar will be set as yesterday. It will conflicts with chart as the chart displays the current bar based on computer clock.

      Comment


        #4
        Still not following you. How does it conflict with anything at all? You created yourself a DateTimeSeries and you set values to this series as you see fit. If you decide to set yesterday's date to it, it will store that value.

        A DateTimeSeries does not plot anything or change the timestamp of any bars.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Got it. Thanks.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Hwop38, 05-04-2026, 07:02 PM
          0 responses
          161 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Started by CaptainJack, 04-24-2026, 11:07 PM
          0 responses
          311 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