|
PineForge v0.13.1-379-g9b50973
Deterministic PineScript v6 backtest runtime — C ABI reference
|
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...
#include <native_c_api.h>
Data Fields | |
| uint32_t | struct_size |
| sizeof(pf_native_margin_view_v1). | |
| uint32_t | version |
| PF_NATIVE_API_VERSION. | |
| uint32_t | kind |
| pf_native_margin_check_kind_t. | |
| uint32_t | liquidation_resting |
| 0/1: a liquidation rests from an earlier point. | |
| double | signed_units |
| The book being measured. | |
| double | average_price |
| uint64_t | lot_count |
| double | mark |
| The price the breach is measured at. | |
| double | equity |
| Marked equity on the model's basis. | |
| double | required |
Maintenance requirement of the whole position at mark. | |
| uint64_t | cursor_ordinal |
| int64_t | cursor_effective_time_ms |
| double | cursor_t |
| int32_t | cursor_interval_index |
| uint8_t | cursor_provenance |
| NativePriceProvenance. | |
| uint8_t | cursor_path_phase |
| NativePathPhase. | |
| uint8_t | reserved0 [2] |
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.
Every field is documented per hook and is zero where that hook has no such fact, exactly as pf_native_event_v1's union is:
kind, liquidation_resting, the position, mark and the cursor. equity and required are 0 — nothing has been evaluated yet at that point.kind, the position, mark, and the two numbers the kernel is ABOUT to compare (equity, required) — exactly what it would compare if the host answered PF_NATIVE_ANSWER_DEFAULT.mark, the equity and required measured there, and the cursor. kind and liquidation_resting are 0: a call is not a check point. Definition at line 876 of file native_c_api.h.
| uint32_t pf_native_margin_view_v1::struct_size |
sizeof(pf_native_margin_view_v1).
Definition at line 877 of file native_c_api.h.
| uint32_t pf_native_margin_view_v1::version |
PF_NATIVE_API_VERSION.
Definition at line 878 of file native_c_api.h.
| uint32_t pf_native_margin_view_v1::kind |
pf_native_margin_check_kind_t.
Definition at line 879 of file native_c_api.h.
| uint32_t pf_native_margin_view_v1::liquidation_resting |
0/1: a liquidation rests from an earlier point.
Definition at line 880 of file native_c_api.h.
| double pf_native_margin_view_v1::signed_units |
The book being measured.
Definition at line 881 of file native_c_api.h.
| double pf_native_margin_view_v1::average_price |
Definition at line 882 of file native_c_api.h.
| uint64_t pf_native_margin_view_v1::lot_count |
Definition at line 883 of file native_c_api.h.
| double pf_native_margin_view_v1::mark |
The price the breach is measured at.
Definition at line 884 of file native_c_api.h.
| double pf_native_margin_view_v1::equity |
Marked equity on the model's basis.
Definition at line 885 of file native_c_api.h.
| double pf_native_margin_view_v1::required |
Maintenance requirement of the whole position at mark.
Definition at line 886 of file native_c_api.h.
| uint64_t pf_native_margin_view_v1::cursor_ordinal |
Definition at line 887 of file native_c_api.h.
| int64_t pf_native_margin_view_v1::cursor_effective_time_ms |
Definition at line 888 of file native_c_api.h.
| double pf_native_margin_view_v1::cursor_t |
Definition at line 889 of file native_c_api.h.
| int32_t pf_native_margin_view_v1::cursor_interval_index |
Definition at line 890 of file native_c_api.h.
| uint8_t pf_native_margin_view_v1::cursor_provenance |
NativePriceProvenance.
Definition at line 891 of file native_c_api.h.
| uint8_t pf_native_margin_view_v1::cursor_path_phase |
NativePathPhase.
Definition at line 892 of file native_c_api.h.
| uint8_t pf_native_margin_view_v1::reserved0[2] |
Definition at line 893 of file native_c_api.h.