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 CarlTrading, 03-31-2026, 09:41 PM
          1 response
          152 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          89 views
          1 like
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          131 views
          2 likes
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          127 views
          1 like
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          107 views
          0 likes
          Last Post CarlTrading  
          Working...
          X