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

Bar Timer off by ~1-2 seconds

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

    Bar Timer off by ~1-2 seconds

    So I use the bar timer to time when to open a position and it's frustrating as there is often movement that I like to take advantage of right when a candle opens. I sync my system clock once per hour and it shows an inaccuracy of ~0.02 seconds usually, so I know it's not my system clock. Here's a picture of the discrepancy between my system clock and the ninjatrader clock.Click image for larger version

Name:	Bar Tier.png
Views:	289
Size:	47.9 KB
ID:	1133294

    #2
    Hello araizes,

    Thank you for your post.

    The bar timer wouldn't be expected to be exactly spot on to your PC clock as it runs On Each Tick and is only updated with a new value when a new tick comes in. It is meant to be an approximate bar countdown and should not be compared to a PC time of day clock.

    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Is there any way to get a bar timer which does not run on each tick?

      Comment


        #4
        Hello araizes,

        Thank you for your reply.

        I'm not aware of any existing bar timer that uses the PC time rather than the timestamped incoming ticks. Since NinjaScript is primarily event based, ticks need to actually be coming in to form a bar, and thus the timer is based off the timestamps of incoming ticks.

        Please let us know if we may be of further assistance to you.
        Kate W.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by TraderG23, 12-08-2023, 07:56 AM
        9 responses
        382 views
        1 like
        Last Post Gavini
        by Gavini
         
        Started by oviejo, Today, 12:28 AM
        0 responses
        1 view
        0 likes
        Last Post oviejo
        by oviejo
         
        Started by pechtri, 06-22-2023, 02:31 AM
        10 responses
        125 views
        0 likes
        Last Post Leeroy_Jenkins  
        Started by judysamnt7, 03-13-2023, 09:11 AM
        4 responses
        59 views
        0 likes
        Last Post DynamicTest  
        Started by ScottWalsh, Yesterday, 06:52 PM
        4 responses
        36 views
        0 likes
        Last Post ScottWalsh  
        Working...
        X