Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Where is the NT BarTimer code?

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

    Where is the NT BarTimer code?

    Hello,

    I am looking for the NinjaTrader BarTimer code that was released by NinjaTrader as official reference code. Unfortunately, I cannot find it. (I am looking for the NT8 version.)

    Can someone please post a link to the official NinjaTrader 8 BarTimer indicator code?

    Thanks.

    #2
    Hello flonkle,

    Thanks for your post.

    The bar timer code in NT8 can be accessed by New>Ninjascript Editor.
    In the editor on the right side double left click the "indicators" folder. The indicators are alphabetically listed, you can then double left click on the indicator "BarTimer" to then see the code in the editor.

    Comment


      #3
      Thanks for the info Paul. I didn't realize the BarTimer indicator came pre-loaded with NT8. I was looking for it in the reference code section of the support forum.

      However, upon looking at the BarTimer code, I see a few checks to make sure data is real-time data with the code:

      Code:
      if (State == State.Realtime) { // do something here }
      But in the Help Guide in the Code Breaking Changes section, the guide indicates we should check for real-time data with the following conditional:

      Code:
      if (State >= State.Realtime) {  // do something here }
      So, which is the preferred method for checking for the presence of real-time data in our code? Should we check with an "==" or a ">=" operator when checking for the presence of real-time data in our NinjaScript code?

      Comment


        #4
        Hello flonkle,

        Thanks for your reply.

        You can use either as they both will work.

        Personally, I prefer the == as there is no question about what state you are in when true.

        I would encourage you to test what works best for you.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        574 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        333 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        553 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        551 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X