@luxalgo/vela-pinets 0.2.13 → 0.2.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -150,6 +150,36 @@ if ta.crossover(close, ta.sma(close, 20))
150
150
  themselves. `props` gates which scripts publish the schema — `'strategy'` gives
151
151
  strategies a Properties tab while plain indicators keep an inputs-only dialog.
152
152
 
153
+ ## Volume footprints (`request.footprint()`)
154
+
155
+ Vela owns bars, not order flow, so Pine's `request.footprint()` needs a host-supplied
156
+ source of per-bar volume footprints. Pass one to either engine and it becomes the
157
+ optional `getFootprintData` surface of the PineTS market-data provider (worker-backed
158
+ engines round-trip each call to the main thread, like `request.security` fetches).
159
+ Without it every `request.footprint()` call answers `na`. The source is asked for the
160
+ chart's series and, when `request.footprint()` runs inside `request.security()`, for
161
+ that context's own symbol and timeframe.
162
+
163
+ ```ts
164
+ import type { FootprintSource } from '@luxalgo/vela-pinets';
165
+
166
+ const footprints: FootprintSource = async (symbol, timeframe, range) => {
167
+ // range: { from?, to?, limit? } — the loaded history first, then the forming bar's tail
168
+ const bars = await myOrderFlow.footprints(symbol, timeframe, range);
169
+ return bars.map((b) => ({
170
+ openTime: b.time, // the matching bar's open time
171
+ levels: b.levels.map((l) => ({ price: l.price, buyVolume: l.buy, sellVolume: l.sell })),
172
+ }));
173
+ };
174
+
175
+ const engine = new PineWorkerEngine({ footprints });
176
+ ```
177
+
178
+ Levels are raw volume-at-price at whatever grid the source has (a level's `price` is
179
+ the low edge of its bucket); PineTS re-bins them into `ticks_per_row × syminfo.mintick`
180
+ rows and derives POC, value area and imbalances itself. Bars the source omits read as
181
+ `na`. Requires a pinets build that ships `request.footprint()`.
182
+
153
183
  ## Development
154
184
 
155
185
  ```bash