PineForge unreleased
Deterministic PineScript v6 backtest runtime — C ABI reference
Loading...
Searching...
No Matches
pf_native_margin_view_v1 Struct 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
 pf_native_price_provenance_t.
 
uint8_t cursor_path_phase
 pf_native_path_phase_t.
 
uint8_t reserved0 [2]
 

Detailed Description

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:

  • on_margin_check: kind, liquidation_resting, the position, mark and the cursor. equity and required are 0 — nothing has been evaluated yet at that point.
  • on_margin_requirement: 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.
  • on_margin_call_units: the position being liquidated, the sizing 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 1854 of file native_c_api.h.

Field Documentation

◆ struct_size

uint32_t pf_native_margin_view_v1::struct_size

sizeof(pf_native_margin_view_v1).

Definition at line 1855 of file native_c_api.h.

◆ version

uint32_t pf_native_margin_view_v1::version

PF_NATIVE_API_VERSION.

Definition at line 1856 of file native_c_api.h.

◆ kind

uint32_t pf_native_margin_view_v1::kind

pf_native_margin_check_kind_t.

Definition at line 1857 of file native_c_api.h.

◆ liquidation_resting

uint32_t pf_native_margin_view_v1::liquidation_resting

0/1: a liquidation rests from an earlier point.

Definition at line 1858 of file native_c_api.h.

◆ signed_units

double pf_native_margin_view_v1::signed_units

The book being measured.

Definition at line 1859 of file native_c_api.h.

◆ average_price

double pf_native_margin_view_v1::average_price

Definition at line 1860 of file native_c_api.h.

◆ lot_count

uint64_t pf_native_margin_view_v1::lot_count

Definition at line 1861 of file native_c_api.h.

◆ mark

double pf_native_margin_view_v1::mark

The price the breach is measured at.

Definition at line 1862 of file native_c_api.h.

◆ equity

double pf_native_margin_view_v1::equity

Marked equity on the model's basis.

Definition at line 1863 of file native_c_api.h.

◆ required

double pf_native_margin_view_v1::required

Maintenance requirement of the whole position at mark.

Definition at line 1864 of file native_c_api.h.

◆ cursor_ordinal

uint64_t pf_native_margin_view_v1::cursor_ordinal

Definition at line 1865 of file native_c_api.h.

◆ cursor_effective_time_ms

int64_t pf_native_margin_view_v1::cursor_effective_time_ms

Definition at line 1866 of file native_c_api.h.

◆ cursor_t

double pf_native_margin_view_v1::cursor_t

Definition at line 1867 of file native_c_api.h.

◆ cursor_interval_index

int32_t pf_native_margin_view_v1::cursor_interval_index

Definition at line 1868 of file native_c_api.h.

◆ cursor_provenance

uint8_t pf_native_margin_view_v1::cursor_provenance

pf_native_price_provenance_t.

Definition at line 1869 of file native_c_api.h.

◆ cursor_path_phase

uint8_t pf_native_margin_view_v1::cursor_path_phase

pf_native_path_phase_t.

Definition at line 1870 of file native_c_api.h.

◆ reserved0

uint8_t pf_native_margin_view_v1::reserved0[2]

Definition at line 1871 of file native_c_api.h.


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