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

# TickCount

## Definition

Returns the total number of ticks of the current bar processing.

For historical usage, you must use **Calculate.OnEachTick** with [**TickReplay**](/developer/desktop-sdk/guides/educational-resources/developing-for-tick-replay) enabled; otherwise a value of 1 will be returned.

## Property Value

A long value that represents the total number of ticks of the current bar.

## Syntax

`Bars.TickCount`

## Examples

```csharp
// Prints the tick count to the output window
Print("The tick count of the current bar is " + **Bars.TickCount**.ToString());
```