Reference

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:

KindExampleWhat changes it
CapabilityThe engine runs 16 timeframesNothing you can buy. It is what the code does.
EntitlementFree and Pro may use 4 of them, Power 8, Quant and Enterprise all 16Your plan.
DataNo stock has premarket barsNothing. The data does not exist.

Timeframes#

The engine runs sixteen, and so does the parser:

text
1m  3m  5m  15m  30m  45m  1h  2h  4h  6h  8h  12h  1d  3d  1w  1M

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

Anything else is not a timeframe

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:

RunCeiling
Any single run2,000,000 bars
One asset, built in indicators only4,000,000 bars
A portfolio, summed across every sleeve500,000 bars
Any run using a custom indicator350,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#

CryptoEquitiesForexMetals
Name itBTC, BTCUSDTAAPL, NASDAQ:AAPLEURUSDXAUUSD, gold
DataBinance and other major venuesTradingView oracleTradingView oracleTradingView oracle
Session24/7US regular hours, 09:30 to 16:00 ETContinuous 24x5Continuous 24x5
Trading year365 days252 days260 days260 days
DepthThe pair's full listing history3,528 bars back from today, per timeframe (table below)3,528 bars, on a 24x5 session3,528 bars, on a 24x5 session
Default cost0.05% fee + 0.02% slippage0.01% fee + 0.02% slippage0.01% slippage, no commission0.015% slippage, no commission
Funding, open interest, basisYesNoNoNo
Stops in pipsNoNoYesNo
Overnight swapNot applicableNot applicableModelledNot 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:

TimeframeBars per dayHistory for 3,528 bars
1m3909 trading days
3m13027 trading days (about 5 weeks)
5m7845 trading days (about 2 months)
15m26about 6.5 months
30m13about 1 year 1 month
45m9about 1 year 7 months
1h72 years
2h43.5 years
4h27 years
1d114 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.

Depth and the bar ceilings are separate limits

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 ScriptJavaScriptPythonCSV upload
Runs whereTradingView, via our oracleOur sandboxOur sandboxNowhere, the values are already computed
Pinned to a symbol/timeframeYes, recompiled per symbolNoNoYes, to the file's range
Works on every asset classYesYesYesYes
Time budgetOracle round trip3 seconds3 secondsNot applicable
MemoryNot applicable64 MB64 MBNot applicable
Size limit100,000 characters128 KB128 KB5 MB, 100,000 rows
Plots / inputsPine's own12 / 2412 / 24One column each
Bars per run350,000350,000350,000350,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 assumed on 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.