> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ninjatrader.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server.

# Trading Hours

## Definition

Represents the Trading Hours information returned from the current bars series. The Trading Hours object contains several methods and properties for working with various trading sessions.

The properties in this class should NOT be accessed within the [OnStateChange()](/developer/desktop-sdk/references/common/onstatechange) method before the State has reached State.DataLoaded

## Methods and Properties

| Method/Property                                                                                              | Description                                                                                                          |
| ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- |
| [Get()](/developer/desktop-sdk/references/common/tradinghours/tradinghoursget)                               | Returns the Trading Hours object for the specified Trading Hours template name                                       |
| [GetPreviousTradingDayEnd()](/developer/desktop-sdk/references/common/tradinghours/getprevioustradingdayend) | Returns the end date and time of the previous trading session relative to the time passed in the methods parameters. |
| [Holidays](/developer/desktop-sdk/references/common/tradinghours/holidays)                                   | A collection of full holidays which are configured for a Trading Hours template                                      |
| [Name](/developer/desktop-sdk/references/common/tradinghours/tradinghours-name)                              | Indicates the name of the trading hours template applied to the Bars series object.                                  |
| [PartialHolidays](/developer/desktop-sdk/references/common/tradinghours/partialholidays)                     | A collection of partial holidays which are configured for a Trading Hours template                                   |
| [Sessions](/developer/desktop-sdk/references/common/tradinghours/tradinghours-sessions)                      | A collection of session definitions of the trading hours template.                                                   |
| [TimeZoneInfo](/developer/desktop-sdk/references/common/tradinghours/timezoneinfo)                           | Indicates a time zone that is configured by a Trading Hour template                                                  |