feature
Price and bar data
When an indicator or definition runs, each bar hands you open, high, low, close, volume, and time on ctx — the raw market data your logic reads.
You need this page whenever you calculate from price or volume, or when you switch to volume-candle / tape data via dataSource. Studies do not use this same bar ctx; they use candle helpers instead.
Quick reference
Field | Indicator | Definition | Notes |
|---|---|---|---|
| yes | yes | OHLC |
| yes | yes | |
| yes | — | When dataSource supports it |
| yes | yes | Tape / volume-candle levels |
| yes | yes | Bar time |
| yes | yes | Index in series |
| yes | yes | Resolved settings |
dataSource
Set on meta:
meta({
shortName: "VWAP",
kind: "overlay", // indicator
dataSource: { type: "candles" },
});Use { type: "volume-candles", settings: { purgeStrategy: "floor-aware" } } (or equivalent) when you need tape / priceLevels. Default is ordinary candles.
Studies
Studies do not expose the same bar ctx on onEvent. Use ctx.candles.forward / window / timeOf — see Results and stats.
