Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

TimeZone not returning correctly.

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

    TimeZone not returning correctly.

    My local time is Brisbane Australia. I have the following in statechange. My comuter local time is obviously brisbane however I have ninjatrader configured to display newyork time.
    Not sure if this is related to daylight savings change

    if (State == State.SetDefaults)
    {
    Description = "Displays New York and Brisbane times at the bottom of the chart.";
    Name = "TimeLabel";
    Calculate = Calculate.OnEachTick;
    IsOverlay = true;
    AddPlot(Brushes.Transparent, "InvisiblePlot");
    }
    else if (State == State.Configure)
    {
    PrintTo = PrintTo.OutputTab2;
    localTimeZone = TimeZoneInfo.Local;
    ninjaTraderTimeZone = Bars.TradingHours.TimeZoneInfo;
    newYorkTimeZone = TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time");

    Print("Local Timezone: " + localTimeZone.Id);
    Print("Ninjatrader Timezone: " + ninjaTraderTimeZone.Id);
    Print("New York Timezone: " + newYorkTimeZone.Id);


    }

    Tools options is configured as
    Click image for larger version

Name:	image.png
Views:	108
Size:	13.9 KB
ID:	1322316​​​

    I'm currently getting the following printed out
    Local Timezone: E. Australia Standard Time
    Ninjatrader Timezone: Central Standard Time
    New York Timezone: Eastern Standard Time

    the ninjatrader timezone should be giving me eastern standard time. It is being read incorrectly. How can I resolve this.
    ​​​​

    #2
    Hello cp.trader,

    Thank you for your post.

    TimeZoneInfo indicates the time zone configured by the Trading Hours template you're using on that Bars object.



    You'll need to change the trading hours template from the Data Series window to one that uses EST.

    Please let us know if you have any further questions.

    Comment


      #3
      this is my configuration NQ should be EST time not central time. Am I missing something.
      Click image for larger version

Name:	image.png
Views:	93
Size:	55.8 KB
ID:	1322332

      Comment


        #4
        Hello,

        Thank you for your response.

        You're using the default instrument settings. Please note that NQ uses the CME US Index Futures ETH trading hours template which is set in CST, the time zone of the Chicago Mercantile Exchange.

        The actual bars on the chart will use the time zone set in the Control Center > Tools > Options window. Note that changing the time zone requires restarting NinjaTrader and re-downloading all historical data. You can download historical data by going to Tools > Historical Data.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        556 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        324 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        545 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        547 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X