PineForge v0.13.1-379-g9b50973
Deterministic PineScript v6 backtest runtime — C ABI reference
Loading...
Searching...
No Matches
native_order.hpp File Reference
#include "execution.hpp"
#include "execution_reverse_to.hpp"
#include "execution_close_scope.hpp"
#include "market_driver.hpp"
#include "native_order_identity.hpp"
#include <algorithm>
#include <array>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <limits>
#include <memory>
#include <optional>
#include <string>
#include <type_traits>
#include <utility>
#include <variant>
#include <vector>
Include dependency graph for native_order.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  pineforge::native_order::native_order_v6::CohortHandle
 A host-maintained, run-scoped roster identity. More...
 
struct  pineforge::native_order::native_order_v6::ReverseTo
 Exact target exposure for an explicit reversal request. More...
 
struct  pineforge::native_order::native_order_v6::HostSized
 An opening or a closing whose quantity the HOST resolves, in NativeStrategyHost::resolve_execution_terms. More...
 
struct  pineforge::native_order::native_order_v6::CashValue
 Native sizing bases (L3). More...
 
struct  pineforge::native_order::native_order_v6::EquityFraction
 A fraction in (0, 1] of MARKED equity at the sizing point. More...
 
struct  pineforge::native_order::native_order_v6::Sized
 A kernel-sized opening. More...
 
struct  pineforge::native_order::native_order_v6::ExplicitUnits
 A reduction of exactly these units, finite and positive. More...
 
struct  pineforge::native_order::native_order_v6::OwnerOpenedUnits
 A reduction of exactly what the owner's fill opened, bound at the arm and reported by a QuantityBoundEvent. More...
 
struct  pineforge::native_order::native_order_v6::ScopeFraction
 A fraction in (0, 1] of the bound scope, resolved at the matching candidate. More...
 
struct  pineforge::native_order::native_order_v6::Reduce
 A closing-only intent. More...
 
struct  pineforge::native_order::native_order_v6::Market
 Match at the next eligible matching point, with no level to reach. More...
 
struct  pineforge::native_order::native_order_v6::Limit
 fill_through makes the limit a touch trigger (market-if-touched): the level still gates when the request becomes executable, but its fill is not bounded by the level, so slippage may carry it past the level. More...
 
struct  pineforge::native_order::native_order_v6::Stop
 A stop trigger: the modeled path has to reach price from the adverse side. More...
 
struct  pineforge::native_order::native_order_v6::StopLimit
 A stop that, once reached, becomes a limit at limit. More...
 
struct  pineforge::native_order::native_order_v6::TrailTicks
 Trail offset spelled in price ticks instead of a price distance. More...
 
struct  pineforge::native_order::native_order_v6::Trail
 offset is a price distance: the stop rides offset behind the running best. More...
 
struct  pineforge::native_order::native_order_v6::Absolute
 Where a request's trigger level comes from. More...
 
struct  pineforge::native_order::native_order_v6::FromOwnerFill
 Defer a level to the owner's fill: at the arm the level becomes fill + offset, with offset signed (adverse is negative) and spelled in price ticks when ticks is set, then rounded by rounding. More...
 
struct  pineforge::native_order::native_order_v6::ReplaceOptions
 Replacement behaviour that is not expressible in the successor request. More...
 
struct  pineforge::native_order::native_order_v6::ImmediateRemaining
 Take whatever the point allows, with no per-point cap. More...
 
struct  pineforge::native_order::native_order_v6::PointBudget
 Cap what this request may execute at ONE matching point at units. More...
 
struct  pineforge::native_order::native_order_v6::Independent
 No owner: the request stands on its own book authority. More...
 
struct  pineforge::native_order::native_order_v6::WaitForApplied
 The one owner relation that arms (the ArmedEvent). More...
 
struct  pineforge::native_order::native_order_v6::BindOpening
 Bind to ONE already-live opening, by its handle and the positive cycle it is live in. More...
 
