Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bars are not calculated correctly because clock is not synced

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

    Bars are not calculated correctly because clock is not synced

    Hi,

    I'm running strategy on 5 min bars when connecting to MB Trading.
    I use CalculateOnBarClose = true;.
    The problem is that "OnBarUpdate" method is called according to my computer clock and the chart on the trading software is built according to its clock which is delayed in few seconds.

    Because of it, I can't calculate the correct size of the bar and I get false triggers.

    Anyway experienced it ?

    10x,

    #2
    Hello shayhz,

    Correct, NinjaTrader charts are based off of your local PC clock.
    You may use the steps below to sync the PC clock to a time server, note most servers use the time.nist.gov.

    You can sync your PC clock by double clicking on the clock in the lower right corner of your desktop. Press 'Change date and time...'

    Once you have done that, click on Internet Time tab set the server to time.nist.gov and then click Update. Your PC clock should now be updated. Make sure you install any windows updates as some windows updates will effect how your clock is synced as well.

    After updating your PC clock, please restart NinjaTrader and let me know if you are still having issues.

    Please note that OnBarUpdate() will only be called once a tick of data comes in, for example if you have a 1 minute chart open and a tick of data does not come in until 2-3 seconds after the minute has passed it will not be ran until the tick of data comes in but it is still processed on that bar.

    Let us know if we can be of further assistance.
    JCNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    88 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    48 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    30 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    34 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    68 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X