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.
| Category | Syntax | Status |
|---|---|---|
| Script | //@version=6 | full |
| Script | indicator() / study() | full |
| Script | strategy() | full |
| Script | library() export/import | full |
| Language | f(x) => … | full |
| Language | for i = 0 to n | full |
| Language | while / switch | full |
| Language | enum | full |
| Language | type / method | full |
| input.* | input.int | full |
| input.* | input.float | full |
| input.* | input.bool | full |
| input.* | input.string | full |
| input.* | input.source / input(close) | full |
| input.* | input.color | full |
| input.* | input.timeframe | full |
| input.* | input.time | full |
| input.* | input.session | full |
| input.* | input.symbol | full |
| Concepts | barstate.* | full |
| Concepts | syminfo.* | full |
| Concepts | time, timenow, timeframe.* | full |
| ta.* | ema,sma,rma,wma,vwma,dema,tema,hma,alma,zlema,kama,linreg | full |
| ta.* | bb, bbupper/bbmiddle/bblower, kc, donchian, envelope | full |
| ta.* | rsi,macd,stoch,cci,mfi,williams,roc,trix,tsi,cmo,ppo,kst | full |
| ta.* | atr,natr,tr,obv,cmf,vwap,ad,pvt,nvi,pvi,force,emv | full |
| ta.* | supertrend,sar,adx,di+,di-,dx,ichimoku,ssl,vortex,alligator,aroon | full |
| ta.* | [a,b]=ta.macd/stoch/bb/kc/dmi/vwap… | full |
| ta.* | cross,highest,lowest,change,cum,barssince,valuewhen,rising,falling | full |
| ta.* | pivothigh, pivotlow, pivot | full |
| ta.* | percentrank,correlation,median,sum,dev,variance | full |
| ta.* | 120+ ta.* aliases | full |
| plot.* | plot() | full |
| plot.* | plot.style_histogram | full |
| plot.* | plotshape() | full |
| plot.* | plotchar() | full |
| plot.* | plotcandle/plotbar | full |
| plot.* | fill() | full |
| plot.* | bgcolor() | full |
| plot.* | barcolor() | full |
| plot.* | hline() | full |
| label.* | label.new/set/delete | full |
| line/box/table | line.new, box.new | full |
| line/box/table | polyline.* | full |
| line/box/table | linefill.* | full |
| line/box/table | table.* | full |
| alert.* | alertcondition() | full |
| alert.* | alert() | full |
| Series | x[n], nz() | transpile |
| Series | := reassignment | transpile |
| Series | var | transpile |
| math.* | math.abs, min, max, avg… | full |
| str.* | str.tostring, str.format | full |
| color.* | color.new, color.rgb | full |
| request.* | request.security() | full |
| request.* | dividend/earnings/financial | partial |
| array.* | array.new, push, get… | full |
| map.* | map.new, put, get… | full |
| matrix.* | matrix.new, get, set | full |
| ta.* | Algobridge SuperTrend | full |
| Concepts | session.* / input.session | full |
| Concepts | Renko/Heikin non-standard | full |
| Concepts | multi-symbol security | full |
Related documentation
- Language & inputs — common patterns and examples
- Strategies —
strategy(), tester, publish flow - Risk management — platform SL, target, trailing, square-off,
algo.risk
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.