Limits
What each asset class and each indicator language can and cannot do, the bar ceilings on a run, and which timeframes your plan may use.
Everything here is enforced by the engine, so you meet these as a refusal before a run starts, not as a wrong number afterwards. Three kinds of limit get mixed up constantly, and they behave differently:
| Kind | Example | What changes it |
|---|---|---|
| Capability | The engine runs 16 timeframes | Nothing you can buy. It is what the code does. |
| Entitlement | Free and Pro may use 4 of them, Power 8, Quant and Enterprise all 16 | Your plan. |
| Data | No stock has premarket bars | Nothing. The data does not exist. |
Timeframes#
The engine runs sixteen, and so does the parser:
1m 3m 5m 15m 30m 45m 1h 2h 4h 6h 8h 12h 1d 3d 1w 1M1M is a month. 1m is one minute. Case is the only thing that separates them.
Which of the sixteen you may run is a plan entitlement, and the pickers in the app show exactly your
list, so you cannot choose one you do not have. The pricing page has the per plan count.
Over the API or MCP, get_usage returns allowedTimeframes. Asking for one outside your list parses
cleanly and is then refused with plan_timeframe_limit.
2d, 2w, 90m and 3h have no bar duration in the engine, on any plan. They are refused at
parse with the runnable list attached, not silently rounded to something near them.
How much history one run may ask for#
Years and bars are separate limits and you meet whichever you hit first. "Unlimited history" on a plan means unlimited years. The bar ceilings are the same for everyone:
| Run | Ceiling |
|---|---|
| Any single run | 2,000,000 bars |
| One asset, built in indicators only | 4,000,000 bars |
| A portfolio, summed across every sleeve | 500,000 bars |
| Any run using a custom indicator | 350,000 bars |
A run over the ceiling is refused up front, naming a shorter range or a higher timeframe, rather than being accepted and dying partway through. Ten years of 1 minute data is about 5.2 million bars, so it is over the limit on every plan; the same decade on 5m is not.
Asset classes#
| Crypto | Equities | Forex | Metals | |
|---|---|---|---|---|
| Name it | BTC, BTCUSDT | AAPL, NASDAQ:AAPL | EURUSD | XAUUSD, gold |
| Data | Binance and other major venues | TradingView oracle | TradingView oracle | TradingView oracle |
| Session | 24/7 | US regular hours, 09:30 to 16:00 ET | Continuous 24x5 | Continuous 24x5 |
| Trading year | 365 days | 252 days | 260 days | 260 days |
| Depth | The pair's full listing history | 3,528 bars back from today, per timeframe (table below) | 3,528 bars, on a 24x5 session | 3,528 bars, on a 24x5 session |
| Default cost | 0.05% fee + 0.02% slippage | 0.01% fee + 0.02% slippage | 0.01% slippage, no commission | 0.015% slippage, no commission |
| Funding, open interest, basis | Yes | No | No | No |
| Stops in pips | No | No | Yes | No |
| Overnight swap | Not applicable | Not applicable | Modelled | Not modelled |
What each "no" actually means. Open interest and funding are read from Binance, so there is no series to read on a stock or a currency pair. A pip is defined for a currency pair and nowhere else: brokers quote gold in both 0.01 and 0.1 and call either one a pip, so a stop in pips on gold is refused by name rather than guessed at. Metals accrue no swap because no lease rate series exists to compute one from, and treating it as zero would assert that gold has no carry, which is false.
Forex swap is modelled from central bank and overnight interbank rates for 15 currencies, charged per rollover night with the usual Wednesday triple. CNH, SGD and HKD trade but accrue no swap, because no overnight rate series is published for them; the run says so rather than charging zero quietly.
How far back stock data reaches#
Equities, forex and metals are served by the TradingView oracle, and it reaches back a fixed number of bars from today per symbol and timeframe: 3,528. So the depth is counted in bars, and what that buys in time depends on the timeframe. On the 390 minute US equity session:
| Timeframe | Bars per day | History for 3,528 bars |
|---|---|---|
| 1m | 390 | 9 trading days |
| 3m | 130 | 27 trading days (about 5 weeks) |
| 5m | 78 | 45 trading days (about 2 months) |
| 15m | 26 | about 6.5 months |
| 30m | 13 | about 1 year 1 month |
| 45m | 9 | about 1 year 7 months |
| 1h | 7 | 2 years |
| 2h | 4 | 3.5 years |
| 4h | 2 | 7 years |
| 1d | 1 | 14 years |
A stock run whose range starts before the reach is refused before a credit is spent, with code
DATA_HISTORY_REACH, the earliest date the data covers, and the two ways out: start the range on or
after that date, or use a higher timeframe for a longer one. It is a data limit, the same on every
plan, and it does not apply to crypto, where exchange history reaches the pair's listing.
Forex and metals trade 24 hours a day, five days a week, so the same 3,528 bars cover a shorter calendar on intraday timeframes (about 7 months on 1h) and the same 14 years on daily.
The reach says how far back the data exists. The bar ceilings above say how much of it one run may span. You meet whichever you hit first.
Premarket and after hours prints are not in the equities feed at all, so a strategy cannot trade them. Egypt (EGX) is supported alongside US equities, with its own holiday tolerance.
Writing your own indicator#
Four ways, and they are not interchangeable. The gate is per plan; see the pricing page for which tier carries which.
| Pine Script | JavaScript | Python | CSV upload | |
|---|---|---|---|---|
| Runs where | TradingView, via our oracle | Our sandbox | Our sandbox | Nowhere, the values are already computed |
| Pinned to a symbol/timeframe | Yes, recompiled per symbol | No | No | Yes, to the file's range |
| Works on every asset class | Yes | Yes | Yes | Yes |
| Time budget | Oracle round trip | 3 seconds | 3 seconds | Not applicable |
| Memory | Not applicable | 64 MB | 64 MB | Not applicable |
| Size limit | 100,000 characters | 128 KB | 128 KB | 5 MB, 100,000 rows |
| Plots / inputs | Pine's own | 12 / 24 | 12 / 24 | One column each |
| Bars per run | 350,000 | 350,000 | 350,000 | 350,000 |
Pine goes through TradingView on every asset class, including crypto. Crypto candles come from Binance, but a Pine indicator in that run is still compiled by the oracle against the same symbol, so it spends the shared request budget that crypto data itself never touches. A long crypto backtest with a Pine indicator is slower than the same backtest with a built in one for exactly that reason.
JavaScript and Python are the same capability with the same helpers and the same numbers. Neither is pinned to anything: the saved indicator recomputes against whatever bars a run uses, so one indicator works on every symbol and every timeframe. Neither can reach the network, read the clock, or use randomness, so a backtest reproduces. See JavaScript and Python.
A CSV carries values you computed elsewhere. It is aligned onto the run's bars by timestamp, and it covers only the dates in the file, so using it on another symbol or a later range means uploading again.
Portfolios#
A book holds one asset class and one session calendar. A mixed book is refused, naming both sleeves, because two session grids and two annualisation bases cannot share one equity curve. The v1 portfolio path is spot crypto, up to 20 assets; see Portfolios. The portfolio builder in the terminal is an Enterprise feature; Power and Quant run portfolios through a connected AI agent.
What the engine will not do at all#
- No premarket or after hours equities data. The feed carries regular hours bars only.
- No trading calendar lookup. Holidays are inferred from gaps in the data, tolerated up to 4.5 days for US venues and 11 for Egypt.
- No broker specific spreads or swap rates. Every cost applied when your query does not state one
is a documented default, labelled
assumedon the run. - No regime attribution below 5 trades or 60 bars. The run says why instead of showing an empty panel.
Related: Markets & data, Costs & fees, Plans & credits.