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 Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          578 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          334 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          553 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          551 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X