Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Daylight Saving Time US and Europe

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

    Daylight Saving Time US and Europe

    In US, DST changes on second sunday in March and on first sunday in November. But in Europe, on last sunday in March and on last sunday in September.

    I am from Europe and I have to trade US futures one hour earlier at these times. I'am working on my automated trading strategy and I need to correct the times by a script and don't know how.

    I'd like to make a test like this:

    if (today localtime is summertime
    && today US time is summertime)

    { trade as usual }
    else { trade one hour earlier }

    Is there any C# function to do this?

    #2
    xmms1,

    You can try searching google or MSDN for daylight savings for DateTime objects.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Just change the time of the computer to CST. That's what I did.

      Baruch

      Comment


        #4
        I don't want to change the time. I want to trade using my time. I am trying to find a C# method but nothing suitable found. I'm not a programmer.

        Comment


          #5
          Doing so may require programming. Unfortunately if there is no pre-built method you would have to create your own. I am sure there are some code snippets to do so on google, but unfortunately this is beyond the scope I can offer support for. Thank you for understanding.
          Josh P.NinjaTrader Customer Service

          Comment


            #6
            Hi xmms1,

            there is indeed a function which tells you, if your local computer time is daylight saving time: DateTime.IsDaylightSavingTime. But it doesn't solve your problem with US DST.

            Here is a proposal for a patch (quick and dirty):
            Define two groups of three variables for your strategy: DaylightSavingStart, DayLightSavingStop, Offset

            Offset is the hour-delay for the timeperiod of concern. If you define that for both US and EU-Time, then you could compare against the current Date/Time of your strategy and offset the trading time accordingly.

            Regards
            Ralph

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            647 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            369 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            108 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            572 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            573 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X