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 Mindset, 04-21-2026, 06:46 AM
        0 responses
        90 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        137 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        68 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        120 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        71 views
        0 likes
        Last Post PaulMohn  
        Working...
        X