Added
Tier 1 visual outputs (oakscriptjs/script):
plotshape(condition, title?, options)andplotchar(condition, title?, options)— per-bar markers where the condition holds. Options:style,location(abovebar/belowbar/top/bottom/absolute),color,text,textcolor,size,offset, andtooltip(extension over PineScript, for label ports). Emitted asIndicatorResult.markers(MarkerData[]); declared asShapeConfig.bgcolor(colors, options?)andbarcolor(colors, options?)— per-bar background / candle colors from a static color or a per-bar array. Emitted asIndicatorResult.bgcolors/barcolors(BarColorData[]); declared asBarColorConfig.color.when(cond, colorTrue, colorFalse?)—colorFalseis now optional; an omitted false-color leaves the bar uncolored (PineScriptna), whichbgcolor()/barcolor()skip.
Per-bar execution:
eachBar(fn)— runs a callback once per bar and collects the returns into a Series. Inside the callback values are plain numbers, so native JS operators,if/for/whileand closureletvariables replace PineScriptvar/:=/loops.c.get(src, k)issrc[k],c.prev(k)is self-reference,c.iisbar_index.seriesOf(values)wraps a side-output array as a Series.
Candlestick pattern port:
- All 45 official TradingView candlestick indicators ported to the script API over a shared candle-props / pattern-runner template, including the All Candlestick Patterns composite, plus a lightweight-charts v5 example renderer (markers + bgcolor primitive).
Changed
ScriptRunResultgainedshapeConfigandbarColorConfig;IndicatorResultgained optionalmarkers,bgcolors,barcolors. All additive — existing consumers are unaffected.- Fixed the stale
VERSIONconstant (was0.3.0).
Full Changelog: v0.3.0...v0.5.0