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

# Limits

> The execution budget, sandbox rules, caps and history depth that apply to indicator scripts.

Design your scripts around these limits.

## Execution budget

Scripts run in the background, so a slow script never freezes the chart.
Each run still has a time budget:

| Run | Budget |
| - | - |
| Full calculation over every loaded bar (when the script is added, its settings change or new history loads) | **5000 ms** |
| Live update on each new tick | Twice the time of the last full calculation, at least **1000 ms** |

If a live update runs over its budget, the script is recalculated in full. If
the full calculation runs over, it is retried once on the **last 2000 bars**.
The chart then shows the result with the note "Calculated on the last 2000
bars for speed". Earlier bars have no values until you edit the script.

A script that still runs over, such as one stuck in an infinite loop, is
stopped with "Script exceeded the 5000ms execution budget (possible infinite
loop)". It stays off until you edit it.

Keep loops proportional to the number of bars. Avoid rescanning the whole
series for every bar. A common slow pattern is recomputing an anchored VWAP
from every swing with nested loops. Use
[`hp.avwap`](https://docs.hyperprop.com/indicators/helpers#anchored-vwap-from-swings) instead, which
does it in one pass.

## Synchronous only

No `async`, `fetch` or timers. `compute` must return its result directly.

## Sandbox

Scripts run isolated from the terminal page. There is no `window`,
`document`, storage, network access, `eval`, `new Function` or `import()`.
Only plain JavaScript built-ins, `console` and `performance.now()` are
available. `Intl.DateTimeFormat` works for time zone math.

Return plain data: numbers, strings, arrays and objects.

## No persistence

Nothing is kept between runs. Model "current state" by replaying your rules
over the series inside `compute`. See the
[signal engine example](https://docs.hyperprop.com/indicators/examples.md#signal-engine).

## Caps

| What | Limit |
| - | - |
| Other timeframes or symbols (`request.bars`) | 4 distinct series, latest 5000 bars each |
| Boxes | 2000 in the visible range |
| Labels, lines, markers, background bands | first 2000 of each type |
| Tables | 20 tables, 100 rows, 20 columns |

## History depth

A script sees the bars the chart has loaded. By default that is about:

| Timeframe | History |
| - | - |
| 15s | 2 days |
| 1m (and intervals built from it) | 14 days |
| 1h | 180 days |
| 4h | 365 days |
| Daily and weekly | 2 years |

Panning back loads more history and re-runs the script.

## Not supported

* Restyling the main price series (Pine `plotcandle` and `barcolor`).
* Filling between two plots (Pine `fill`). Plot the two boundaries, or draw
  boxes.
* Alerts from scripts (Pine `alertcondition`). Price alerts are a separate
  terminal feature.


## Related topics

- [Rate limits & quotas](https://docs.hyperprop.com/concepts/rate-limits.md)
- [Submit a market, limit, or stop order](https://docs.hyperprop.com/trade-api/orders/submit-a-market-limit-or-stop-order.md)
- [Real-time trading stream](https://docs.hyperprop.com/guides/realtime-trading-stream.md)
- [Tables](https://docs.hyperprop.com/indicators/tables.md)
- [Partner integrations](https://docs.hyperprop.com/guides/partner-integrations.md)


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