|
PineForge unreleased
Deterministic PineScript v6 backtest runtime — C ABI 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 |
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.
| uint32_t pf_native_run_spec_v1::struct_size |
Definition at line 501 of file pineforge.h.
Referenced by make_spec(), and make_spec().
| const char* pf_native_run_spec_v1::session_key |
Definition at line 502 of file pineforge.h.
Referenced by make_spec(), and make_spec().
| uint64_t pf_native_run_spec_v1::run_number |
Definition at line 502 of file pineforge.h.
Referenced by make_spec(), and make_spec().
| const char* pf_native_run_spec_v1::input_tf |
Definition at line 503 of file pineforge.h.
Referenced by make_spec(), and make_spec().
| const char * pf_native_run_spec_v1::script_tf |
Definition at line 503 of file pineforge.h.
Referenced by make_spec(), and make_spec().
| const char* pf_native_run_spec_v1::ticker |
Definition at line 504 of file pineforge.h.
Referenced by make_spec(), and make_spec().
| const char * pf_native_run_spec_v1::tickerid |
Definition at line 504 of file pineforge.h.
Referenced by make_spec(), and make_spec().
| const char * pf_native_run_spec_v1::type |
Definition at line 504 of file pineforge.h.
Referenced by make_spec(), and make_spec().
| const char * pf_native_run_spec_v1::currency |
Definition at line 504 of file pineforge.h.
Referenced by make_spec(), and make_spec().
| const char * pf_native_run_spec_v1::basecurrency |
Definition at line 504 of file pineforge.h.
Referenced by make_spec(), and make_spec().
| const char * pf_native_run_spec_v1::description |
Definition at line 504 of file pineforge.h.
Referenced by make_spec(), and make_spec().
| const char * pf_native_run_spec_v1::volumetype |
Definition at line 504 of file pineforge.h.
Referenced by make_spec(), and make_spec().
| const char* pf_native_run_spec_v1::timezone |
Definition at line 505 of file pineforge.h.
Referenced by make_spec(), and make_spec().
| const char * pf_native_run_spec_v1::session |
Definition at line 505 of file pineforge.h.
Referenced by make_spec(), and make_spec().
| const char * pf_native_run_spec_v1::chart_timezone |
Definition at line 505 of file pineforge.h.
Referenced by make_spec(), and make_spec().
| double pf_native_run_spec_v1::initial_capital |
Definition at line 506 of file pineforge.h.
Referenced by make_spec(), and make_spec().
| double pf_native_run_spec_v1::point_value |
Definition at line 506 of file pineforge.h.
Referenced by make_spec(), and make_spec().
| double pf_native_run_spec_v1::account_fx |
Definition at line 506 of file pineforge.h.
Referenced by make_spec(), and make_spec().
| double pf_native_run_spec_v1::price_tick |
Definition at line 506 of file pineforge.h.
Referenced by make_spec(), and make_spec().
| uint32_t pf_native_run_spec_v1::slippage_ticks |
Definition at line 507 of file pineforge.h.
| uint32_t pf_native_run_spec_v1::fee_kind |
Definition at line 507 of file pineforge.h.
Referenced by make_spec(), and make_spec().
| double pf_native_run_spec_v1::fee_value |
Definition at line 507 of file pineforge.h.
Referenced by make_spec(), and make_spec().
| uint32_t pf_native_run_spec_v1::optional_mask |
Definition at line 508 of file pineforge.h.
| uint32_t pf_native_run_spec_v1::close_execution |
Definition at line 508 of file pineforge.h.
Referenced by make_spec(), and make_spec().
| 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().
| double pf_native_run_spec_v1::quantity_grid |
Definition at line 509 of file pineforge.h.
| double pf_native_run_spec_v1::max_abs_units |
Definition at line 509 of file pineforge.h.
| double pf_native_run_spec_v1::initial_margin_fraction |
Definition at line 509 of file pineforge.h.
| uint64_t pf_native_run_spec_v1::max_open_lots |
Definition at line 510 of file pineforge.h.