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

Help on ToTime(Time[0])

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

    Help on ToTime(Time[0])

    Hello Everyone,

    I moved my Ninja Trader installation to a different computer and now something kind of stop working in my script. I have a strategy with an instrument set for every 30 minutes CalculateOnBarClose = false.

    I'm treating every tick on the method OnBarUpdate, since my instrument frequency on the strategy is set every minutes, for example, at 9:20am the method ToTime(Time[0]) would show 9:30am. Another example, if right now was 10:16am, the ToTime(Time[0]) would show 10:30am.

    Thing is , now that I installed NT on another computer, even making sure I set it up everything as it was before, right now ToTime(Time[0]) is always showing 18:30. On every bar update it alwas shows that.

    I can't seem to find where the problem is? Based on the description above, would you guys recommend me anything? What settings do typically affect ToTime(Time[0]) ..

    Many Thanks in Advance,

    Rodrigo

    #2
    Hello Rodrigo,

    Thank you for your note.

    Please try syncing the PC clock with the timezone.

    Please use the steps below to change your Time Zone and sync the PC clock, note to set the server to 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 time zone...' Set the Time zone and press 'OK'.

    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.

    You will need to restart NinjaTrader for this to take affect
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Awesome, it worked!!

      thanks a lot

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by StrongLikeBull, Yesterday, 04:05 PM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by Mestor, 03-10-2023, 01:50 AM
      14 responses
      375 views
      0 likes
      Last Post z.franck  
      Started by molecool, 10-09-2017, 10:48 AM
      5 responses
      1,621 views
      0 likes
      Last Post trader-ap  
      Started by The_Sec, Yesterday, 03:53 PM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by mmenigma, Yesterday, 03:25 PM
      1 response
      11 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Working...
      X