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 NullPointStrategies, Today, 05:17 AM
        0 responses
        50 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        126 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        69 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        42 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        46 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X