Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

timezone issue?

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

    timezone issue?

    I have a perfectly working strategy that will enter trades between 21:50 and 22:05 based on my timezone (GMT+8) relative to EST market hours (9:50am - 10:05am). This is achieved using the integer values 215000 and 220500 in my codes.

    However, when I move this strategy to my server in Arizona, the backtest results are completely different. I've changed my customed session to reflect (UTC-5) for Arizona time and changed the time in my strategy to 65000 and 70500 to align to EST market hours. (with daylight saving)

    Please advice what's wrong...

    #2
    Hello rogueTrader,

    Arizone in is US Mountain time zone, which differs 2 hours from US Eastern time zone. I suggest to use 75000 and 80500 in your strategy and check if results are similar.
    JasonNinjaTrader Customer Service

    Comment


      #3
      Hi Jason,

      I've changed the time to Mountain Time and the time in my strategy to 75000 and 80500. But the results still differ. Please see the screenshots i've attached.
      Attached Files

      Comment


        #4
        Could it be the backtests use different historical data? Do you use the same connectivity provider in both tests? I see that one backtest ends at 10/18/2010 and the other ends at 10/17/2010.

        Different session templates are selected as well. I am not sure if they use the exact same times.

        Please use the exact same data and backtest settings and data should resemble.
        JasonNinjaTrader Customer Service

        Comment


          #5
          Yes, both uses the data from Kinetick.

          I'll probably test with a run of the mill strategy and see if the results differs again to try and isolate the problem to either the strategy or NT7.

          Also, I'm running NT7 on a Win2008 while Win7 on the other. Any issues?
          Last edited by rogueTrader; 10-19-2010, 05:50 AM.

          Comment


            #6
            There are no issues with the operating systems you mention.

            I suggest to use the same begin and end times for both tests and use the same session template. Subsequently check if results resemble.
            JasonNinjaTrader Customer Service

            Comment


              #7
              Jason, I managed to get the same backtest results after I changed the session time, the timing in the strategy and the server time to exactly the same settings as my other computer.

              I thought NT7 should be working fine and it's probably my strategy. Therefore, i created a very simple strategy for backtesting across the 2 servers with different session and surprisingly, the results differs again.

              I have reloaded the historical data and really have no idea what might be wrong. Please see the results of the comparison that I have attached.
              Attached Files
              Last edited by rogueTrader; 10-19-2010, 10:05 AM.

              Comment


                #8
                The screenshot displays a different session template is selected. Can you please select the same session template and check if results resemble.
                JasonNinjaTrader Customer Service

                Comment


                  #9
                  I can't use the same session as the 2 servers are in different timezones...

                  Comment


                    #10
                    In case you want to know, this is the test code i'm using to test on both servers in UTC-7 and GMT+8 timezone
                    publicclass test : Strategy
                    {
                    #region Variables
                    // Wizard generated variables
                    // User defined variables (add any user defined variables below)
                    #endregion
                    ///<summary>
                    /// This method is used to configure the strategy and is called once before any strategy method is called.
                    ///</summary>
                    protectedoverridevoid Initialize()
                    {
                    CalculateOnBarClose =
                    true;
                    }
                    ///<summary>
                    /// Called on each bar update event (incoming tick)
                    ///</summary>
                    protectedoverridevoid OnBarUpdate()
                    {
                    // Condition set 1
                    if (CrossAbove(EMA(2), EMA(5), 1))
                    {
                    EnterLong(DefaultQuantity,
                    "");
                    }
                    }
                    #region Properties
                    #endregion
                    }
                    }

                    Comment


                      #11
                      I suggest to set the time zone the same on both servers as you did before. Subsequently select the same session template and check if results resemble.
                      JasonNinjaTrader Customer Service

                      Comment


                        #12
                        Thanks Jason, I guess that is the only workaround now. But you guys might want to look into this and determine if this is some kind of bug.

                        Comment


                          #13
                          Likely, you used different historical data on each server that caused the different results. If you perform a backtest on the exact same data and you use the exact same settings, the results will resemble.
                          JasonNinjaTrader Customer Service

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by benmarkal, Yesterday, 12:52 PM
                          3 responses
                          22 views
                          0 likes
                          Last Post NinjaTrader_Gaby  
                          Started by helpwanted, Today, 03:06 AM
                          1 response
                          17 views
                          0 likes
                          Last Post sarafuenonly123  
                          Started by Brevo, Today, 01:45 AM
                          0 responses
                          11 views
                          0 likes
                          Last Post Brevo
                          by Brevo
                           
                          Started by aussugardefender, Today, 01:07 AM
                          0 responses
                          6 views
                          0 likes
                          Last Post aussugardefender  
                          Started by pvincent, 06-23-2022, 12:53 PM
                          14 responses
                          244 views
                          0 likes
                          Last Post Nyman
                          by Nyman
                           
                          Working...
                          X