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:	291
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 cre8able, Yesterday, 01:16 PM
        3 responses
        11 views
        0 likes
        Last Post cre8able  
        Started by ChartTourist, Today, 08:22 AM
        0 responses
        4 views
        0 likes
        Last Post ChartTourist  
        Started by LiamTwine, Today, 08:10 AM
        0 responses
        2 views
        0 likes
        Last Post LiamTwine  
        Started by Balage0922, Today, 07:38 AM
        0 responses
        5 views
        0 likes
        Last Post Balage0922  
        Started by JoMoon2024, Today, 06:56 AM
        0 responses
        6 views
        0 likes
        Last Post JoMoon2024  
        Working...
        X