Skip to content

Commit 6cc8247

Browse files
luisleo526claude
andcommitted
Correct the symbol-feeds README on syminfo reads and aggregation
Review fixes. Inside the request syminfo.tickerid is always the key and syminfo.ticker the key after its last ":"; the catalog tickerid is set as the canonical fact, which no syminfo.* reads. The no-aggregation bullet now says why (the engine looks a feed up by exact symbol and timeframe and installs its bars as given) instead of claiming no C call aggregates. The missing-feed sentence covers an index that lacks the requested symbol or timeframe, and the refusal list is marked as examples ("timestamps that do not strictly increase"). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
1 parent eebbbc5 commit 6cc8247

1 file changed

Lines changed: 20 additions & 16 deletions

File tree

‎docker/README.md‎

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,10 @@ at every release, so the lot-grid handling (`mincontract`) lives in this file.
175175
### Other symbols' bars (`PINEFORGE_SYMBOL_FEEDS`)
176176

177177
A script that calls `request.security` on another symbol reads that symbol's
178-
own bars, never the chart's. Without them the run stops where the request's
179-
value is read (`request.security(...) at line N: no data is pinned for this
180-
request, and its value was read`, exit 4). `PINEFORGE_SYMBOL_FEEDS` (the
178+
own bars, never the chart's. Without them, or when the index below lacks the
179+
requested symbol string or timeframe, the run stops where the request's value
180+
is read (`request.security(...) at line N: no data is pinned for this request,
181+
and its value was read`, exit 4). `PINEFORGE_SYMBOL_FEEDS` (the
181182
harness's `--symbol-feeds`) names a JSON index of those bars, installed through
182183
the library's `strategy_set_symbol_facts` and `strategy_set_symbol_feed` (engine
183184
1.0.0 and later):
@@ -217,11 +218,13 @@ docker run --rm \
217218
chart's first bar are delivered as history on it; bars after its last are
218219
never read. A header-only feed installs the symbol without bars: its requests
219220
read na on every bar (a symbol with no bars in the window).
220-
- `syminfo` is the symbol's catalog object, flat or `{"syminfo": {...}}`:
221-
`tickerid` (as the symbol's canonical id), `type`, `timezone`, `session`,
222-
`currency` and `mintick` are set as its facts, which `syminfo.*` reads inside
223-
the request; other keys are ignored. Without it, `syminfo.tickerid` inside the
224-
request reads the key, `syminfo.mintick` NaN and the strings empty.
221+
- `syminfo` is the symbol's catalog object, flat or `{"syminfo": {...}}`. Its
222+
`type`, `timezone`, `session`, `currency` and `mintick` are set as the
223+
symbol's facts, which `syminfo.*` reads inside the request; `tickerid` is set
224+
as its `canonical` fact, which no `syminfo.*` reads; other keys are ignored.
225+
Inside the request `syminfo.tickerid` is always the key and `syminfo.ticker`
226+
the key after its last `:`. Without `syminfo`, `syminfo.mintick` reads NaN
227+
and those four strings read empty.
225228
- Merge rule (TradingView's): with `lookahead` off a chart bar reads the latest
226229
requested bar whose close is at or before the chart bar's close; with it on,
227230
the latest that opened at or before the chart bar's open. A missing requested
@@ -233,14 +236,15 @@ docker run --rm \
233236
is historical only. Each feed is a full pass of its request's expression over
234237
its bars. `request.security_lower_tf` on another symbol reads no feed.
235238
- A feed must be at the timeframe it serves. Nothing aggregates another
236-
symbol's bars: the engine aggregates only the chart's own input, and the C ABI
237-
has no call that aggregates bars. A `240` feed does not serve a `D` request,
238-
and a `1` feed serves only a request at `1`, so give each requested timeframe
239-
its own bars.
240-
- An index or feed the harness cannot install (not JSON, a bad timeframe
241-
spelling, two feeds at one timeframe, a CSV without `close`, decreasing
242-
timestamps, a close after the next bar's open, a non-positive `mintick`, more
243-
than 256 feeds, a library without the setters, a feed the engine refuses)
239+
symbol's bars: the engine looks a feed up by the exact symbol string and
240+
timeframe, and `strategy_set_symbol_feed` installs the bars as given. A `240`
241+
feed does not serve a `D` request, and a `1` feed serves only a request at
242+
`1`, so give each requested timeframe its own bars.
243+
- An index or feed the harness cannot install (for example: not JSON, a bad
244+
timeframe spelling, two feeds at one timeframe, a CSV without `close`,
245+
timestamps that do not strictly increase, a close after the next bar's open,
246+
a non-positive `mintick`, more than 256 feeds, a library without the setters,
247+
a feed the engine refuses)
244248
fails the run before it starts: one line
245249
`{"engine":"pineforge","error":"--symbol-feeds: ..."}` on stdout, harness exit
246250
1, entrypoint exit 4.

0 commit comments

Comments
 (0)