Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ninjascript NT8 - TIME[0]

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

    Ninjascript NT8 - TIME[0]

    Dear all, hope you are fine.
    how can I know the time zone that gets time[0] (GMT, EST etc..)?
    there is some code sample to get first bar of London Session?
    thank you

    #2
    By default, the timezone of Time[0] is the same as whatever your local PC is set to.
    Last edited by bltdavid; 08-17-2021, 08:59 AM. Reason: Added 'By default' --thanks Jim!

    Comment


      #3
      Thank you! and the time is shown is the time when bar is closed?

      Comment


        #4
        Hello fscabrera03,

        Thanks for your post.

        To be exact, the timezone in NinjaTrader 8 is set in the Control Center's Tools > Options > General menu. It will initially grab your PC timezone on first installation.

        Yes, Time[0] represents the timestamp of the bar. This would be when the bar will close for time based, and the last tick that updated the bar for tick based.

        Session breaks are controlled by the Trading Hours template applied to your data series. To pick up on the first bar of a session in a script, you can use Bars.IsFirstBarOfSession.

        https://ninjatrader.com/support/help...rofsession.htm

        Let us know if you have any additional questions.


        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by kinfxhk, 07-14-2026, 09:39 AM
        0 responses
        7 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-13-2026, 10:18 AM
        0 responses
        59 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-13-2026, 09:50 AM
        0 responses
        41 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-13-2026, 07:21 AM
        0 responses
        47 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-11-2026, 02:11 AM
        0 responses
        38 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X