Supported Pine Features
TestMax runs Pine Script v5 and v6 and covers the constructs most indicators and strategies actually use. This page is the definitive matrix: what is supported, what is partial, what is not there yet, and how the runtime behaves when a script steps outside the supported surface.
Language and declarations
| Feature | Status |
|---|---|
indicator(), strategy() declarations | Supported |
input.int, input.float, input.bool, input.string, input.color, input.source, input.timeframe, input.session, input.time | Supported |
plot(), hline() | Supported |
plotshape(), plotchar() | Supported — rendered as chart markers |
var and varip variables | Supported |
if / else, for, while, switch | Supported |
Series history operator x[n] | Supported |
| Arrays, matrices, maps | Partial — whatever the transpiler passes through; treat as experimental |
ta.* functions
Supported:
| Category | Functions |
|---|---|
| Moving averages | sma, ema, rma, wma, vwma, swma, smma |
| Oscillators | rsi, macd, stoch, cci, mfi |
| Bands & dispersion | bb, stdev, variance, dev, atr, tr |
| Extremes & stats | highest, lowest, highestbars, lowestbars, median, percentrank, linreg, correlation |
| Change & accumulation | change, mom, roc, sum, cum |
| Crosses & conditions | cross, crossover, crossunder, rising, falling |
| Pivots & events | pivothigh, pivotlow, barssince, valuewhen |
| Volume | obv, accdist, vwap (day-anchored) |
Any ta.* function not on this list fails with a descriptive runtime error — it never silently returns wrong values. In particular, ta.supertrend, ta.sar, ta.dmi, and ta.adx are not supported yet and throw a clear “not supported yet” error.
Other built-ins
| Feature | Status |
|---|---|
math.* — abs, ceil, floor, sqrt, pow, exp, log, log10, trig functions, round, max, min, avg, sign | Supported |
na, nz, fixnan | Supported |
barstate.* — isfirst, islast, ishistory, isrealtime, isnew, isconfirmed, islastconfirmedhistory | Supported — live values while the open candle streams (isconfirmed is false on intrabar updates) |
Time functions — year, month, dayofmonth, dayofweek, hour, minute, second | Supported — evaluated in the exchange timezone |
| StdPlus extras — Bollinger, Keltner, HMA, and more | Supported |
Drawing objects
| Feature | Status |
|---|---|
box.new + box.set_* / box.delete | Rendered on the chart (background, border color/width/style, text) |
line.new + line.set_* / line.delete | Rendered — solid/dashed/dotted styles, width, extend.left/right/both |
label.new + label.set_* / label.delete | Rendered — bubble with pointer per label.style_*, text color and size, yloc.abovebar/belowbar anchoring |
table.new / table.cell / table.clear | Rendered as a screen-anchored panel (all nine position.* corners) |
linefill.new | Not rendered |
Drawings honor the indicator’s visibility toggle and are capped at 500 objects
per type (oldest evicted), matching TradingView’s max_*_count ceiling.
Not supported yet
| Feature | Behavior |
|---|---|
request.security() / multi-timeframe data | Not supported |
barcolor(), bgcolor(), fill() | Not rendered |
alertcondition(), alert() | No-ops — accepted but do nothing |
| Percent-of-equity position sizing | Not supported — fixed quantity only |
ta.supertrend, ta.sar, ta.dmi, ta.adx | Clear “not supported yet” runtime error |
Libraries (import) | Not supported |
Error behavior
- Compile errors are listed in the error console when you apply a script — click an error to jump to its line.
- Runtime errors are reported with the bar index where they occurred. The first runtime error halts that script instance; other applied scripts keep running. Re-apply the script to restart it.
- Unsupported functions fail loudly. Calling an unsupported
ta.*function raises a descriptive runtime error rather than silently computing something wrong. - History runs time out at 30 seconds. A script that takes longer than 30 seconds to process the chart history halts with a timeout error.
Limits
| Limit | Value |
|---|---|
| Script source size (editor) | 100 KB |
Imported .pine file size | 30 MB (over 100 KB: stored and exportable only — cannot open in the editor or run on charts) |
| Total script storage per account | 100 MB (default) |
| Saved scripts per account | 50 |
| Applied indicators per symbol | 10 |
| History run time | 30 seconds |
Next steps
Getting Started Apply your first indicator and strategy
Indicators on Charts Panes, legend controls, and the error console in practice