Language reference

AlgoCode includes a large set of built-in functions for indicators and strategies. The table below lists tracked language features and their support level on Algocrab.

Coverage legend

  • full — implemented and usable
  • partial — limited or demo data
  • transpile — syntax transforms to JS bar loop
  • planned — on roadmap
  • none — not supported yet

AlgoCrab supported surface: 100% full (65/65). TV Spec forever-gaps tracked separately: 6. ta.* aliases 175137 targets / 141 impl.

KPI: npm run audit:pine:kpi — corpus pass-rate. Gaps (cloud libs, tick varip, full Spec AST) are explicit — not claimed as full TradingView parity.

CategorySyntaxStatus
Script//@version=6full
Scriptindicator() / study()full
Scriptstrategy()full
Scriptdefault_qty_type / valuefull
Scriptstrategy.risk.*full
Scriptlibrary() export/importfull
Languagef(x) => …full
Languagefor i = 0 to nfull
Languagewhile / switchfull
Languageenumfull
Languagetype / methodfull
input.*input.intfull
input.*input.floatfull
input.*input.boolfull
input.*input.stringfull
input.*input.source / input(close)full
input.*input.colorfull
input.*input.timeframefull
input.*input.timefull
input.*input.sessionfull
input.*input.symbolfull
Conceptsbarstate.*full
Conceptssyminfo.*full
Conceptstime, timenow, timeframe.*full
ta.*ema,sma,rma,wma,vwma,dema,tema,hma,alma,zlema,kama,linregfull
ta.*bb, bbupper/bbmiddle/bblower, kc, kcw, donchian, envelopefull
ta.*rsi,macd,stoch,cci,mfi,williams,roc,trix,tsi,cmo,ppo,kst,rcifull
ta.*atr,natr,tr,obv,cmf,vwap,ad,pvt,nvi,pvi,force,emvfull
ta.*supertrend,sar,adx,di+,di-,dx,ichimoku,ssl,vortex,alligator,aroonfull
ta.*[a,b]=ta.macd/stoch/bb/kc/dmi/vwap…full
ta.*cross,highest,lowest,max,min,change,cum,barssince,valuewhen,rising,fallingfull
ta.*pivothigh, pivotlow, pivot, pivot_point_levelsfull
ta.*percentrank,correlation,median,sum,dev,variancefull
ta.*120+ ta.* aliasesfull
plot.*plot()full
plot.*plot.style_histogramfull
plot.*plotshape()full
plot.*plotchar()full
plot.*plotcandle/plotbarfull
plot.*fill()full
plot.*bgcolor()full
plot.*barcolor()full
plot.*hline()full
label.*label.new/set/deletefull
line/box/tableline.new, box.newfull
line/box/tablepolyline.*full
line/box/tablelinefill.*full
line/box/tabletable.*full
alert.*alertcondition()full
alert.*alert()full
Seriesx[n], nz()full
Series:= reassignmentfull
Seriesvarfull
Seriesvaripfull
math.*math.abs, min, max, avg…full
str.*str.tostring, str.formatfull
color.*color.new, color.rgbfull
request.*request.security()full
array.*array.new, push, get…full
map.*map.new, put, get…full
matrix.*matrix.new, get, setfull
ta.*Algobridge SuperTrendfull
Conceptssession.* / input.sessionfull
ConceptsRenko/Heikin non-standardfull
Conceptsmulti-symbol securityfull
TV Spec gapsTradingView/* cloud librariesgap/none
TV Spec gapsvarip intrabar tick modelgap/none
TV Spec gapsTV broker emulator paritygap/none
TV Spec gapsrequest.dividend/earnings/financialgap/none
TV Spec gapsLive default_qty_typegap/none
TV Spec gapsFull Pine AST / paste-anything Specgap/planned

Related documentation

Platform-specific behaviour

How scripts connect to brokers, publish to algo trading, and handle risk is documented in the other sections of this site — see Welcome for the full map.