PineForge unreleased
Deterministic PineScript v6 backtest runtime — C ABI reference
Loading...
Searching...
No Matches
Transport types

Data Structures

struct  pf_native_decision_v1
 Where the kernel is, presented to every callback. More...
 
struct  pf_native_timeframe_interval_v1
 The calendar interval of the bucket delivered to pf_native_callbacks_v1::on_timeframe_bar. More...
 
struct  pf_native_applied_v1
 One applied execution, presented to on_applied. More...
 
struct  pf_native_event_v1
 One recorded event, read back by strategy_native_events_v1. More...
 
struct  pf_native_working_v1
 One live request, copied out by strategy_native_working_get_v1. More...
 
struct  pf_native_open_lot_v1
 One open physical lot, copied out by strategy_native_open_lot_get_v1 — the C spelling of NativeOpenLot (R5 gap lane N18): the book that strategy_native_position_v1 aggregates, lot by lot, marked at the price strategy_native_open_lot_count_v1 was given. More...
 
struct  pf_native_state_v1
 The run's lifecycle and its typed failure. More...
 
struct  pf_native_trail_state_v1
 The trail projection of strategy_native_trail_state_v1 — the C spelling of NativeTrailState. More...
 
struct  pf_native_margin_view_v1
 The facts one margin hook is handed — the C spelling of NativeMarginRequirementView, NativeMarginCheckPoint and NativeMarginCallView, which differ only in which of these facts they carry. More...
 
struct  pf_native_margin_decision_v1
 The host's answer to one requirement view — NativeMarginDecision. More...
 
struct  pf_native_close_view_v1
 The facts a host-sized CLOSE is resolved from, handed to pf_native_callbacks_v1::on_close_units. More...
 
struct  pf_native_lot_excursion_v1
 One closing lot's booking facts — ClosedLotExcursionFacts (RULING A48). More...
 
struct  pf_native_terms_view_v1
 The facts of one matching candidate, handed to pf_native_callbacks_v1::on_execution_terms — the price half of NativeExecutionTermsFacts. More...
 
struct  pf_native_terms_v1
 The price half of the terms pf_native_callbacks_v1::on_execution_terms answers — ExecutionTerms less its units, which pf_native_callbacks_v1::on_close_units answers for a host-sized close. More...
 
struct  pf_native_precommit_view_v1
 The last facts before one execution's physical effect, handed to pf_native_callbacks_v1::on_precommit — NativePrecommitView: the plan, the prices, the settlement inspection, and the account the fill would leave (the projection's closed rows' P&L, borrowed for the call, in roster order). More...
 
struct  pf_native_anchored_level_view_v1
 One anchored leg's materialization, handed to pf_native_callbacks_v1::on_anchored_level exactly once, before its armed event — NativeAnchoredLevelView. More...
 
struct  pf_native_risk_state_v1
 The run's generic risk ledger — the C spelling of NativeRiskState (L9). More...
 
struct  pf_native_margin_call_v1
 One kernel-issued liquidation that filled, whole — the C spelling of native_order::MarginCallEvent, copied out by strategy_native_margin_call_v1. More...
 
struct  pf_native_request_v1
 One order request. More...
 
struct  pf_native_subscription_v1
 One declared higher-timeframe series of pf_native_run_spec_ext_v1. More...
 
struct  pf_native_run_spec_ext_v1
 The run-specification fields pf_native_run_spec_v1 predates. More...
 
struct  pf_native_callbacks_v1
 The C host's strategy logic. More...
 

Macros

#define PF_NATIVE_DECISION_V1_BASE_SIZE    ((uint32_t)offsetof(pf_native_decision_v1, script_interval_open_ms))
 Byte length of pf_native_decision_v1 as the L13 lane first published it, before the session tail was appended — the struct_size a callback table shorter than PF_NATIVE_CALLBACKS_V1_POLICY_SIZE is presented.
 
#define PF_NATIVE_WORKING_V1_BASE_SIZE    ((uint32_t)offsetof(pf_native_working_v1, trail_has_arm_price))
 Byte length of pf_native_working_v1 as the L13 lane first published it, before the arm-presence tail was appended.
 
#define PF_NATIVE_WORKING_V1_ARM_SIZE    ((uint32_t)offsetof(pf_native_working_v1, anchor))
 Byte length of pf_native_working_v1 with the arm-presence tail but without the relation tail — the second of its three published layouts, and the sizeof every caller compiled before that tail existed sends.
 
