> For the complete documentation index, see [llms.txt](https://fto-2.gitbook.io/fto-indicators-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fto-2.gitbook.io/fto-indicators-docs/api-reference/time-series/i-bars.md).

# iBars

Get how many bars are loaded for a symbol and timeframe.

## Signature

```typescript
iBars(symbol: string, timeframe: number): number
```

## Parameters

| Name        | Type     | Required | Description                                                                                                                                                                                  |
| ----------- | -------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `symbol`    | `string` | Yes      | Symbol from the project's available instruments; use [Symbol](/fto-indicators-docs/api-reference/current-symbol/symbol.md) for the chart symbol.                                             |
| `timeframe` | `number` | Yes      | Positive, concrete timeframe in minutes. `Timeframe.CURRENT` (`0`) is not resolved; use [Timeframe](/fto-indicators-docs/api-reference/current-symbol/timeframe.md) for the chart timeframe. |

## Returns

The number of bars available at the current testing endpoint.

## Usage

* Like [Bars](/fto-indicators-docs/api-reference/current-symbol/bars.md), but both `symbol` and `timeframe` are explicit.
* Returns the bar count for the requested series in the current test range.
* The call can create or activate the requested series, but does not download or seek its history.
* An unknown symbol or unseeked series throws instead of returning `0`.

## Example

```typescript
OnCalculate(index: number): void {
    const symbol = this.api.Symbol()
    const dailyBarCount = this.api.iBars(
        symbol,
        Timeframe.D1
    )
}
```

## Related API

* [Bar indexing](/fto-indicators-docs/api-reference/current-symbol/bar-indexing.md)
* [Bars](/fto-indicators-docs/api-reference/current-symbol/bars.md)
* [Symbol](/fto-indicators-docs/api-reference/current-symbol/symbol.md)
* [Timeframe](/fto-indicators-docs/api-reference/current-symbol/timeframe.md)
* [Timeframe values](/fto-indicators-docs/api-reference/types/time-values/timeframe.md)
