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 aa731, Today, 02:54 AM
    0 responses
    4 views
    0 likes
    Last Post aa731
    by aa731
     
    Started by thanajo, 05-04-2021, 02:11 AM
    3 responses
    470 views
    0 likes
    Last Post tradingnasdaqprueba  
    Started by Christopher_R, Today, 12:29 AM
    0 responses
    10 views
    0 likes
    Last Post Christopher_R  
    Started by sidlercom80, 10-28-2023, 08:49 AM
    166 responses
    2,237 views
    0 likes
    Last Post sidlercom80  
    Started by thread, Yesterday, 11:58 PM
    0 responses
    5 views
    0 likes
    Last Post thread
    by thread
     
    Working...
    X