#define PF_NATIVE_LOT_EXCURSION_V1_BASE_SIZE    ((uint32_t)offsetof(pf_native_lot_excursion_v1, entry_commission))
 Byte length of the first published pf_native_lot_excursion_v1 layout, before pf_native_lot_excursion_v1::entry_commission was appended.
 
#define PF_NATIVE_REQUEST_V1_BASE_SIZE    ((uint32_t)offsetof(pf_native_request_v1, anchor_rounding))
 Byte length of pf_native_request_v1 as the L13 lane first published it, before the anchored-leg tail was appended.
 
#define PF_NATIVE_REQUEST_V1_ANCHOR_SIZE    ((uint32_t)offsetof(pf_native_request_v1, size_price))
 Byte length of pf_native_request_v1 with L7b's anchored-leg tail but without L3b's sizing-detail tail — the second of its five published layouts.
 
#define PF_NATIVE_REQUEST_V1_SIZING_SIZE    ((uint32_t)offsetof(pf_native_request_v1, trail_best_seed))
 Byte length of pf_native_request_v1 with L3b's sizing-detail tail but without E14's trail seed — the third of its five published layouts, and the sizeof every caller compiled before that seed existed sends.
 
#define PF_NATIVE_REQUEST_V1_SEED_SIZE    ((uint32_t)offsetof(pf_native_request_v1, arm_first_match))
 Byte length of pf_native_request_v1 with E14's trail seed but without the arm-relation tail — the fourth of its five published layouts, and the sizeof every caller compiled before that tail existed sends.
 
#define PF_NATIVE_RUN_SPEC_EXT_V1_BASE_SIZE    ((uint32_t)offsetof(pf_native_run_spec_ext_v1, risk_has_max_drawdown))
 Byte length of pf_native_run_spec_ext_v1 as the L13 lane first published it, before the risk_* tail was appended.
 
#define PF_NATIVE_RUN_SPEC_EXT_V1_RISK_SIZE    ((uint32_t)offsetof(pf_native_run_spec_ext_v1, intrabar_kind))
 Byte length of pf_native_run_spec_ext_v1 with L9's risk tail but without N8's intrabar / policy tail — the second of its six published layouts.
 
#define PF_NATIVE_RUN_SPEC_EXT_V1_POLICY_SIZE    ((uint32_t)offsetof(pf_native_run_spec_ext_v1, auxiliary_tf))
 Byte length of pf_native_run_spec_ext_v1 with N8's intrabar / policy tail but before the auxiliary_* tail was appended — the third of its six published layouts.
 
#define PF_NATIVE_RUN_SPEC_EXT_V1_AUXILIARY_SIZE    ((uint32_t)offsetof(pf_native_run_spec_ext_v1, event_retention))
 Byte length of pf_native_run_spec_ext_v1 with the auxiliary_* tail but before the event_retention tail was appended — the fourth of its six published layouts, an offset for the same reason PF_NATIVE_RUN_SPEC_EXT_V1_BASE_SIZE is.
 
#define PF_NATIVE_RUN_SPEC_EXT_V1_RETENTION_SIZE    ((uint32_t)offsetof(pf_native_run_spec_ext_v1, quantity_tolerance))
 Byte length of pf_native_run_spec_ext_v1 with the event_retention tail but before the quantity_tolerance tail was appended — the fifth of its six published layouts, an offset for the same reason PF_NATIVE_RUN_SPEC_EXT_V1_BASE_SIZE is.
 
#define PF_NATIVE_CALLBACKS_V1_BASE_SIZE    ((uint32_t)offsetof(pf_native_callbacks_v1, on_recalculate))
 Byte length of pf_native_callbacks_v1 as the L13 lane first published it, before the six-hook tail was appended.
 
#define PF_NATIVE_CALLBACKS_V1_HOOKS_SIZE    ((uint32_t)offsetof(pf_native_callbacks_v1, on_execution_terms))
 Byte length of pf_native_callbacks_v1 with the six-hook tail but without the policy-hook tail — the second of its four published layouts, and the sizeof every caller compiled before that tail existed sends.
 
#define PF_NATIVE_CALLBACKS_V1_POLICY_SIZE    ((uint32_t)offsetof(pf_native_callbacks_v1, reserved1))
 Byte length of the F4 policy-hook layout, before the reserved marker that publishes the current lot-excursion facts layout.
 

Detailed Description

Macro Definition Documentation

◆ PF_NATIVE_DECISION_V1_BASE_SIZE