struct  pineforge::native_order::native_order_v6::BindOpenings
 Bind to a fixed cohort of already-live openings. More...
 
struct  pineforge::native_order::native_order_v6::BindCohort
 Bind to a host-built roster (cohort_open / cohort_add / cohort_remove), read at the match rather than frozen at submit. More...
 
struct  pineforge::native_order::native_order_v6::NoGroup
 
struct  pineforge::native_order::native_order_v6::Member
 
struct  pineforge::native_order::native_order_v6::Request
 Aggregate field order keeps market construction: Request{Transact{1.0}, "buy", "comment"} Request{Flatten{}, "flat", ""} Request{Reduce{ExplicitUnits{3}}, "close", ""} New fields default to Market / ImmediateRemaining / Independent / NoGroup. More...
 
struct  pineforge::native_order::native_order_v6::EventId
 
struct  pineforge::native_order::native_order_v6::MatchCursor
 
struct  pineforge::native_order::native_order_v6::RemainingUnbound
 
struct  pineforge::native_order::native_order_v6::RemainingFlattenAll
 
struct  pineforge::native_order::native_order_v6::RemainingUnits
 A resolved remaining quantity, in units. More...
 
struct  pineforge::native_order::native_order_v6::RemainingDeferred
 
struct  pineforge::native_order::native_order_v6::NoTarget
 A dynamic cohort has no currently live member. More...
 
struct  pineforge::native_order::native_order_v6::RemainingProjectionUnbound
 
struct  pineforge::native_order::native_order_v6::RemainingProjectionFlattenAll
 
struct  pineforge::native_order::native_order_v6::RemainingProjectionUnits
 
struct  pineforge::native_order::native_order_v6::RemainingProjectionDeferred
 
struct  pineforge::native_order::native_order_v6::RemainingProjectionNoTarget
 
struct  pineforge::native_order::native_order_v6::BookTransaction
 
struct  pineforge::native_order::native_order_v6::Wait
 The authority an unarmed WaitForApplied child holds: accepted and live, but never a matching candidate until its owner's fill arms it — under either visibility. More...
 
struct  pineforge::native_order::native_order_v6::ArmedTransaction
 
struct  pineforge::native_order::native_order_v6::UnboundBookClose
 
struct  pineforge::native_order::native_order_v6::BookClose
 The authority an armed leg acquires under NativeArmScope::Book: the whole position its owner's fill left, on this cycle and side, bound at the fill's cursor. More...
 
struct  pineforge::native_order::native_order_v6::EnrollmentFromCommand
 
struct  pineforge::native_order::native_order_v6::EnrollmentFromApplied
 
struct  pineforge::native_order::native_order_v6::OpeningClose
 
struct  pineforge::native_order::native_order_v6::OpeningsClose
 Immutable fixed cohort. More...
 
struct  pineforge::native_order::native_order_v6::CohortClose
 
struct  pineforge::native_order::native_order_v6::SelectedExposure
 Native authorization receipt, converted to a call-local financial SelectedOpeningSet only at the consumer's settlement boundary. More...
 
struct  pineforge::native_order::native_order_v6::MarketReady
 
struct  pineforge::native_order::native_order_v6::LimitReady
 
struct  pineforge::native_order::native_order_v6::StopIdle
 
struct  pineforge::native_order::native_order_v6::StopActive
 
struct  pineforge::native_order::native_order_v6::StopLimitPending
 
struct  pineforge::native_order::native_order_v6::StopLimitLive
 
struct  pineforge::native_order::native_order_v6::TrailWaitArm
 
struct  pineforge::native_order::native_order_v6::TrailTrack
 
struct  pineforge::native_order::native_order_v6::TrailActive
 
struct  pineforge::native_order::native_order_v6::AllowanceUnset
 
struct  pineforge::native_order::native_order_v6::AllowanceUnits
 
struct  pineforge::native_order::native_order_v6::AllowanceAllScope
 
struct  pineforge::native_order::native_order_v6::AllowanceDeferred
 
