> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hyperprop.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Other timeframes

> Read bars from other timeframes or symbols with request.bars, without lookahead by default.

`request.bars` is Hyperprop Script's equivalent of Pine's `request.security`.
Declare each series at the top level of your script. The chart loads it and
re-runs `compute` when it arrives or updates.

```js theme={null}
const daily = request.bars('1D');                          // same symbol, daily bars
const today = request.bars('1D', { developing: true });    // plus the day in progress
const other = request.bars('5m', { symbol: 'ESZ6' });      // another symbol
```

## Timeframes

`'15s'`, `'1m'`, `'5m'`, `'15m'`, `'1h'`, `'4h'`, `'1D'` and `'1W'`. Pine's
`'D'`, `'W'`, `'60'` and `'240'` work too. Lowercase `m` means minutes.
Monthly bars are not supported.

## The handle

Inside `compute`, the returned handle exposes:

| Field | Meaning |
| - | - |
| `h.bars` | The requested series, oldest first: `{ time, o, h, l, c, v }`. Pass it to `hp.*` helpers. |
| `h.align(values)` | Maps a series computed on `h.bars` to one value per **chart** bar. |
| `h.open`, `h.high`, `h.low`, `h.close`, `h.volume` | The requested bar's OHLCV, one value per chart bar. |
| `h.index` | For each chart bar, the index into `h.bars` it sees, or `null`. |
| `h.status` | `'ready'`, `'loading'` (data is on its way) or `'unavailable'`. |
| `h.timeframe`, `h.timeframeMs`, `h.symbol` | What you requested. `symbol` is `null` for the chart's own symbol. |

Return early while the series is loading:

```js theme={null}
if (daily.status !== 'ready') return { plots: [] };
```

## No lookahead by default

A chart bar only sees requested bars that had **closed** by the chart bar's
own close, and `h.bars` contains closed bars only.

On a 1-minute chart, every bar of today sees yesterday's daily bar. Today's
daily values appear once the day closes. That's what you would have known in
real time, so historical values don't repaint.

## The developing bar

Pass `developing: true` to include the bar that is still forming:

* `h.bars` ends with the bar in progress.
* `h.open`, `h.high`, `h.low`, `h.close` and `h.volume` show that bar **as it
  stood at each chart bar**. For example, on a 1-minute chart, `today.high`
  is the day's high so far at each minute, not the final high.
* `h.align()` maps each chart bar to the bar in progress using that bar's
  values as loaded. On history, that is the bar's final value, like Pine's
  `lookahead_on`. Use the OHLCV arrays when you need values that were known
  at the time.

In bar replay, a script never sees bars after the replay position.

## Limits and availability

* Up to **4 distinct series** per script. Requesting the same series twice
  counts once.
* The **latest 5000 bars** of each series.
* Higher timeframes of the chart's own symbol always work and update live.
* Other symbols and lower timeframes depend on the chart having history for
  them. Check `h.status`. With `{ symbol }`, the series updates as often as
  the chart refreshes that symbol's history.

## Example: daily ATR on a 1-minute chart

Plots yesterday's high and low and shows yesterday's 14-day ATR in a table:

```js theme={null}
const length = input.int('ATR length', 14, { min: 1, max: 100 });
const daily  = request.bars('1D');

function compute(bars, inputs, hp) {
  if (daily.status !== 'ready') return { plots: [] };
  const atr = daily.align(hp.atr(daily.bars, length));  // daily ATR on every chart bar
  const last = bars.length - 1;
  return {
    plots: [
      { title: 'PDH', values: daily.high, color: '#26a69a', style: 'dashed' },
      { title: 'PDL', values: daily.low,  color: '#ef5350', style: 'dashed' },
    ],
    tables: [{ align: 'center', cells: [
      ['Daily ATR', { text: atr[last]?.toFixed(2) ?? '–', align: 'right' }],
    ] }],
  };
}
```

## Example: today's open and high so far

```js theme={null}
const today = request.bars('1D', { developing: true });

function compute(bars) {
  if (today.status !== 'ready') return { plots: [] };
  return {
    plots: [
      { title: 'Day open', values: today.open, color: '#90a4ae', style: 'dotted' },
      { title: 'Day high', values: today.high, color: '#26a69a' },
      { title: 'Day low',  values: today.low,  color: '#ef5350' },
    ],
  };
}
```


## Related topics

- [Porting from Pine Script](https://docs.hyperprop.com/indicators/pine-porting.md)
- [Limits](https://docs.hyperprop.com/indicators/limits.md)
- [Custom indicators](https://docs.hyperprop.com/indicators/overview.md)
- [Changelog](https://docs.hyperprop.com/changelog.md)
- [Chart context](https://docs.hyperprop.com/indicators/chart-context.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.