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

Time[0]

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

    Time[0]

    Hi guys,
    I have just discovered with Time[0] that...

    On Range, Tick and Volume charts, Time[0] is roughly equivalent to DateTime.Now, updating in realtime.

    On time-based charts like Minute charts, Time[0] is in the future, when the bar is due to be complete.

    This makes using Time[0] awkward, as it can't be relied on to state something like "what is the time of the latest price - i.e. the Close[0]".

    Is this your deliberate design or an accident?
    saltminer

    #2
    saltminer, unfortunately this is expected - please see this link - http://www.ninjatrader-support.com/H...ChartBars.html

    On time based chart intervals the closing bar time is used, on tick intervals where this is not known in advance, the current time is used.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      I'm wondering why there would ever be two methods used instead of just the one for all cases? Somehow it doesn't make sense.
      eDanny
      NinjaTrader Ecosystem Vendor - Integrity Traders

      Comment


        #4
        eDanny, not sure I follow, the closing time is always used to 'stamp' the bar, just on time based charts this is known for the developing candle and on tick based charts of course not.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Not sure here why the same method is not used for time charts as the candle develops. Is this because a five minute candle could be referenced differently at any period of its development?
          eDanny
          NinjaTrader Ecosystem Vendor - Integrity Traders

          Comment


            #6
            Originally posted by eDanny View Post
            Not sure here why the same method is not used for time charts as the candle develops. Is this because a five minute candle could be referenced differently at any period of its development?
            - Time[0] represents the closing time of a bar
            - On time based bars (minutes, days, seconds) the close time of the bar is always known and does not change
            - With tick driven bars (independant of time) the close time is never known thus the time stamp of the last tick in the bar is used
            - This is standard
            RayNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by funk10101, Today, 09:43 PM
            0 responses
            4 views
            0 likes
            Last Post funk10101  
            Started by pkefal, 04-11-2024, 07:39 AM
            11 responses
            36 views
            0 likes
            Last Post jeronymite  
            Started by bill2023, Yesterday, 08:51 AM
            8 responses
            44 views
            0 likes
            Last Post bill2023  
            Started by yertle, Today, 08:38 AM
            6 responses
            26 views
            0 likes
            Last Post ryjoga
            by ryjoga
             
            Started by algospoke, Yesterday, 06:40 PM
            2 responses
            24 views
            0 likes
            Last Post algospoke  
            Working...
            X