PineForge v1.4.0-4-g873b25da
Deterministic PineScript v6 backtest runtime — C ABI reference
Loading...
Searching...
No Matches
pf_native_precommit_view_v1 Struct Reference

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...

#include <native_c_api.h>

Data Fields

uint32_t struct_size
 sizeof(pf_native_precommit_view_v1).
 
uint32_t version
 PF_NATIVE_API_VERSION.
 
uint64_t incarnation
 The request about to execute.
 
uint32_t intent
 pf_native_intent_t of that request.
 
uint32_t plan
 pf_native_plan_t.
 
double plan_units
 See pf_native_plan_t.
 
double raw_price
 
double resolved_price
 
double inspected_closed_units
 
double inspected_opened_units
 
double inspected_current_ticket
 
uint32_t current
 1 for strategy_native_execute_current_v1.
 
uint32_t would_open
 0/1: the fill opens a lot.
 
uint32_t incoming_short
 0/1: the opened lot is short.
 
uint32_t reserved0
 Always 0.
 
double resulting_abs_units
 
uint64_t resulting_lot_count
 
double resulting_abs_notional
 
double realized_balance
 After the fill, account currency.
 
double remaining_entry_cost
 Paid costs on the resulting book.
 
double marked_equity
 After the fill, at its price.
 
int64_t cycle_after
 
double signed_units_after
 
const double * closed_row_pnl
 closed_row_count values; borrowed.
 
uint64_t closed_row_count
 
uint64_t cursor_ordinal
 
int64_t cursor_effective_time_ms
 
double cursor_t
 
int32_t cursor_interval_index
 
uint8_t cursor_provenance
 pf_native_price_provenance_t.
 
uint8_t cursor_path_phase
 pf_native_path_phase_t.
 
uint8_t reserved1 [2]
 Always 0.
 

Detailed Description

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).

Offered once per ready attempt, never for an inspection, and only when the settlement is ready to apply.

Definition at line 2001 of file native_c_api.h.

Field Documentation

◆ struct_size

uint32_t pf_native_precommit_view_v1::struct_size

sizeof(pf_native_precommit_view_v1).

Definition at line 2002 of file native_c_api.h.

◆ version

uint32_t pf_native_precommit_view_v1::version

PF_NATIVE_API_VERSION.

Definition at line 2003 of file native_c_api.h.

◆ incarnation

uint64_t pf_native_precommit_view_v1::incarnation

The request about to execute.

Definition at line 2004 of file native_c_api.h.

◆ intent

uint32_t pf_native_precommit_view_v1::intent

pf_native_intent_t of that request.

Definition at line 2005 of file native_c_api.h.

◆ plan

uint32_t pf_native_precommit_view_v1::plan

pf_native_plan_t.

Definition at line 2006 of file native_c_api.h.

◆ plan_units

double pf_native_precommit_view_v1::plan_units

See pf_native_plan_t.

Definition at line 2007 of file native_c_api.h.

◆ raw_price

double pf_native_precommit_view_v1::raw_price

Definition at line 2008 of file native_c_api.h.

◆ resolved_price

double pf_native_precommit_view_v1::resolved_price

Definition at line 2009 of file native_c_api.h.

◆ inspected_closed_units

double pf_native_precommit_view_v1::inspected_closed_units

Definition at line 2010 of file native_c_api.h.

◆ inspected_opened_units

double pf_native_precommit_view_v1::inspected_opened_units

Definition at line 2011 of file native_c_api.h.

◆ inspected_current_ticket

double pf_native_precommit_view_v1::inspected_current_ticket

Definition at line 2012 of file native_c_api.h.

◆ current

uint32_t pf_native_precommit_view_v1::current

1 for strategy_native_execute_current_v1.

Definition at line 2013 of file native_c_api.h.

◆ would_open

uint32_t pf_native_precommit_view_v1::would_open

0/1: the fill opens a lot.

Definition at line 2014 of file native_c_api.h.

◆ incoming_short

uint32_t pf_native_precommit_view_v1::incoming_short

0/1: the opened lot is short.

Definition at line 2015 of file native_c_api.h.

◆ reserved0

uint32_t pf_native_precommit_view_v1::reserved0

Always 0.

Definition at line 2016 of file native_c_api.h.

◆ resulting_abs_units

double pf_native_precommit_view_v1::resulting_abs_units

Definition at line 2017 of file native_c_api.h.

◆ resulting_lot_count

uint64_t pf_native_precommit_view_v1::resulting_lot_count

Definition at line 2018 of file native_c_api.h.

◆ resulting_abs_notional

double pf_native_precommit_view_v1::resulting_abs_notional

Definition at line 2019 of file native_c_api.h.

◆ realized_balance

double pf_native_precommit_view_v1::realized_balance

After the fill, account currency.

Definition at line 2020 of file native_c_api.h.

◆ remaining_entry_cost

double pf_native_precommit_view_v1::remaining_entry_cost

Paid costs on the resulting book.

Definition at line 2021 of file native_c_api.h.

◆ marked_equity

double pf_native_precommit_view_v1::marked_equity

After the fill, at its price.

Definition at line 2022 of file native_c_api.h.

◆ cycle_after

int64_t pf_native_precommit_view_v1::cycle_after

Definition at line 2023 of file native_c_api.h.

◆ signed_units_after

double pf_native_precommit_view_v1::signed_units_after

Definition at line 2024 of file native_c_api.h.

◆ closed_row_pnl

const double* pf_native_precommit_view_v1::closed_row_pnl

closed_row_count values; borrowed.

Definition at line 2025 of file native_c_api.h.

◆ closed_row_count

uint64_t pf_native_precommit_view_v1::closed_row_count

Definition at line 2026 of file native_c_api.h.

◆ cursor_ordinal

uint64_t pf_native_precommit_view_v1::cursor_ordinal

Definition at line 2027 of file native_c_api.h.

◆ cursor_effective_time_ms

int64_t pf_native_precommit_view_v1::cursor_effective_time_ms

Definition at line 2028 of file native_c_api.h.

◆ cursor_t

double pf_native_precommit_view_v1::cursor_t

Definition at line 2029 of file native_c_api.h.

◆ cursor_interval_index

int32_t pf_native_precommit_view_v1::cursor_interval_index

Definition at line 2030 of file native_c_api.h.

◆ cursor_provenance

uint8_t pf_native_precommit_view_v1::cursor_provenance

pf_native_price_provenance_t.

Definition at line 2031 of file native_c_api.h.

◆ cursor_path_phase

uint8_t pf_native_precommit_view_v1::cursor_path_phase

pf_native_path_phase_t.

Definition at line 2032 of file native_c_api.h.

◆ reserved1

uint8_t pf_native_precommit_view_v1::reserved1[2]

Always 0.

Definition at line 2033 of file native_c_api.h.


The documentation for this struct was generated from the following file: