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

AlgoCode language coverage: 59 full, 4 partial/transpile, 167 aliases → 138 implementations, of 63 tracked features.

CategorySyntaxStatus
Script//@version=6full
Scriptindicator() / study()full
Scriptstrategy()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, donchian, envelopefull
ta.*rsi,macd,stoch,cci,mfi,williams,roc,trix,tsi,cmo,ppo,kstfull
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,change,cum,barssince,valuewhen,rising,fallingfull
ta.*pivothigh, pivotlow, pivotfull
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()transpile
Series:= reassignmenttranspile
Seriesvartranspile
math.*math.abs, min, max, avg…full
str.*str.tostring, str.formatfull
color.*color.new, color.rgbfull
request.*request.security()full
request.*dividend/earnings/financialpartial
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

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.