struct  pineforge::native_order::native_order_v6::PendingNone
 
struct  pineforge::native_order::native_order_v6::PendingDeferred
 
struct  pineforge::native_order::native_order_v6::PositionFlat
 
struct  pineforge::native_order::native_order_v6::PositionNonflat
 
struct  pineforge::native_order::native_order_v6::OpeningObservation
 
struct  pineforge::native_order::native_order_v6::TargetObservation
 
struct  pineforge::native_order::native_order_v6::RequestDefinition
 The immutable accepted form of one request: its handle, the request value as accepted, its birth (acceptance ordinal and decision floor), its origin (RequestOrigin::Host, or the kernel's own for a liquidation or a risk flatten) and its authority. More...
 
struct  pineforge::native_order::native_order_v6::LiveRequest
 
struct  pineforge::native_order::native_order_v6::SubmitResult
 What submit answers. More...
 
struct  pineforge::native_order::native_order_v6::ReplaceResult
 
struct  pineforge::native_order::native_order_v6::CancelResult
 
struct  pineforge::native_order::native_order_v6::ExecutionTerms
 
struct  pineforge::native_order::native_order_v6::TermsResolvedInput
 
struct  pineforge::native_order::native_order_v6::AcceptedEvent
 One request was accepted: the definition, and the timeline ordinal it was accepted at. More...
 
struct  pineforge::native_order::native_order_v6::RejectedEvent
 
struct  pineforge::native_order::native_order_v6::ReplacedEvent
 
struct  pineforge::native_order::native_order_v6::ReplaceRejectedEvent
 
struct  pineforge::native_order::native_order_v6::CancelledEvent
 
struct  pineforge::native_order::native_order_v6::NotWorkingEvent
 
struct  pineforge::native_order::native_order_v6::InvalidHandleEvent
 
struct  pineforge::native_order::native_order_v6::NoEffectEvent
 A reduction or a flatten that had nothing to close: terminal, with no execution identity, no fill, no fee and no physical action. More...
 
struct  pineforge::native_order::native_order_v6::TermsResolvedEvent
 
struct  pineforge::native_order::native_order_v6::MatchRejectedEvent
 A candidate the run refused, with its MatchRejectReason and the cursor it was refused at. More...
 
struct  pineforge::native_order::native_order_v6::CloseBoundEvent
 
struct  pineforge::native_order::native_order_v6::ActivatedEvent
 
struct  pineforge::native_order::native_order_v6::ExecutionAppliedEvent
 One committed execution: the definition, the cursor, the resolved price and units, the scope it acted on, the committed closed-row range, the cycle on either side, and the ticket it booked under. More...
 
struct  pineforge::native_order::native_order_v6::ReservationReducedEvent
 
struct  pineforge::native_order::native_order_v6::DeferredGroupAdjustmentEvent
 
struct  pineforge::native_order::native_order_v6::QuantityBoundEvent
 A Reduce{OwnerOpenedUnits} was bound, at its owner's fill, to what that fill opened. More...
 
struct  pineforge::native_order::native_order_v6::ArmedEvent
 An anchored leg was materialized, exactly once: fill + offset, then the rounding, then resolve_anchored_level, then the representability check, and the resulting level written into the leg's trigger with its anchor becoming Absolute. More...
 
struct  pineforge::native_order::native_order_v6::MarginCallEvent
 A kernel-issued liquidation that actually filled. More...
 
struct  pineforge::native_order::native_order_v6::NativeRiskEvent
 One generic risk limit breaching (L9). More...
 
class  pineforge::native_order::native_order_v6::InlineCommandEvents
 Almost every prepared command yields one history event. More...
 
struct  pineforge::native_order::native_order_v6::CommandContext
 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...
 
struct  pineforge::native_order::native_order_v6::EvaluationContext
 
struct  pineforge::native_order::native_order_v6::ArmContext
 What the consumer hands to prepare_owner_applied for an anchored leg's materialization, the way acceptance receives CommandContext::price_tick. More...
 
struct  pineforge::native_order::native_order_v6::BeginTrailTracking
 
struct  pineforge::native_order::native_order_v6::ObserveTrailExtremum
 
struct  pineforge::native_order::native_order_v6::ActivateStop
 
struct  pineforge::native_order::native_order_v6::ActivateStopLimit
 
struct  pineforge::native_order::native_order_v6::ActivateTrail
 
struct  pineforge::native_order::native_order_v6::ActivationGrid
 What the consumer hands to prepare_trigger under an opted-in price grid (NativeRunSpec::price_grid == QuantizeFillsAndTriggers), the way acceptance receives CommandContext::price_tick: the tick ladder and the rounding the matcher tested the activation on. More...
 
struct  pineforge::native_order::native_order_v6::ExecutionProposal
 
struct  pineforge::native_order::native_order_v6::CommittedExecutionFacts
 
struct  pineforge::native_order::native_order_v6::EventRange
 
struct  pineforge::native_order::native_order_v6::Installed
 
struct  pineforge::native_order::native_order_v6::NoChange
 
struct  pineforge::native_order::native_order_v6::PreparationError
 A working-request preparation that could not produce a representable instruction — a nonrepresentable quantity, most often. More...
 
struct  pineforge::native_order::native_order_v6::CommandInstalled< R >
 
struct  pineforge::native_order::native_order_v6::EligibilityFacts
 
struct  pineforge::native_order::native_order_v6::CohortRoster
 
struct  pineforge::native_order::native_order_v6::CohortReceipt
 
class  pineforge::native_order::native_order_v6::WorkingRequestCore
 
class  pineforge::native_order::native_order_v6::PreparedSubmit
 
class  pineforge::native_order::native_order_v6::PreparedReplace
 
class  pineforge::native_order::native_order_v6::PreparedCancel
 
class  pineforge::native_order::native_order_v6::PreparedMutation
 
class  pineforge::native_order::native_order_v6::PreparedExecution
 
struct  std::hash< pineforge::native_order::CohortHandle >
 

Namespaces

namespace  pineforge
 
namespace  pineforge::native_order
 
namespace  pineforge::native_order::native_order_v6
 
namespace  std
 

Typedefs

using pineforge::native_order::native_order_v6::Flatten = execution::Flatten
 
using pineforge::native_order::native_order_v6::Transact = order_action::Transact
 A signed book transaction: finite nonzero units on the side their sign names.
 
using pineforge::native_order::native_order_v6::SizeBasis = std::variant<CashValue, EquityFraction>
 The two bases a Sized intent may name.
 
using pineforge::native_order::native_order_v6::ReductionSize = std::variant<ExplicitUnits, OwnerOpenedUnits, ScopeFraction>
 How much a Reduce takes: literal units, the owner's own opening, or a fraction of the bound scope.
 
using pineforge::native_order::native_order_v6::OrderIntent = std::variant<Flatten, Reduce, Transact, ReverseTo, HostSized, Sized>
 What a request does.
 
using pineforge::native_order::native_order_v6::Trigger = std::variant<Market, Limit, Stop, StopLimit, Trail>
 
using pineforge::native_order::native_order_v6::TriggerAnchor = std::variant<Absolute, FromOwnerFill>
 
using pineforge::native_order::native_order_v6::Capacity = std::variant<ImmediateRemaining, PointBudget>
 
using pineforge::native_order::native_order_v6::Owner = std::variant<Independent, WaitForApplied, BindOpening, BindOpenings, BindCohort>
 
using pineforge::native_order::native_order_v6::Group = std::variant<NoGroup, Member>
 
using pineforge::native_order::native_order_v6::Remaining
 
using pineforge::native_order::native_order_v6::RemainingProjection
 
using pineforge::native_order::native_order_v6::Enrollment = std::variant<EnrollmentFromCommand, EnrollmentFromApplied>
 
using pineforge::native_order::native_order_v6::Authority
 
using pineforge::native_order::native_order_v6::ExecutionScope = std::variant<execution::Book, execution::OpeningExposure, SelectedExposure>
 What one execution acted on: the whole book, one opening's exposure, or a bound selection.
 
using pineforge::native_order::native_order_v6::TriggerState
 
using pineforge::native_order::native_order_v6::Allowance
 
using pineforge::native_order::native_order_v6::PendingAdjustments = std::variant<PendingNone, PendingDeferred>
 
using pineforge::native_order::native_order_v6::PositionIdentity = std::variant<PositionFlat, PositionNonflat>
 
using pineforge::native_order::native_order_v6::DefinitionRef = std::shared_ptr<const RequestDefinition>
 
using pineforge::native_order::native_order_v6::ExecutionPlan
 The settlement shape one execution takes.
 
using pineforge::native_order::native_order_v6::CommandEvent
 Every alternative of one request's history, as one value.
 
using pineforge::native_order::native_order_v6::AnchoredLevelResolver
 The one policy point of an anchored materialization.
 
using pineforge::native_order::native_order_v6::TriggerTransition
 
using pineforge::native_order::native_order_v6::InstallResult = std::variant<Installed, InstallError>
 
template<class T>
using pineforge::native_order::native_order_v6::Preparation = std::variant<T, NoChange, PreparationError>
 
template<class R>
using pineforge::native_order::native_order_v6::InstalledCommand = std::variant<CommandInstalled<R>, InstallError>
 

Enumerations

enum class  pineforge::native_order::native_order_v6::HostSizedKind : std::uint8_t {
  pineforge::native_order::native_order_v6::Open = 0 ,
  pineforge::native_order::native_order_v6::Close = 1
}
 
enum class  pineforge::native_order::native_order_v6::Side : std::uint8_t {
  pineforge::native_order::native_order_v6::Long = 0 ,
  pineforge::native_order::native_order_v6::Short = 1
}
 
enum class  pineforge::native_order::native_order_v6::ExecutionGridPolicy : std::uint8_t {
  pineforge::native_order::native_order_v6::SnapToGrid = 0 ,
  pineforge::native_order::native_order_v6::ExplicitUnits = 1
}
 Resolved host sizing normally remains subject to the run's quantity grid. More...
 
enum class  pineforge::native_order::native_order_v6::SizeTime : std::uint8_t {
  pineforge::native_order::native_order_v6::AtMatch = 0 ,
  pineforge::native_order::native_order_v6::AtAcceptance = 1
}
 AtMatch resolves the basis at the matching candidate; AtAcceptance freezes the resolved units when the request is accepted. More...
 
enum class  pineforge::native_order::native_order_v6::SizePrice : std::uint8_t {
  pineforge::native_order::native_order_v6::Resolved = 0 ,
  pineforge::native_order::native_order_v6::Signal = 1 ,
  pineforge::native_order::native_order_v6::SignalOnTick = 2
}
 WHICH price the basis is converted at. More...
 
enum class  pineforge::native_order::native_order_v6::ScopeClaim : std::uint8_t {
  pineforge::native_order::native_order_v6::Gross = 0 ,
  pineforge::native_order::native_order_v6::NetOfSiblings = 1
}
 Gross claims the whole bound scope; NetOfSiblings first subtracts the units already claimed by the live sibling reduces bound to that same scope. More...
 
enum class  pineforge::native_order::native_order_v6::ScopeBasis : std::uint8_t {
  pineforge::native_order::native_order_v6::AtMatch = 0 ,
  pineforge::native_order::native_order_v6::AtAcceptance = 1
}
 Which measurement of the bound scope the fraction is taken of. More...
 
enum class  pineforge::native_order::native_order_v6::NativeAnchorRounding : std::uint8_t {
  pineforge::native_order::native_order_v6::Raw = 0 ,
  pineforge::native_order::native_order_v6::HalfUp = 1 ,
  pineforge::native_order::native_order_v6::Directional = 2
}
 How a materialized anchored level is snapped onto the run's price tick ladder (NativeRunSpec::price_tick). More...
 
enum class  pineforge::native_order::native_order_v6::NativeArmVisibility : std::uint8_t {
  pineforge::native_order::native_order_v6::Working = 0 ,
  pineforge::native_order::native_order_v6::PendingUntilArmed = 1
}
 Whether an owner-related request that arms is a working order before its arm. More...
 
enum class  pineforge::native_order::native_order_v6::NativeArmFirstMatch : std::uint8_t {
  pineforge::native_order::native_order_v6::AtArmPrint = 0 ,
  pineforge::native_order::native_order_v6::AfterArmPrint = 1
}
 When an armed request may first match. More...
 
enum class  pineforge::native_order::native_order_v6::NativeArmScope : std::uint8_t {
  pineforge::native_order::native_order_v6::OwnerLot = 0 ,
  pineforge::native_order::native_order_v6::Book = 1
}
 What an armed CLOSING request (Reduce, Flatten, a HostSized close) closes. More...
 
enum class  pineforge::native_order::native_order_v6::GroupEffect : std::uint8_t {
  pineforge::native_order::native_order_v6::Cancel = 0 ,
  pineforge::native_order::native_order_v6::Reduce = 1
}
 
enum class  pineforge::native_order::native_order_v6::RequestOrigin : std::uint8_t {
  pineforge::native_order::native_order_v6::Host = 0 ,
  pineforge::native_order::native_order_v6::KernelLiquidation = 1 ,
  pineforge::native_order::native_order_v6::KernelRisk = 2
}
 Who authored a request. More...
 
enum class  pineforge::native_order::native_order_v6::RequestRejectReason : std::uint8_t {
  pineforge::native_order::native_order_v6::InvalidQuantity = 0 ,
  pineforge::native_order::native_order_v6::OffGrid = 1 ,
  pineforge::native_order::native_order_v6::InvalidTrigger = 2 ,
  pineforge::native_order::native_order_v6::InvalidCapacity = 3 ,
  pineforge::native_order::native_order_v6::InvalidOwner = 4 ,
  pineforge::native_order::native_order_v6::InvalidQuantityBasis = 5 ,
  pineforge::native_order::native_order_v6::InvalidGroup = 6 ,
  pineforge::native_order::native_order_v6::PlacementAdmission = 7
}
 Why an acceptance was refused, on a Rejected SubmitResult. More...
 
enum class  pineforge::native_order::native_order_v6::SubmitStatus {
  pineforge::native_order::native_order_v6::Accepted ,
  pineforge::native_order::native_order_v6::Rejected
}
 
enum class  pineforge::native_order::native_order_v6::ReplaceStatus {
  pineforge::native_order::native_order_v6::Replaced ,
  pineforge::native_order::native_order_v6::ReplaceRejected ,
  pineforge::native_order::native_order_v6::NotWorking ,
  pineforge::native_order::native_order_v6::InvalidHandle
}
 
enum class  pineforge::native_order::native_order_v6::CancelStatus {
  pineforge::native_order::native_order_v6::Cancelled ,
  pineforge::native_order::native_order_v6::NotWorking ,
  pineforge::native_order::native_order_v6::InvalidHandle
}
 
enum class  pineforge::native_order::native_order_v6::MatchRejectReason : std::uint8_t {
  pineforge::native_order::native_order_v6::NonpositivePrice = 0 ,
  pineforge::native_order::native_order_v6::OpeningDirection = 1 ,
  pineforge::native_order::native_order_v6::MaxAbsUnits = 2 ,
  pineforge::native_order::native_order_v6::MaxOpenLots = 3 ,
  pineforge::native_order::native_order_v6::InitialMargin = 4 ,
  pineforge::native_order::native_order_v6::TermsUnresolved = 5 ,
  pineforge::native_order::native_order_v6::InvalidTerms = 6 ,
  pineforge::native_order::native_order_v6::NoOppositeExposure = 7 ,
  pineforge::native_order::native_order_v6::HostPrecommit = 8 ,
  pineforge::native_order::native_order_v6::RiskLimit = 9
}
 Why a CANDIDATE was refused — a decision taken at a matching point, with the request still live unless the reason is terminal. More...
 
enum class  pineforge::native_order::native_order_v6::NativeCandidatePriceKind : std::uint8_t {
  pineforge::native_order::native_order_v6::PointPrice = 0 ,
  pineforge::native_order::native_order_v6::TriggerLevel = 1 ,
  pineforge::native_order::native_order_v6::CurrentQuote = 2
}
 Which price a candidate is being offered at: the point's own price, or the request's trigger level (a crossing that books the level itself). More...
 
enum class  pineforge::native_order::native_order_v6::OpeningShape : std::uint8_t {
  pineforge::native_order::native_order_v6::Transact = 0 ,
  pineforge::native_order::native_order_v6::ReverseTo = 1 ,
  pineforge::native_order::native_order_v6::CloseOpposite = 2
}
 
enum class  pineforge::native_order::native_order_v6::CancelReason : std::uint8_t {
  pineforge::native_order::native_order_v6::User = 0 ,
  pineforge::native_order::native_order_v6::Group = 1 ,
  pineforge::native_order::native_order_v6::OwnerGone = 2 ,
  pineforge::native_order::native_order_v6::UnsupportedRelation = 3 ,
  pineforge::native_order::native_order_v6::Superseded = 4
}
 Why a request left the book. More...
 
enum class  pineforge::native_order::native_order_v6::AppliedTerminalReason : std::uint8_t {
  pineforge::native_order::native_order_v6::WorkingUnitsSatisfied = 0 ,
  pineforge::native_order::native_order_v6::Flattened = 1 ,
  pineforge::native_order::native_order_v6::TargetExhausted = 2
}
 
enum class  pineforge::native_order::native_order_v6::ActivationKind : std::uint8_t {
  pineforge::native_order::native_order_v6::Stop = 0 ,
  pineforge::native_order::native_order_v6::StopLimit = 1 ,
  pineforge::native_order::native_order_v6::TrailArm = 2 ,
  pineforge::native_order::native_order_v6::TrailTrigger = 3
}
 
enum class  pineforge::native_order::native_order_v6::CoreFailure : std::uint8_t {
  pineforge::native_order::native_order_v6::Invariant = 0 ,
  pineforge::native_order::native_order_v6::InvalidCause = 1 ,
  pineforge::native_order::native_order_v6::NonrepresentableQuantity = 2 ,
  pineforge::native_order::native_order_v6::MissingObservation = 3 ,
  pineforge::native_order::native_order_v6::StaleHandle = 4 ,
  pineforge::native_order::native_order_v6::UnsupportedTransition = 5 ,
  pineforge::native_order::native_order_v6::ConflictingReceipt = 6 ,
  pineforge::native_order::native_order_v6::UnrepresentableReservation = 7 ,
  pineforge::native_order::native_order_v6::InvalidScope = 8 ,
  pineforge::native_order::native_order_v6::InvalidProposal = 9 ,
  pineforge::native_order::native_order_v6::ObservationMismatch = 10
}
 
enum class  pineforge::native_order::native_order_v6::DriverEligibilityClass : std::uint8_t {
  pineforge::native_order::native_order_v6::ObservedPrint = 0 ,
  pineforge::native_order::native_order_v6::CarriedOpen = 1 ,
  pineforge::native_order::native_order_v6::TickAfterCalculation = 2 ,
  pineforge::native_order::native_order_v6::ConfirmedOpen = 3 ,
  pineforge::native_order::native_order_v6::ConfirmedExcursion = 4 ,
  pineforge::native_order::native_order_v6::ConfirmedAfterCalculationClose = 5 ,
  pineforge::native_order::native_order_v6::CurrentExecution = 6
}
 
enum class  pineforge::native_order::native_order_v6::CommandSurface : std::uint8_t {
  pineforge::native_order::native_order_v6::General = 0 ,
  pineforge::native_order::native_order_v6::MarketOnly = 1
}
 
enum class  pineforge::native_order::native_order_v6::RiskLimitKind : std::uint8_t {
  pineforge::native_order::native_order_v6::MaxDrawdown = 0 ,
  pineforge::native_order::native_order_v6::MaxIntradayLoss = 1 ,
  pineforge::native_order::native_order_v6::MaxConsecutiveLossDays = 2 ,
  pineforge::native_order::native_order_v6::MaxFillsPerDay = 3
}
 Which generic risk limit of NativeRunSpec::risk a NativeRiskEvent reports. More...
 
enum class  pineforge::native_order::native_order_v6::InstallError : std::uint8_t {
  pineforge::native_order::native_order_v6::StalePreparation = 0 ,
  pineforge::native_order::native_order_v6::WrongCoreOrRun = 1 ,
  pineforge::native_order::native_order_v6::AlreadyConsumed = 2
}
 
enum class  pineforge::native_order::native_order_v6::NoChangeReason : std::uint8_t {
  pineforge::native_order::native_order_v6::NoTransition = 0 ,
  pineforge::native_order::native_order_v6::StillWaiting = 1 ,
  pineforge::native_order::native_order_v6::NotEligible = 2 ,
  pineforge::native_order::native_order_v6::NotWorking = 3 ,
  pineforge::native_order::native_order_v6::AlreadyApplied = 4
}
 
enum class  pineforge::native_order::native_order_v6::CohortReceiptOperation : std::uint8_t {
  pineforge::native_order::native_order_v6::Add = 0 ,
  pineforge::native_order::native_order_v6::Remove = 1
}
 
enum class  pineforge::native_order::native_order_v6::CohortReceiptStatus : std::uint8_t {
  pineforge::native_order::native_order_v6::Applied = 0 ,
  pineforge::native_order::native_order_v6::InvalidHandle = 1 ,
  pineforge::native_order::native_order_v6::UnknownOrigin = 2 ,
  pineforge::native_order::native_order_v6::TerminalOrigin = 3
}
 

Functions

bool pineforge::native_order::native_order_v6::operator== (CohortHandle left, CohortHandle right) noexcept
 
bool pineforge::native_order::native_order_v6::operator!= (CohortHandle left, CohortHandle right) noexcept
 
bool pineforge::native_order::native_order_v6::operator< (CohortHandle left, CohortHandle right) noexcept
 
OrderIntent pineforge::native_order::native_order_v6::intent_from_physical (const execution::Action &action)
 
Request pineforge::native_order::native_order_v6::market_request (execution::Action action, std::string label={}, std::string comment={})
 
bool pineforge::native_order::native_order_v6::has_market_defaults (const Request &request) noexcept
 
bool pineforge::native_order::native_order_v6::operator== (const EventId &a, const EventId &b)
 
bool pineforge::native_order::native_order_v6::operator!= (const EventId &a, const EventId &b)
 
bool pineforge::native_order::native_order_v6::operator== (const MatchCursor &a, const MatchCursor &b) noexcept
 
bool pineforge::native_order::native_order_v6::operator!= (const MatchCursor &a, const MatchCursor &b) noexcept
 
std::uint8_t pineforge::native_order::native_order_v6::display_waypoint (const MatchCursor &cursor) noexcept
 
bool pineforge::native_order::native_order_v6::point_eligible (const LiveRequest &live, uint64_t point_ordinal, int64_t effective_time_ms) noexcept
 Whether a request may be considered at this driver point: the point's ordinal must be strictly past the birth acceptance ordinal AND its effective time at or past the birth's decision-time lower bound.
 
bool pineforge::native_order::native_order_v6::quantity_on_grid (double q, double step) noexcept
 v2 exact binary64 grid: r=abs(q)/s, n=round(r) half away from zero, g=n*s.
 
ExecutionPlan pineforge::native_order::native_order_v6::to_execution_plan (const execution::Action &action)