Execution
tradarascript-v1is not interpreted. Only a registered indicator kind runs.- On v1,
ta.*in source is a detection token, not a composable library. tradarascript-v2executes composedta.*, math, inputs, plots, shapes, labels, boxes, strategy signals,var, bounded control flow, and constant history within the compiler manifest.- Evaluation is bar-close. There is no tick script mode.
varipis accepted asvar. - On v1, one script maps to one kind. Combining markers does not merge math.
Language
- User-defined functions execute on v2 by inlining, including indented bodies and tuple returns (
[a, b] = get_range()). They do not on v1 - v2 supports indented
if/elseandswitchexpressions - v2 supports
forloops with numeric bounds. Constant bounds over 256 iterations still error - v2 supports
for [index, value] in arrayand user-defined types - No
while plotshapeemitsscript.output.v2shape events and renders them on the matching terminal chart bar.style,color,location, andsizeare per-declaration; dynamic per-bar styling is not available yet- No
hline,fill,bgcolor, or dynamic plot colors plotaccepts a constantlinewidthfrom 1 through 10plotcandleemits overlay candlesinput.session,input.color, andinput.timeframeare live v2 inputs.input.sourceis not a live control yet
Chart and data
label.newandbox.newsupport persistent handles, setters, and deletion- Each script instance keeps at most 50 labels and 50 boxes. Creating another object evicts the oldest object of that type.
xloc.bar_indexandxloc.bar_timeare supported for labels, boxes, and linesline.new,polyline.new,linefill.new, andtable.*render on the chartdisplay.*bitflags,format.volume, andposition.*table corners are constantsarray.*andmap.*run on bar close.matrix.*does notchart.point.newand drawing point setters run on bar closerequest.securityresamples the current symbol.lookahead=barmerge.lookahead_onis accepted. Other symbols returnnatime(timeframe, session, timezone)accepts runtime-constructed timezone strings andsyminfo.timezone.dayofweek/hour/minute/last_bar_time/last_bar_index/timeframe.isdailyare available.session.ismarketand othersession.*helpers are not a script API yetalertandalertconditionemit bar events; they do not place orders
Strategy signals
- Scripts do not place, modify, or cancel orders
- No broker emulator or live order placement
- Strategies emit
long,short, andflatsignals on bar close strategy.entry/strategy.orderemit open signals;strategy.close/strategy.exit/strategy.cancelemit flat- Every strategy must include at least one open call and one close call
- Strategy position state and backtesting are not available yet
Editor
- Plain textarea, not Monaco
- Script Studio marks validation failures in the gutter and bottom status strip
- Study/strategy mismatches are checked immediately in the editor and again by the service

