Skip to content
Back to App

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

FeatureStatus
indicator(), strategy() declarationsSupported
input.int, input.float, input.bool, input.string, input.color, input.source, input.timeframe, input.session, input.timeSupported
plot(), hline()Supported
plotshape(), plotchar()Supported — rendered as chart markers
var and varip variablesSupported
if / else, for, while, switchSupported
Series history operator x[n]Supported
Arrays, matrices, mapsPartial — whatever the transpiler passes through; treat as experimental

ta.* functions

Supported:

CategoryFunctions
Moving averagessma, ema, rma, wma, vwma, swma, smma
Oscillatorsrsi, macd, stoch, cci, mfi
Bands & dispersionbb, stdev, variance, dev, atr, tr
Extremes & statshighest, lowest, highestbars, lowestbars, median, percentrank, linreg, correlation
Change & accumulationchange, mom, roc, sum, cum
Crosses & conditionscross, crossover, crossunder, rising, falling
Pivots & eventspivothigh, pivotlow, barssince, valuewhen
Volumeobv, 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

FeatureStatus
math.*abs, ceil, floor, sqrt, pow, exp, log, log10, trig functions, round, max, min, avg, signSupported
na, nz, fixnanSupported
barstate.*isfirst, islast, ishistory, isrealtime, isnew, isconfirmed, islastconfirmedhistorySupported — live values while the open candle streams (isconfirmed is false on intrabar updates)
Time functions — year, month, dayofmonth, dayofweek, hour, minute, secondSupported — evaluated in the exchange timezone
StdPlus extras — Bollinger, Keltner, HMA, and moreSupported

Drawing objects

FeatureStatus
box.new + box.set_* / box.deleteRendered on the chart (background, border color/width/style, text)
line.new + line.set_* / line.deleteRendered — solid/dashed/dotted styles, width, extend.left/right/both
label.new + label.set_* / label.deleteRendered — bubble with pointer per label.style_*, text color and size, yloc.abovebar/belowbar anchoring
table.new / table.cell / table.clearRendered as a screen-anchored panel (all nine position.* corners)
linefill.newNot 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

FeatureBehavior
request.security() / multi-timeframe dataNot supported
barcolor(), bgcolor(), fill()Not rendered
alertcondition(), alert()No-ops — accepted but do nothing
Percent-of-equity position sizingNot supported — fixed quantity only
ta.supertrend, ta.sar, ta.dmi, ta.adxClear “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

LimitValue
Script source size (editor)100 KB
Imported .pine file size30 MB (over 100 KB: stored and exportable only — cannot open in the editor or run on charts)
Total script storage per account100 MB (default)
Saved scripts per account50
Applied indicators per symbol10
History run time30 seconds

Next steps