#define PF_NATIVE_DECISION_V1_BASE_SIZE    ((uint32_t)offsetof(pf_native_decision_v1, script_interval_open_ms))

Byte length of pf_native_decision_v1 as the L13 lane first published it, before the session tail was appended — the struct_size a callback table shorter than PF_NATIVE_CALLBACKS_V1_POLICY_SIZE is presented.

It is the offset of the first appended field, which is that layout's sizeof on every target (it ended in padding the tail's first 8-byte field begins after).

Definition at line 1549 of file native_c_api.h.

◆ PF_NATIVE_WORKING_V1_BASE_SIZE

#define PF_NATIVE_WORKING_V1_BASE_SIZE    ((uint32_t)offsetof(pf_native_working_v1, trail_has_arm_price))

Byte length of pf_native_working_v1 as the L13 lane first published it, before the arm-presence tail was appended.

It is the offset of the first appended field, so it stays correct on every target this header builds for — it is not a literal. strategy_native_working_get_v1 accepts this length as well as the current sizeof, and writes no byte past the length it was handed, which is what makes a readout's tail additive rather than a layout break.

Definition at line 1745 of file native_c_api.h.

◆ PF_NATIVE_WORKING_V1_ARM_SIZE

#define PF_NATIVE_WORKING_V1_ARM_SIZE    ((uint32_t)offsetof(pf_native_working_v1, anchor))

Byte length of pf_native_working_v1 with the arm-presence tail but without the relation tail — the second of its three published layouts, and the sizeof every caller compiled before that tail existed sends.

The offset of the first relation field, for the same reason PF_NATIVE_WORKING_V1_BASE_SIZE is an offset.

Definition at line 1753 of file native_c_api.h.

◆ PF_NATIVE_LOT_EXCURSION_V1_BASE_SIZE

#define PF_NATIVE_LOT_EXCURSION_V1_BASE_SIZE    ((uint32_t)offsetof(pf_native_lot_excursion_v1, entry_commission))

Byte length of the first published pf_native_lot_excursion_v1 layout, before pf_native_lot_excursion_v1::entry_commission was appended.

A callback table from that layout receives this length in struct_size.

Definition at line 1943 of file native_c_api.h.

◆ PF_NATIVE_REQUEST_V1_BASE_SIZE

#define PF_NATIVE_REQUEST_V1_BASE_SIZE    ((uint32_t)offsetof(pf_native_request_v1, anchor_rounding))

Byte length of pf_native_request_v1 as the L13 lane first published it, before the anchored-leg tail was appended.

It is the offset of the first appended field, so it stays correct on every target this header builds for — it is not a literal. The runtime accepts this length as well as the current sizeof, which is what makes the tail additive rather than a layout break.

Definition at line 2237 of file native_c_api.h.

◆ PF_NATIVE_REQUEST_V1_ANCHOR_SIZE

#define PF_NATIVE_REQUEST_V1_ANCHOR_SIZE    ((uint32_t)offsetof(pf_native_request_v1, size_price))

Byte length of pf_native_request_v1 with L7b's anchored-leg tail but without L3b's sizing-detail tail — the second of its five published layouts.

Defined as the offset of the first field appended after it, for the same reason PF_NATIVE_REQUEST_V1_BASE_SIZE is.

Definition at line 2244 of file native_c_api.h.

◆ PF_NATIVE_REQUEST_V1_SIZING_SIZE

#define PF_NATIVE_REQUEST_V1_SIZING_SIZE    ((uint32_t)offsetof(pf_native_request_v1, trail_best_seed))

Byte length of pf_native_request_v1 with L3b's sizing-detail tail but without E14's trail seed — the third of its five published layouts, and the sizeof every caller compiled before that seed existed sends.

Defined as the offset of the first field appended after it, for the same reason PF_NATIVE_REQUEST_V1_BASE_SIZE is.

Definition at line 2252 of file native_c_api.h.

◆ PF_NATIVE_REQUEST_V1_SEED_SIZE

#define PF_NATIVE_REQUEST_V1_SEED_SIZE    ((uint32_t)offsetof(pf_native_request_v1, arm_first_match))

Byte length of pf_native_request_v1 with E14's trail seed but without the arm-relation tail — the fourth of its five published layouts, and the sizeof every caller compiled before that tail existed sends.

The seed layout ended in padding after trail_has_best_seed; reserved2 names exactly that padding, so the offset of the first arm field IS that sizeof on every target.

Definition at line 2261 of file native_c_api.h.

◆ PF_NATIVE_RUN_SPEC_EXT_V1_BASE_SIZE

