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:	287
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 Waxavi, Today, 02:10 AM
        0 responses
        3 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Started by TradeForge, Today, 02:09 AM
        0 responses
        9 views
        0 likes
        Last Post TradeForge  
        Started by Waxavi, Today, 02:00 AM
        0 responses
        2 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Started by elirion, Today, 01:36 AM
        0 responses
        4 views
        0 likes
        Last Post elirion
        by elirion
         
        Started by gentlebenthebear, Today, 01:30 AM
        0 responses
        4 views
        0 likes
        Last Post gentlebenthebear  
        Working...
        X