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:	134
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:	122
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 DannyP96, 05-18-2026, 02:38 PM
        1 response
        85 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        143 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        83 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        256 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        334 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X