#define PF_NATIVE_RUN_SPEC_EXT_V1_BASE_SIZE    ((uint32_t)offsetof(pf_native_run_spec_ext_v1, risk_has_max_drawdown))

Byte length of pf_native_run_spec_ext_v1 as the L13 lane first published it, before the risk_* tail was appended.

It is the offset of the first appended field, so it stays correct on every target this header builds for — it is not a literal. The runtime accepts this length as well as the current sizeof, which is what makes the tail additive rather than a layout break.

Definition at line 2446 of file native_c_api.h.

◆ PF_NATIVE_RUN_SPEC_EXT_V1_RISK_SIZE

#define PF_NATIVE_RUN_SPEC_EXT_V1_RISK_SIZE    ((uint32_t)offsetof(pf_native_run_spec_ext_v1, intrabar_kind))

Byte length of pf_native_run_spec_ext_v1 with L9's risk tail but without N8's intrabar / policy tail — the second of its six published layouts.

Definition at line 2451 of file native_c_api.h.

◆ PF_NATIVE_RUN_SPEC_EXT_V1_POLICY_SIZE

#define PF_NATIVE_RUN_SPEC_EXT_V1_POLICY_SIZE    ((uint32_t)offsetof(pf_native_run_spec_ext_v1, auxiliary_tf))

Byte length of pf_native_run_spec_ext_v1 with N8's intrabar / policy tail but before the auxiliary_* tail was appended — the third of its six published layouts.

It is the offset of the first auxiliary field, for the same reason PF_NATIVE_RUN_SPEC_EXT_V1_BASE_SIZE is an offset.

Definition at line 2458 of file native_c_api.h.

◆ PF_NATIVE_RUN_SPEC_EXT_V1_AUXILIARY_SIZE

#define PF_NATIVE_RUN_SPEC_EXT_V1_AUXILIARY_SIZE    ((uint32_t)offsetof(pf_native_run_spec_ext_v1, event_retention))

Byte length of pf_native_run_spec_ext_v1 with the auxiliary_* tail but before the event_retention tail was appended — the fourth of its six published layouts, an offset for the same reason PF_NATIVE_RUN_SPEC_EXT_V1_BASE_SIZE is.

Definition at line 2465 of file native_c_api.h.

◆ PF_NATIVE_RUN_SPEC_EXT_V1_RETENTION_SIZE

#define PF_NATIVE_RUN_SPEC_EXT_V1_RETENTION_SIZE    ((uint32_t)offsetof(pf_native_run_spec_ext_v1, quantity_tolerance))

Byte length of pf_native_run_spec_ext_v1 with the event_retention tail but before the quantity_tolerance tail was appended — the fifth of its six published layouts, an offset for the same reason PF_NATIVE_RUN_SPEC_EXT_V1_BASE_SIZE is.

Definition at line 2472 of file native_c_api.h.

◆ PF_NATIVE_CALLBACKS_V1_BASE_SIZE

#define PF_NATIVE_CALLBACKS_V1_BASE_SIZE    ((uint32_t)offsetof(pf_native_callbacks_v1, on_recalculate))

Byte length of pf_native_callbacks_v1 as the L13 lane first published it, before the six-hook tail was appended.

It is the offset of the first appended field, so it stays correct on every target — not a literal. strategy_native_host_create_v1 accepts it, PF_NATIVE_CALLBACKS_V1_HOOKS_SIZE, PF_NATIVE_CALLBACKS_V1_POLICY_SIZE and the current sizeof: that is what makes each tail additive rather than a layout break.

Definition at line 2655 of file native_c_api.h.

◆ PF_NATIVE_CALLBACKS_V1_HOOKS_SIZE

#define PF_NATIVE_CALLBACKS_V1_HOOKS_SIZE    ((uint32_t)offsetof(pf_native_callbacks_v1, on_execution_terms))

Byte length of pf_native_callbacks_v1 with the six-hook tail but without the policy-hook tail — the second of its four published layouts, and the sizeof every caller compiled before that tail existed sends.

Definition at line 2661 of file native_c_api.h.

◆ PF_NATIVE_CALLBACKS_V1_POLICY_SIZE

#define PF_NATIVE_CALLBACKS_V1_POLICY_SIZE    ((uint32_t)offsetof(pf_native_callbacks_v1, reserved1))

Byte length of the F4 policy-hook layout, before the reserved marker that publishes the current lot-excursion facts layout.

Definition at line 2666 of file native_c_api.h.