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 Rapine Heihei, 04-23-2024, 07:51 PM
      2 responses
      30 views
      0 likes
      Last Post Max238
      by Max238
       
      Started by Shansen, 08-30-2019, 10:18 PM
      24 responses
      943 views
      0 likes
      Last Post spwizard  
      Started by Max238, Today, 01:28 AM
      0 responses
      9 views
      0 likes
      Last Post Max238
      by Max238
       
      Started by rocketman7, Today, 01:00 AM
      0 responses
      7 views
      0 likes
      Last Post rocketman7  
      Started by wzgy0920, 04-20-2024, 06:09 PM
      2 responses
      28 views
      0 likes
      Last Post wzgy0920  
      Working...
      X