> 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.

# TimeSeries<datetime>

## Definition

Represents historical time stamps as an **ISeries\<datetime>** interface which can be used for custom NinjaScript object calculations.

Note: In most cases, you will access the historical time series using a core event handler such as **OnBarUpdate**. For more advanced developers, you may find situations where you wish to access historical time series outside of the core event methods, such as your own custom mouse click. In these advanced scenarios, you may run into situations where the **barsAgo** pointer is not in sync with the current bar, which may cause errors when trying to obtain this information. In those cases, use the **Bars.Get...()** methods with the absolute bar index, e.g., [**Bars.GetTime()**](/developer/desktop-sdk/references/common/bars/gettime).

## Single ISeries\<datetime>

* [Time](/developer/desktop-sdk/references/common/iseriest/timeseries/time)
* A collection of historical bar time stamp values.

## Multi-Time Frame ISeries\<datetime>

* [Times](/developer/desktop-sdk/references/common/iseriest/timeseries/times)
* Holds an array of **ISeries\<datetime>** objects holding historical bar times.