Dies backtesting use the same setting? or can it be specified to use the exchange timezone?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Backtesting timezone
Collapse
X
-
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.
-
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
-
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
-
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
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
141 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
76 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
47 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
51 views
0 likes
|
Last Post
|

Comment