PineForge v1.4.0-4-g873b25da
Deterministic PineScript v6 backtest runtime — C ABI reference
Loading...
Searching...
No Matches
pineforge::native_order::native_order_v7::CommandContext Struct Reference

What acceptance needs from the run to judge a command: the point's ordinal and coordinate, the price tick the tick spellings resolve against, the quantity grid, and the live book. More...

#include <native_order.hpp>

Data Fields

int64_t decision_time_ms = 0
 
std::optional< double > quantity_grid
 
std::optional< OpeningObservation > opening
 
CommandSurface surface = CommandSurface::General
 
std::vector< OpeningObservation > openings
 
std::optional< double > sizing_units
 Kernel-resolved acceptance-time units for a Sized{AtAcceptance} request.
 
std::optional< double > price_tick
 The run's price tick, needed only to resolve a tick-spelled trail offset or trigger anchor.
 
std::optional< double > sizing_scope
 Placement-time sizing measurements the execution consumer owns, supplied only for the intent that asks for them.
 
std::optional< double > sizing_price
 
bool sizing_admissible = true
 
bool units_are_scope_boundary = false
 A Reduce's ExplicitUnits are a FIFO boundary of its scope: the binary64 sum, in book order, of the scope's lots through one of them – the head lot's own size, a prefix, the whole scope.
 

Detailed Description

What acceptance needs from the run to judge a command: the point's ordinal and coordinate, the price tick the tick spellings resolve against, the quantity grid, and the live book.

Built by the consumer; a host never constructs one.

Definition at line 1421 of file native_order.hpp.

Field Documentation

◆ decision_time_ms

int64_t pineforge::native_order::native_order_v7::CommandContext::decision_time_ms = 0

Definition at line 1422 of file native_order.hpp.

◆ quantity_grid

std::optional<double> pineforge::native_order::native_order_v7::CommandContext::quantity_grid

Definition at line 1423 of file native_order.hpp.

◆ opening

std::optional<OpeningObservation> pineforge::native_order::native_order_v7::CommandContext::opening

Definition at line 1424 of file native_order.hpp.

◆ surface

CommandSurface pineforge::native_order::native_order_v7::CommandContext::surface = CommandSurface::General

Definition at line 1425 of file native_order.hpp.

◆ openings

std::vector<OpeningObservation> pineforge::native_order::native_order_v7::CommandContext::openings

Definition at line 1426 of file native_order.hpp.

◆ sizing_units

std::optional<double> pineforge::native_order::native_order_v7::CommandContext::sizing_units

Kernel-resolved acceptance-time units for a Sized{AtAcceptance} request.

The execution consumer owns the account facts, so it supplies them here; a producer that leaves it unset accepts the request with a size the matching path then reports as TermsUnresolved. The accepted request carries the value in LiveRequest::sizing_units and still reaches the candidate with a deferred remaining, so the host keeps its one override pass. Appended last so the existing positional aggregate initializers keep their meaning.

Definition at line 1435 of file native_order.hpp.

◆ price_tick

std::optional<double> pineforge::native_order::native_order_v7::CommandContext::price_tick

The run's price tick, needed only to resolve a tick-spelled trail offset or trigger anchor.

A tick spelling without a usable tick here is rejected rather than silently read as a price distance.

Definition at line 1439 of file native_order.hpp.

◆ sizing_scope

std::optional<double> pineforge::native_order::native_order_v7::CommandContext::sizing_scope

Placement-time sizing measurements the execution consumer owns, supplied only for the intent that asks for them.

Appended last, exactly like sizing_units, so the existing positional aggregate initializers keep their meaning.

sizing_scope: the bound scope's exposure at acceptance, for a Reduce{ScopeFraction{ScopeBasis::AtAcceptance}}. sizing_price: the frozen signal price, for a Sized whose SizePrice is Signal or SignalOnTick. sizing_admissible: false when the acceptance-resolved quantity of a Sized{SizeTime::AtAcceptance} fails the run's placement admission.

Definition at line 1451 of file native_order.hpp.

◆ sizing_price

std::optional<double> pineforge::native_order::native_order_v7::CommandContext::sizing_price

Definition at line 1452 of file native_order.hpp.

◆ sizing_admissible

bool pineforge::native_order::native_order_v7::CommandContext::sizing_admissible = true

Definition at line 1453 of file native_order.hpp.

◆ units_are_scope_boundary

bool pineforge::native_order::native_order_v7::CommandContext::units_are_scope_boundary = false

A Reduce's ExplicitUnits are a FIFO boundary of its scope: the binary64 sum, in book order, of the scope's lots through one of them – the head lot's own size, a prefix, the whole scope.

Such a quantity is on the quantity grid whatever the grid predicate answers: these are the book's own quantities, which settlement arithmetic can move off any decimal grid; closing them takes whole lots and splits none (R5 lane K-ULP4). The execution consumer measures it at submit, for a request of ImmediateRemaining capacity; its candidate settles what then remains only on the grid, at a boundary of the scope as it stands or at least at its held total, and refuses anything else (MatchRejectReason:: UnrepresentableQuantity). Appended last, like the members above.

Definition at line 1465 of file native_order.hpp.


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