|
PineForge v0.13.1-379-g9b50973
Deterministic PineScript v6 backtest runtime — C ABI reference
|
One recorded event, read back by strategy_native_events_v1. More...
#include <native_c_api.h>
Data Fields | |
| uint32_t | struct_size |
| sizeof(pf_native_event_v1). | |
| uint32_t | version |
| PF_NATIVE_API_VERSION. | |
| uint32_t | kind |
| pf_native_event_kind_t. | |
| uint32_t | reason |
| Per-kind reason enumerator, 0 when none. | |
| uint64_t | ordinal |
| Event ordinal; strictly increasing. | |
| uint64_t | incarnation |
| Subject request, 0 when the kind has none. | |
| uint64_t | successor |
| REPLACED: the new handle. | |
| double | raw_price |
| double | resolved_price |
| double | price |
| double | closed_units |
| double | opened_units |
| int64_t | cycle_before |
| int64_t | cycle_after |
| int64_t | effective_time_ms |
| Cursor effective time, 0 when the kind has no cursor. | |
| int32_t | interval_index |
| Cursor interval index. | |
| uint8_t | provenance |
| Cursor NativePriceProvenance. | |
| uint8_t | path_phase |
| Cursor NativePathPhase. | |
| uint8_t | terminal |
| APPLIED only. | |
| uint8_t | reserved0 [3] |
One recorded event, read back by strategy_native_events_v1.
kind tags the union: every field below is documented per kind and is zero where that kind has no such fact.
incarnation.reason is a RequestRejectReason.incarnation is the predecessor, successor the new handle.reason is a CancelReason.reason is a MatchRejectReason, cursor fields set.terminal, cursor fields.price = mark, closed_units = liquidated units, raw_price = the re-solved liquidation price.reason is an ActivationKind, price the reached price.raw_price.price = marked equity, raw_price = realized balance, opened_units = signed position units.reason is a pf_native_risk_limit_t, price = the observed value that reached the limit, raw_price = the limit it was measured against (account currency for the two loss limits — a percent limit is already resolved against its basis equity — days or fills for the two counts), cycle_before = the risk day the breach happened on, on the spec's own day basis, successor = the cursor's matching-point ordinal, cursor fields set. The event names no request: it is an account fact, so incarnation stays 0. Definition at line 733 of file native_c_api.h.
| uint32_t pf_native_event_v1::struct_size |
sizeof(pf_native_event_v1).
Definition at line 734 of file native_c_api.h.
| uint32_t pf_native_event_v1::version |
PF_NATIVE_API_VERSION.
Definition at line 735 of file native_c_api.h.
| uint32_t pf_native_event_v1::kind |
Definition at line 736 of file native_c_api.h.
| uint32_t pf_native_event_v1::reason |
Per-kind reason enumerator, 0 when none.
Definition at line 737 of file native_c_api.h.
| uint64_t pf_native_event_v1::ordinal |
Event ordinal; strictly increasing.
Definition at line 738 of file native_c_api.h.
| uint64_t pf_native_event_v1::incarnation |
Subject request, 0 when the kind has none.
Definition at line 739 of file native_c_api.h.
| uint64_t pf_native_event_v1::successor |
REPLACED: the new handle.
RISK: the cursor's matching-point ordinal. 0 otherwise.
Definition at line 740 of file native_c_api.h.
| double pf_native_event_v1::raw_price |
Definition at line 742 of file native_c_api.h.
| double pf_native_event_v1::resolved_price |
Definition at line 743 of file native_c_api.h.
Referenced by run_mode().
| double pf_native_event_v1::price |
Definition at line 744 of file native_c_api.h.
| double pf_native_event_v1::closed_units |
Definition at line 745 of file native_c_api.h.
| double pf_native_event_v1::opened_units |
Definition at line 746 of file native_c_api.h.
| int64_t pf_native_event_v1::cycle_before |
Definition at line 747 of file native_c_api.h.
| int64_t pf_native_event_v1::cycle_after |
Definition at line 748 of file native_c_api.h.
| int64_t pf_native_event_v1::effective_time_ms |
Cursor effective time, 0 when the kind has no cursor.
Definition at line 749 of file native_c_api.h.
| int32_t pf_native_event_v1::interval_index |
Cursor interval index.
Definition at line 750 of file native_c_api.h.
| uint8_t pf_native_event_v1::provenance |
Cursor NativePriceProvenance.
Definition at line 751 of file native_c_api.h.
| uint8_t pf_native_event_v1::path_phase |
Cursor NativePathPhase.
Definition at line 752 of file native_c_api.h.
| uint8_t pf_native_event_v1::terminal |
APPLIED only.
Definition at line 753 of file native_c_api.h.
| uint8_t pf_native_event_v1::reserved0[3] |
Definition at line 754 of file native_c_api.h.