GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing cdocs.pineforge.dev — PineForge: Strategy lifecycle
Loading...
Searching...
No Matches
Strategy lifecycle Create, run, and destroy a compiled strategy instance. More...
Detailed DescriptionCreate, run, and destroy a compiled strategy instance. NOTE: Per-strategy symbols (strategy_create, run_backtest, etc.) are emitted by the codegen with internal C++ types (ReportC, Bar) that are layout-compatible but type-distinct from the public C PODs below. Guard with PINEFORGE_NO_STRATEGY_DECLS so engine.hpp can include this header for its POD types without conflicting with per-strategy TU definitions. Enumeration Type Documentation◆ pf_execution_contract_tWhat strategy_execution_contract answers for a valid handle.
Definition at line 456 of file pineforge.h. ◆ pf_native_spec_optional_tThe bits of pf_native_run_spec_v1::optional_mask: each names the one optional field it makes meaningful. A bit outside this set is refused.
Definition at line 469 of file pineforge.h. ◆ pf_native_fx_curve_error_tWhy a native FX curve was refused — the C twin of The typed additive route writes this word beside the offending array index.
Definition at line 529 of file pineforge.h. Function Documentation◆ strategy_execution_contract()
Native execution contract query: a pf_execution_contract_t, or -1 for a NULL handle. Absence of this symbol on a known ABI4/stream-v1 library means legacy. References PF_API. ◆ strategy_configure_native_v1()
◆ PF_STATIC_ASSERT()
◆ strategy_configure_native_fx_curve_v1()
Stage an immutable account-currency FX curve on a Ready native handle. Timestamps must be strictly increasing and rates finite and positive. Pass
References PF_API. ◆ strategy_configure_native_fx_curve_ext_v1()
Typed additive spelling of strategy_configure_native_fx_curve_v1. On a kernel validation refusal, writes the pf_native_fx_curve_error_t and the offending element index (length mismatch uses index 0). C-layer argument, handle and layout refusals leave the out-parameters untouched. References PF_API. ◆ strategy_create()
Allocate a new strategy instance.
Caller owns the returned handle and must release it via strategy_free. References PF_API. ◆ strategy_free()
Release a strategy handle previously returned by strategy_create. Safe to call with References PF_API. ◆ run_backtest()
Run a backtest with auto-detected timeframe and no bar magnifier.
References PF_API. ◆ run_backtest_full()
Run a backtest with explicit timeframe and magnifier configuration.
References PF_API. ◆ report_free()
Free heap arrays attached to a filled report. Idempotent. Safe to call with References PF_API. ◆ pf_report_scratch_arena_stats()
Read process-wide scratch-arena diagnostics, outside canonical report bytes. Writes the peak bytes of simultaneously claimed chunks since attachment and the exact supplied backing size (including any unallocatable tail). Returns 0; with no arena attached both values are 0. Returns -1 with both outputs unchanged if either pointer is NULL, the pointers alias, or the snapshot cannot be read. Never throws or changes a strategy's last error. Query after report finalization and before arena detach. The counters belong to the attachment, not a strategy or repeat; detach resets them. No pf_report_t, sink receipt, trailer or broker-state hash layout changes. References PF_API. ◆ pf_report_cache_stats()
Read the handle's admitted-run command-cache and trade-ledger diagnostics. resident_bytes is the current sum of live command-cache control/slabs and the ledger's fixed workspace, allocated directory and decoded-entry pages. Each allocation owner contributes once; borrowed shared-cache storage does not add another charge. Arena chunks and backing-file extents are separate. allocation_bypass_count counts optional command-slab and ledger-directory/ page allocation failures, once per sticky bypass, including released owners. Both outputs are 0 before the first admitted run; admission resets them. Returns 0, or -1 with both outputs unchanged for a NULL handle/output or aliased outputs. Never allocates, throws or changes last_error. Query on the invoking thread after report finalization and before freeing the strategy. No existing report, receipt or diagnostics layout changes. References PF_API. ◆ strategy_require_report_scratch_arena_v1()
Admit a jailed handle only with an attached scratch arena. Attach the inherited environment arena, if configured (fixed fd 5: PF_SCRATCH_ARENA_FD=5, positive PF_SCRATCH_ARENA_BYTES); validate its backing and mapping configuration before execution. On Linux, require a sealed memfd whose seal mask contains F_SEAL_GROW | F_SEAL_SHRINK | F_SEAL_SEAL. F_SEAL_EXEC and other non-write seals may be added (e.g. MFD_NOEXEC_SEAL). F_SEAL_WRITE or F_SEAL_FUTURE_WRITE is refused at attachment with report_sink_failed/arena_backing. These requirements hold regardless of PF_SCRATCH_ARENA_JAILED; off Linux, admit any attached arena. Returns 0 accepted; -1 for a NULL handle or an unavailable/invalid arena. Arena failures set the handle's typed report_sink_failed/arena_backing failure. Never creates a backing file or falls back to TMPDIR. Existing unjailed callers do not need to call this opt-in admission. The first successful attach sets SIGXFSZ to SIG_IGN process-wide; the prior disposition is not restored. Same fd/size reattaches are no-ops. Hosts relying on their SIGXFSZ handler or default termination must account for this before attaching an arena. References PF_API. ◆ strategy_report_sink_diagnostics_v1()
Read bounded sink provenance without reading the sink or replaying rows. Include report_sink.h for the descriptor; initialize struct_size and version=1. Returns 0 filled; -1 with *out unchanged for a bad handle, size, version or NULL output. Completion follows the sink trailer. Queries never execute callbacks, advance a cursor or change last_error. References PF_API. ◆ pf_run_abort_install_sigterm_v1()
Install the invocation's cooperative SIGTERM handler. The handler only stores a volatile sig_atomic_t flag; batch runs observe it at completed input-bar boundaries, independently of strategy_request_abort. Opt-in, process-wide, for one serialized child invocation. Call on the invoking thread with SIGTERM blocked, then unblock it; pending SIGTERM is preserved. Returns 0, or -1 on signal-setup failure. Repeated installation preserves an already requested stop. This opt-in installs only the abort handler for SIGTERM; it does not change any ABI layout. References PF_API. ◆ pf_run_abort_requested_v1()
◆ pf_run_abort_restore_sigterm_v1()
Restore the disposition saved by pf_run_abort_install_sigterm_v1. Call with SIGTERM blocked, after native cleanup and failure publication. Returns 0 (also when uninstalled), or -1 on signal-setup failure. References PF_API. ◆ strategy_closed_trade_entry_incarnation()
Return the physical entry incarnation for one closed-trade row. Partial-close/FIFO fragments emitted from the same physical entry share this value. Distinct broker entry objects receive distinct monotonically increasing values even when Pine reuses the same user-visible entry ID. The value is scoped to one strategy run and is intended as report provenance, not as a stable cross-run identifier.
References PF_API.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402605 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||