Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtesting timezone

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

    Backtesting timezone

    In main prefs I have my timezone set to UTC+1 (europe).

    Dies backtesting use the same setting? or can it be specified to use the exchange timezone?

    #2
    Hello several,

    The timezone that you can set in the options menu is used to do time conversions for the chart view, the backtest will still test over the trading hours that you have selected. By default it will test over the defined trading hours for each instrument unless you specify a different set of hours to use.

    Comment


      #3
      Thanks. In my strategy I'm setting my time like this:

      StartTime = DateTime.Parse("23:00", System.Globalization.CultureInfo.InvariantCulture) ;
      EndTime = DateTime.Parse("21:15", System.Globalization.CultureInfo.InvariantCulture) ;​

      Is this correct?

      edit: I think I'm confusing myself. Now I see there's a drop down menu in the backtest window. I wanted to trade only globex hours. (overnight session)
      Last edited by several; 10-07-2024, 02:58 PM.

      Comment


        #4
        Hello several,

        The times you use in code relate to the times you see on the chart. For example if 23:00 was the session open and that is the time you wanted to target then what you used would be correct for that. You would want to look at the chart and make sure the times you use correspond to the chart time you wanted to target.

        The Trading hours dropdown is what limits when the strategy can work. That requests the data for the session during those hours and will run the strategy for only that set of hours. You can still add other time conditions in your code but that controls the overall test and what data is being used.

        Comment


          #5
          Thanks. I don't see any option for globex hours in there, is it hidden somewhere?

          Comment


            #6
            Hello several,

            I don't believe there is a template just named globex, some of the other templates may share the same hours though. The trading hours that you select will depend on your broker and what you are subscribed to and what exchange the instrument you will trade is on. Most instruments come pre defined with the default RTH trading hours for the given instrument and its default exchange. You can check if the instrument you are trading is already configured by opening the instrument manager and then editing the instrument. Check what trading hours it has defined and then you can view that trading hours set in the trading hours window to see the individual sessions.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Yesterday, 05:17 AM
            0 responses
            66 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            141 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            76 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            47 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            51 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X