PineForge unreleased
Deterministic PineScript v6 backtest runtime — C ABI reference
Loading...
Searching...
No Matches
pf_native_run_spec_v1 Struct Reference

Versioned native run specification. More...

#include <pineforge.h>

Data Fields

uint32_t struct_size
 
const char * session_key
 
uint64_t run_number
 
const char * input_tf
 
const char * script_tf
 
const char * ticker
 
const char * tickerid
 
const char * type
 
const char * currency
 
const char * basecurrency
 
const char * description
 
const char * volumetype
 
const char * timezone
 
const char * session
 
const char * chart_timezone
 
double initial_capital
 
double point_value
 
double account_fx
 
double price_tick
 
uint32_t slippage_ticks
 
uint32_t fee_kind
 
double fee_value
 
uint32_t optional_mask
 
uint32_t close_execution
 
uint32_t allowed_open_directions
 
double quantity_grid
 
double max_abs_units
 
double initial_margin_fraction
 
uint64_t max_open_lots
 

Detailed Description

Versioned native run specification.

All string pointers are non-null. session may be empty (all-day literal). session_key, timeframes, timezone and tickerid are nonempty. optional_mask carries pf_native_spec_optional_t bits.

Its three enum-valued words are named in <pineforge/native_c_api.h>: fee_kind is a pf_native_fee_kind_t, close_execution a pf_native_close_execution_t and allowed_open_directions a pf_native_open_directions_t (zero-filled, that word admits no opening at all). strategy_configure_native_v1 hands the whole value to the kernel, which answers an invalid spec with -1 and a Failed native handle (PF_NATIVE_FAILURE_INVALID_SPECIFICATION). A Ready handle still fails by the kernel's Contract rule. A Running handle is refused at the C boundary without changing its native state, including from a callback. A Completed handle or one Failed by a cooperative abort may be configured for another run outside callbacks; the kernel judges reuse constraints (an aborted handle is reused with the same session key and a higher run number), and a handle whose configure call failed remains Failed. A Completed host's on_hash_extension callback cannot reconfigure it during a read-only hash query. This call has no typed out-parameters. The extended path validates before configuring: strategy_configure_native_ext_v1 keeps the handle Unconfigured on a validation refusal, and strategy_configure_native_ext_result_v1 additionally writes the exact pf_native_spec_error_t / pf_native_spec_field_t pair.

Definition at line 500 of file pineforge.h.

Field Documentation

◆ struct_size

uint32_t pf_native_run_spec_v1::struct_size

Definition at line 501 of file pineforge.h.

Referenced by make_spec(), and make_spec().

◆ session_key

const char* pf_native_run_spec_v1::session_key

Definition at line 502 of file pineforge.h.

Referenced by make_spec(), and make_spec().

◆ run_number

uint64_t pf_native_run_spec_v1::run_number

Definition at line 502 of file pineforge.h.

Referenced by make_spec(), and make_spec().

◆ input_tf

const char* pf_native_run_spec_v1::input_tf

Definition at line 503 of file pineforge.h.

Referenced by make_spec(), and make_spec().

◆ script_tf

const char * pf_native_run_spec_v1::script_tf

Definition at line 503 of file pineforge.h.

Referenced by make_spec(), and make_spec().

◆ ticker

const char* pf_native_run_spec_v1::ticker

Definition at line 504 of file pineforge.h.

Referenced by make_spec(), and make_spec().

◆ tickerid

const char * pf_native_run_spec_v1::tickerid

Definition at line 504 of file pineforge.h.

Referenced by make_spec(), and make_spec().

◆ type

const char * pf_native_run_spec_v1::type

Definition at line 504 of file pineforge.h.

Referenced by make_spec(), and make_spec().

◆ currency

const char * pf_native_run_spec_v1::currency

Definition at line 504 of file pineforge.h.

Referenced by make_spec(), and make_spec().

◆ basecurrency

const char * pf_native_run_spec_v1::basecurrency

Definition at line 504 of file pineforge.h.

Referenced by make_spec(), and make_spec().

◆ description

const char * pf_native_run_spec_v1::description

Definition at line 504 of file pineforge.h.

Referenced by make_spec(), and make_spec().

◆ volumetype

const char * pf_native_run_spec_v1::volumetype

Definition at line 504 of file pineforge.h.

Referenced by make_spec(), and make_spec().

◆ timezone

const char* pf_native_run_spec_v1::timezone

Definition at line 505 of file pineforge.h.

Referenced by make_spec(), and make_spec().

◆ session

const char * pf_native_run_spec_v1::session

Definition at line 505 of file pineforge.h.

Referenced by make_spec(), and make_spec().

◆ chart_timezone

const char * pf_native_run_spec_v1::chart_timezone

Definition at line 505 of file pineforge.h.

Referenced by make_spec(), and make_spec().

◆ initial_capital

double pf_native_run_spec_v1::initial_capital

Definition at line 506 of file pineforge.h.

Referenced by make_spec(), and make_spec().

◆ point_value

double pf_native_run_spec_v1::point_value

Definition at line 506 of file pineforge.h.

Referenced by make_spec(), and make_spec().

◆ account_fx

double pf_native_run_spec_v1::account_fx

Definition at line 506 of file pineforge.h.

Referenced by make_spec(), and make_spec().

◆ price_tick

double pf_native_run_spec_v1::price_tick

Definition at line 506 of file pineforge.h.

Referenced by make_spec(), and make_spec().

◆ slippage_ticks

uint32_t pf_native_run_spec_v1::slippage_ticks

Definition at line 507 of file pineforge.h.

◆ fee_kind

uint32_t pf_native_run_spec_v1::fee_kind

Definition at line 507 of file pineforge.h.

Referenced by make_spec(), and make_spec().

◆ fee_value

double pf_native_run_spec_v1::fee_value

Definition at line 507 of file pineforge.h.

Referenced by make_spec(), and make_spec().

◆ optional_mask

uint32_t pf_native_run_spec_v1::optional_mask

Definition at line 508 of file pineforge.h.

◆ close_execution

uint32_t pf_native_run_spec_v1::close_execution

Definition at line 508 of file pineforge.h.

Referenced by make_spec(), and make_spec().

◆ allowed_open_directions

uint32_t pf_native_run_spec_v1::allowed_open_directions

Definition at line 508 of file pineforge.h.

Referenced by make_spec(), and make_spec().

◆ quantity_grid

double pf_native_run_spec_v1::quantity_grid

Definition at line 509 of file pineforge.h.

◆ max_abs_units

double pf_native_run_spec_v1::max_abs_units

Definition at line 509 of file pineforge.h.

◆ initial_margin_fraction

double pf_native_run_spec_v1::initial_margin_fraction

Definition at line 509 of file pineforge.h.

◆ max_open_lots

uint64_t pf_native_run_spec_v1::max_open_lots

Definition at line 510 of file pineforge.h.


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