|
PineForge unreleased
Deterministic PineScript v6 backtest runtime — C ABI reference
|
One complete setup value, staged/copied by NativeStrategyHost before it is applied at begin. More...
#include <native_run_spec.hpp>
One complete setup value, staged/copied by NativeStrategyHost before it is applied at begin.
This aggregate owns no host phase, consumed-run counter, parsed-calendar authority, physical account, or C transport presence mask. Empty required strings and zero capital/value/FX defaults make an incomplete value invalid; price_tick == 0 explicitly selects unquantized prices. No timezone/timeframe/instrument facts are inferred.
Definition at line 622 of file native_run_spec.hpp.
| native_order::RunIdentity pineforge::native_run_spec_v3::NativeRunSpec::identity |
| std::string pineforge::native_run_spec_v3::NativeRunSpec::input_tf |
Definition at line 624 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| std::string pineforge::native_run_spec_v3::NativeRunSpec::script_tf |
Definition at line 625 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| bool pineforge::native_run_spec_v3::NativeRunSpec::timeframe_undetected = false |
A public begin with fewer than two bars may not establish a timeframe.
This preserves that explicit state without inventing a clock literal.
Definition at line 628 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| NativeSlotLabelPolicy pineforge::native_run_spec_v3::NativeRunSpec::slot_label_policy = NativeSlotLabelPolicy::Canonical |
Strict native hosts retain the canonical slot-label rule.
A provider feed may opt into raw, strictly-increasing caller labels. The declared type spellings below are the ones the native C++ ABI guard pins.
Definition at line 632 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| NativeFeedTolerance pineforge::native_run_spec_v3::NativeRunSpec::legacy_tolerance = NativeFeedTolerance::None |
Definition at line 633 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| NativePathOrder pineforge::native_run_spec_v3::NativeRunSpec::path_order = NativePathOrder::Auto |
Definition at line 634 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| std::string pineforge::native_run_spec_v3::NativeRunSpec::ticker |
Definition at line 636 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| std::string pineforge::native_run_spec_v3::NativeRunSpec::tickerid |
Definition at line 637 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| std::string pineforge::native_run_spec_v3::NativeRunSpec::type |
Definition at line 638 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| std::string pineforge::native_run_spec_v3::NativeRunSpec::currency |
Definition at line 639 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| std::string pineforge::native_run_spec_v3::NativeRunSpec::basecurrency |
Definition at line 640 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| std::string pineforge::native_run_spec_v3::NativeRunSpec::description |
Definition at line 641 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| std::string pineforge::native_run_spec_v3::NativeRunSpec::volumetype |
Definition at line 642 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| std::string pineforge::native_run_spec_v3::NativeRunSpec::timezone |
Definition at line 644 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| std::string pineforge::native_run_spec_v3::NativeRunSpec::session |
Definition at line 645 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| std::string pineforge::native_run_spec_v3::NativeRunSpec::chart_timezone |
Definition at line 646 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| double pineforge::native_run_spec_v3::NativeRunSpec::initial_capital = 0.0 |
Definition at line 648 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| double pineforge::native_run_spec_v3::NativeRunSpec::point_value = 0.0 |
Definition at line 649 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| double pineforge::native_run_spec_v3::NativeRunSpec::account_fx = 0.0 |
Definition at line 650 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| double pineforge::native_run_spec_v3::NativeRunSpec::price_tick = 0.0 |
Definition at line 651 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| std::uint32_t pineforge::native_run_spec_v3::NativeRunSpec::slippage_ticks = 0 |
Definition at line 652 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| NativePriceGrid pineforge::native_run_spec_v3::NativeRunSpec::price_grid = NativePriceGrid::None |
Opt-in instrument grid.
None keeps unquantized prices; both quantizing modes require price_tick > 0 and round before slippage.
Definition at line 655 of file native_run_spec.hpp.
| NativeGridRounding pineforge::native_run_spec_v3::NativeRunSpec::grid_rounding = NativeGridRounding::HalfUp |
Definition at line 656 of file native_run_spec.hpp.
| NativeFeeKind pineforge::native_run_spec_v3::NativeRunSpec::fee_kind = NativeFeeKind::Percent |
Definition at line 657 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| double pineforge::native_run_spec_v3::NativeRunSpec::fee_value = 0.0 |
Definition at line 658 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| std::optional<double> pineforge::native_run_spec_v3::NativeRunSpec::quantity_grid |
Definition at line 660 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| NativeCloseExecution pineforge::native_run_spec_v3::NativeRunSpec::close_execution = NativeCloseExecution::NextEligiblePoint |
Definition at line 661 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| NativeAbortReporting pineforge::native_run_spec_v3::NativeRunSpec::abort_reporting = NativeAbortReporting::Error |
Definition at line 662 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| std::optional<double> pineforge::native_run_spec_v3::NativeRunSpec::max_abs_units |
Definition at line 663 of file native_run_spec.hpp.
| std::optional<std::uint64_t> pineforge::native_run_spec_v3::NativeRunSpec::max_open_lots |
Definition at line 664 of file native_run_spec.hpp.
| NativeOpenDirections pineforge::native_run_spec_v3::NativeRunSpec::allowed_open_directions = NativeOpenDirections::Both |
Definition at line 665 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| std::optional<double> pineforge::native_run_spec_v3::NativeRunSpec::initial_margin_fraction |
Definition at line 666 of file native_run_spec.hpp.
| std::optional<NativeMarginModel> pineforge::native_run_spec_v3::NativeRunSpec::margin |
Opt-in generic margin model.
Mutually exclusive with initial_margin_fraction, which remains the one-scalar spelling. Folded into the continuation digest only when it is present, so a spec that declares none keeps its pre-margin-model identity byte for byte.
Definition at line 672 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| std::optional<NativeRiskLimits> pineforge::native_run_spec_v3::NativeRunSpec::risk |
Opt-in generic account risk limits.
Absent is the whole default surface: nothing is measured, no risk event is appended, and the continuation digest is the pre-risk one. Folded into it only when the block is present, exactly as margin is.
Definition at line 677 of file native_run_spec.hpp.
| NativeReportPolicy pineforge::native_run_spec_v3::NativeRunSpec::report_policy = NativeReportPolicy::HostRecorded |
Definition at line 678 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| bool pineforge::native_run_spec_v3::NativeRunSpec::report_open_position_at_end = false |
Report a position still open at run end as a mark-to-market closed row at the last close.
KernelRecorded only, and reporting only: the live book, the realized sums and every hash are left exactly as the run left them. Inert under HostRecorded, whose host owns the whole report series.
Definition at line 683 of file native_run_spec.hpp.
| NativeCalculationTrigger pineforge::native_run_spec_v3::NativeRunSpec::calculation = NativeCalculationTrigger::BarClose |
Calculation timing.
BarClose is the established cadence and the whole default surface; the other triggers only add calculations, never move or remove one. max_recalculations_per_point bounds the fill cascade at one matching point: further executions at that point are still applied and still delivered to on_native_applied, they just stop driving a new calculation. Zero is a legal bound and means "deliver, never recalculate". All three fold into the continuation hash only once the trigger or the open-bar view is non-default, so a spec that leaves the cadence alone keeps the continuation identity it had before these fields existed.
Definition at line 694 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| std::uint32_t pineforge::native_run_spec_v3::NativeRunSpec::max_recalculations_per_point = 8 |
Definition at line 695 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| NativeOpenBarView pineforge::native_run_spec_v3::NativeRunSpec::open_bar_view = NativeOpenBarView::Complete |
Definition at line 696 of file native_run_spec.hpp.
| IntrabarPath pineforge::native_run_spec_v3::NativeRunSpec::intrabar {} |
Definition at line 697 of file native_run_spec.hpp.
Referenced by pineforge::source::PineScheduler::lower_path_bar_at(), and pineforge::source::PineExecutionAdapter::project().
| std::vector<NativeTimeframeSubscription> pineforge::native_run_spec_v3::NativeRunSpec::subscriptions |
Declared higher-timeframe series.
Empty is the whole default surface: no evaluator is registered, no feed is prepared, and the run spec's continuation digest is the pre-subscription one.
Definition at line 701 of file native_run_spec.hpp.
| std::optional<NativeAuxiliaryFeed> pineforge::native_run_spec_v3::NativeRunSpec::auxiliary_feed |
Opt-in auxiliary finer feed.
Absent is the whole default surface: nothing is stored, nothing is routed, and the continuation digest is the pre-feed one. Folded into it only when the block is present, exactly as margin and risk are.
Definition at line 706 of file native_run_spec.hpp.
Referenced by main().
| std::vector<NativeInstrumentFeed> pineforge::native_run_spec_v3::NativeRunSpec::instrument_feeds |
Opt-in feeds of other instruments.
Empty is the whole default surface: nothing is stored, nothing is delivered, and the continuation digest is the pre-feed one. Folded into it only when there are any, exactly as auxiliary_feed is. See NativeInstrumentFeed.
Definition at line 711 of file native_run_spec.hpp.
Referenced by pineforge::source::PineStrategyHost::prepare_native_begin(), and pineforge::source::PineExecutionAdapter::project().
| NativeEventRetention pineforge::native_run_spec_v3::NativeRunSpec::event_retention = NativeEventRetention::Window |
What native_events() can still return; see NativeEventRetention.
Folded into the spec digest only when it is not Window.
Definition at line 714 of file native_run_spec.hpp.
Referenced by pineforge::source::PineExecutionAdapter::project().
| std::optional<double> pineforge::native_run_spec_v3::NativeRunSpec::quantity_tolerance |
Opt-in quantity tolerance, in units (finite, positive): two quantities within it of each other are one quantity to the settlement.
A close that comes within it of a FIFO boundary – the binary64 sum of the lots through one of them – ends at that boundary, charged its request, and a lot of at most this size that binary64 cannot take off a close's rest closes whole with the close that reaches it (docs/native- settlement.md, "Quantity tolerance"). Absent is the whole default surface: the settlement stays exact, a quantity it cannot book exactly is that request's MatchRejectReason::UnrepresentableQuantity, and the continuation digest is the pre-tolerance one; the value folds only when present (R5 lane K-ULP4).
Definition at line 726 of file native_run_spec.hpp.