|
PineForge v1.5.0-rc.1-2-g90c12b98
Deterministic PineScript v6 backtest runtime — C ABI reference
|
Go to the source code of this file.
Data Structures | |
| struct | pf_selected_plan_request_v1 |
| One selected-window planning request. More... | |
| struct | pf_selected_plan_result_v1 |
| One complete planner result, plain data, written whole by a successful call. More... | |
Functions | |
| uint32_t | pf_selected_plan_version (void) |
| Returns the selected-planner C bridge version, 1. | |
| int | pf_plan_selected_primary_v1 (const pf_selected_plan_request_v1 *, const pf_bar_t *rows, uint64_t count, pf_selected_plan_result_v1 *) |
| Plans the primary rows of one selected-window request. | |
| uint32_t pf_selected_plan_version | ( | void | ) |
Returns the selected-planner C bridge version, 1.
References PF_API.
| int pf_plan_selected_primary_v1 | ( | const pf_selected_plan_request_v1 * | , |
| const pf_bar_t * | rows, | ||
| uint64_t | count, | ||
| pf_selected_plan_result_v1 * | ) |
Plans the primary rows of one selected-window request.
Returns 0 when one whole result was written to *out, INCLUDING every planner refusal (a refusal is carried in out->status, never in the return value). Returns -1 for a NULL request or output, a wrong struct_size or version in either descriptor, a NULL string pointer, a feed_tolerant other than 0 or 1, or a count that does not fit size_t; -2 when memory could not be allocated; -3 for any other bridge failure or broken bridge invariant (for example a planner option longer than 31 characters, which is never truncated). On every negative return a valid caller output is byte-unchanged.
rows may be NULL only with count 0. A NULL rows with a positive count is not dereferenced by the bridge: the planner refuses it as RequestInvalid. The bridge builds a local result and commits it to *out with one assignment, calls no host or library callback, and lets no exception cross C.
References PF_API.