|
PineForge v1.4.0-4-g873b25da
Deterministic PineScript v6 backtest runtime — C ABI 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. | |
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.
| 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.
| uint32_t pf_native_precommit_view_v1::version |
PF_NATIVE_API_VERSION.
Definition at line 2003 of file native_c_api.h.
| uint64_t pf_native_precommit_view_v1::incarnation |
The request about to execute.
Definition at line 2004 of file native_c_api.h.
| 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.
| uint32_t pf_native_precommit_view_v1::plan |
Definition at line 2006 of file native_c_api.h.
| double pf_native_precommit_view_v1::plan_units |
See pf_native_plan_t.
Definition at line 2007 of file native_c_api.h.
| double pf_native_precommit_view_v1::raw_price |
Definition at line 2008 of file native_c_api.h.
| double pf_native_precommit_view_v1::resolved_price |
Definition at line 2009 of file native_c_api.h.
| double pf_native_precommit_view_v1::inspected_closed_units |
Definition at line 2010 of file native_c_api.h.
| double pf_native_precommit_view_v1::inspected_opened_units |
Definition at line 2011 of file native_c_api.h.
| double pf_native_precommit_view_v1::inspected_current_ticket |
Definition at line 2012 of file native_c_api.h.
| 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.
| 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.
| 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.
| uint32_t pf_native_precommit_view_v1::reserved0 |
Always 0.
Definition at line 2016 of file native_c_api.h.
| double pf_native_precommit_view_v1::resulting_abs_units |
Definition at line 2017 of file native_c_api.h.
| uint64_t pf_native_precommit_view_v1::resulting_lot_count |
Definition at line 2018 of file native_c_api.h.
| double pf_native_precommit_view_v1::resulting_abs_notional |
Definition at line 2019 of file native_c_api.h.
| double pf_native_precommit_view_v1::realized_balance |
After the fill, account currency.
Definition at line 2020 of file native_c_api.h.
| 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.
| double pf_native_precommit_view_v1::marked_equity |
After the fill, at its price.
Definition at line 2022 of file native_c_api.h.
| int64_t pf_native_precommit_view_v1::cycle_after |
Definition at line 2023 of file native_c_api.h.
| double pf_native_precommit_view_v1::signed_units_after |
Definition at line 2024 of file native_c_api.h.
| 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.
| uint64_t pf_native_precommit_view_v1::closed_row_count |
Definition at line 2026 of file native_c_api.h.
| uint64_t pf_native_precommit_view_v1::cursor_ordinal |
Definition at line 2027 of file native_c_api.h.
| int64_t pf_native_precommit_view_v1::cursor_effective_time_ms |
Definition at line 2028 of file native_c_api.h.
| double pf_native_precommit_view_v1::cursor_t |
Definition at line 2029 of file native_c_api.h.
| int32_t pf_native_precommit_view_v1::cursor_interval_index |
Definition at line 2030 of file native_c_api.h.
| uint8_t pf_native_precommit_view_v1::cursor_provenance |
Definition at line 2031 of file native_c_api.h.
| uint8_t pf_native_precommit_view_v1::cursor_path_phase |
Definition at line 2032 of file native_c_api.h.
| uint8_t pf_native_precommit_view_v1::reserved1[2] |
Always 0.
Definition at line 2033 of file native_c_api.h.