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 Max238, Today, 01:28 AM
          4 responses
          36 views
          0 likes
          Last Post Max238
          by Max238
           
          Started by r68cervera, Today, 05:29 AM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by geddyisodin, Today, 05:20 AM
          1 response
          11 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by timko, Today, 06:45 AM
          2 responses
          14 views
          0 likes
          Last Post NinjaTrader_ChristopherJ  
          Started by habeebft, Today, 07:27 AM
          0 responses
          7 views
          0 likes
          Last Post habeebft  
          Working...
          X