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

NinjaTrader and time Zone

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

    NinjaTrader and time Zone

    I need to understand something. How does NinjaTrader 8 uses different time Zone.

    If I develop an indicator and apply a trading hour session based on NY time.
    I also use DateTime.Now throughout my code.

    How does an Australian customer can use my indicator ?
    Does he have to create a new trading hour session based on Australian time zone or do I have to address that time zone problem within my code ?


    Thanks

    #2
    Hello,

    Thank you for the post.

    DateTime.Now specifically would refer to the clock of the PC being used. We generally suggest against using this as this would not relate to anything specifically in the platform. If you are using an indicator or strategy the DateTime.Now would not relate to any specific bar but may coincide with a ticks time potentially.

    As I am unsure what you are using DateTime.Now for currently, I couldn't really provide an alternative if there was something more acceptable for the use.

    Generally, in the platform, you would use the Time objects as these would relate to the chart data the user is seeing and would be formatted for the user.

    In NT8 the platform specifically uses NinjaTrader.Core.Globals.Now when it needs to use the PC time, this would likely be suggested if you have a similar use. This is not a documented item currently.

    If you can provide more context on how you are using DateTime.Now, I could likely provide a more direct answer.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by funk10101, Today, 09:43 PM
    0 responses
    3 views
    0 likes
    Last Post funk10101  
    Started by pkefal, 04-11-2024, 07:39 AM
    11 responses
    36 views
    0 likes
    Last Post jeronymite  
    Started by bill2023, Yesterday, 08:51 AM
    8 responses
    44 views
    0 likes
    Last Post bill2023  
    Started by yertle, Today, 08:38 AM
    6 responses
    26 views
    0 likes
    Last Post ryjoga
    by ryjoga
     
    Started by algospoke, Yesterday, 06:40 PM
    2 responses
    24 views
    0 likes
    Last Post algospoke  
    Working...
    X