Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 DavidHP, Today, 07:56 AM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by kujista, Today, 06:23 AM
          3 responses
          9 views
          0 likes
          Last Post kujista
          by kujista
           
          Started by Mindset, Yesterday, 02:04 AM
          2 responses
          18 views
          0 likes
          Last Post NinjaTrader_RyanS  
          Started by f.saeidi, Today, 08:03 AM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by samish18, 04-17-2024, 08:57 AM
          15 responses
          53 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Working...
          X