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 bmartz, 03-12-2024, 06:12 AM
            4 responses
            31 views
            0 likes
            Last Post bmartz
            by bmartz
             
            Started by Aviram Y, Today, 05:29 AM
            4 responses
            12 views
            0 likes
            Last Post Aviram Y  
            Started by algospoke, 04-17-2024, 06:40 PM
            3 responses
            28 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by gentlebenthebear, Today, 01:30 AM
            1 response
            8 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by cls71, Today, 04:45 AM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Working...
            X