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

Replacement behaviour that is not expressible in the successor request. More...

#include <native_order.hpp>

Data Fields

bool retain_trigger_state = false
 
bool keep_handle = false
 
bool keep_binding = false
 

Detailed Description

Replacement behaviour that is not expressible in the successor request.

retain_trigger_state carries the predecessor's live trigger state (a tracking trail's best, an already active stop) into the successor instead of restarting it; predecessor and successor must hold the same trigger alternative.

keep_handle re-prices the request in place: the new definition keeps the target's handle, and with it the request's lineage (its predecessor link and chain root) and its dependents – a child waiting on it keeps waiting, a roster that names it keeps it – where a plain replace retires the handle and issues a successor. Everything else is the replace: the same checks and refusals, a new immutable definition and birth, a fresh live row (remaining, allowance and trigger state restart unless retain_trigger_state keeps the last), and one ReplacedEvent, whose two definitions share the handle. The re-price takes the number of the run's request sequence a successor's incarnation would have taken, as the definition's priority (RequestDefinition::priority): matching ranks it the newest request, where a successor stands, and the requests after it are numbered as if the replace had issued a handle. No handle is issued under that number.

keep_binding carries a close's book binding across the replace. A successor that starts unbound (an Independent close) and whose predecessor was bound to the book, or carried such a binding itself, records the binding's cycle and side (RequestDefinition::kept_binding). Where the successor would bind, at its first evaluation, a book that still has that cycle and side binds it with no CloseBoundEvent; any other book binds it, or ends it, exactly as it does a successor that carried nothing. So the option changes the events a run records, never what it matches. Anywhere else it carries nothing. Either option may be given alone.

Definition at line 367 of file native_order.hpp.

Field Documentation

◆ retain_trigger_state

bool pineforge::native_order::native_order_v7::ReplaceOptions::retain_trigger_state = false

Definition at line 368 of file native_order.hpp.

◆ keep_handle

bool pineforge::native_order::native_order_v7::ReplaceOptions::keep_handle = false

◆ keep_binding

bool pineforge::native_order::native_order_v7::ReplaceOptions::keep_binding = false

Definition at line 370 of file native_order.hpp.


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