PineForge unreleased
Deterministic PineScript v6 backtest runtime — C ABI reference
Loading...
Searching...
No Matches
pineforge::source::PineExecutionAdapter Class Reference

#include <pine_adapter.hpp>

Data Structures

struct  AnchoredRelativeStats
 
struct  CohortHeapEstimate
 
struct  ExitGroupWork
 
struct  FixtureCloseCallsite
 
struct  FixturePendingSnapshot
 
struct  PendingScanCounter
 
struct  PendingScanWork
 
struct  PositionTailWork
 
struct  RetirementPopulation
 
struct  RetirementWork
 
struct  SourceMarginMoney
 

Public Types

enum class  PositionTailGuard : std::uint8_t {
  None ,
  Inactive ,
  Invalidated ,
  PublicationRewind ,
  PublicationGap ,
  BeforeBarrier ,
  NonmonotoneTime ,
  MissingOrigin ,
  ReactivatedOrigin ,
  SideMismatch ,
  InvalidQuantity ,
  QuantumShift ,
  MagnitudeShift ,
  MagnitudeOverflow ,
  InvalidCertificate ,
  NonfiniteResult ,
  NonPineHost ,
  ShortSeed ,
  Amendment ,
  Relabel ,
  Flat ,
  Rebind ,
  Count
}
 

Public Member Functions

 PineExecutionAdapter (compat::pine::CapAttachment attachment=compat::pine::CapAttachment::None)
 
 PineExecutionAdapter (NativeStrategyHost &host, compat::pine::CapAttachment attachment=compat::pine::CapAttachment::None)
 
void bind (NativeStrategyHost &host) noexcept
 
void bind_exit_scratch (detail::ExitScratchContext &context)
 
int projection_bar_index (const NativeDecisionContext &) const noexcept
 
int projection_bar_index (const NativeCoordinate &) const noexcept
 
void reset_for_run ()
 
void set_cache_policy_for_run (const CacheDefaults &policy)
 
void set_configuration (const PineStrategyConfig &config) noexcept
 
void set_staged_configuration (const StagedConfiguration &staged)
 
void set_begin_mode (bool is_stream, bool bar_magnifier=false) noexcept
 
void set_id_tables_directory (const std::string &directory)
 
void set_auxiliary_tables_directory (const std::string &directory)
 
void fixture_use_memory_auxiliary_tables ()
 
void fixture_cohort_implicit_spill_interval (std::size_t calls) noexcept
 
void fixture_spill_predicate (bool(*predicate)(const std::string &)) noexcept
 
void fixture_verify_source_entry_slots (bool enabled) noexcept
 
void fixture_bracket_remove_precheck (bool enabled) noexcept
 
std::uint64_t fixture_auxiliary_disk_bytes () const noexcept
 
std::uint64_t fixture_erased_digest () const noexcept
 
std::uint64_t fixture_erased_rows () const noexcept
 
const ::pineforge::detail::IdPairStore< std::int64_t, true > & fixture_consumed_partial_exit_cycles () const noexcept
 
const PendingScanWork & pending_scan_work () const noexcept
 
const auto & cohort_table_work () const noexcept
 
CohortHeapEstimate cohort_heap_estimate () const noexcept
 
PositionTailWork position_tail_work () const noexcept
 
NativeRunSpec project (const PineStrategyConfig &, const StagedConfiguration &, const NativeBeginArgs &, NativePathOrder path_order=NativePathOrder::Auto, std::vector< NativeInstrumentFeed > *instrument_feeds=nullptr) const
 
void entry (const SourceId &id, bool is_long, double limit_price=std::numeric_limits< double >::quiet_NaN(), double stop_price=std::numeric_limits< double >::quiet_NaN(), double qty=std::numeric_limits< double >::quiet_NaN(), const std::string &comment={}, const std::string &oca_name={}, int oca_type=0, int qty_type=-1)
 
void close (const SourceId &id, const std::string &comment={}, double qty=std::numeric_limits< double >::quiet_NaN(), double qty_percent=std::numeric_limits< double >::quiet_NaN(), bool immediately=false, std::uint64_t callsite_token=0)
 
void close_all ()
 
void exit (const SourceId &exit_id, const SourceId &from_entry, double limit_price, double stop_price, double trail_points=std::numeric_limits< double >::quiet_NaN(), double trail_offset=std::numeric_limits< double >::quiet_NaN(), double trail_price=std::numeric_limits< double >::quiet_NaN(), double qty_percent=100.0, const std::string &comment={}, double qty=std::numeric_limits< double >::quiet_NaN(), const std::string &oca_name={}, double profit_ticks=std::numeric_limits< double >::quiet_NaN(), double loss_ticks=std::numeric_limits< double >::quiet_NaN())
 
void exit_cancel_bracket (const SourceId &exit_id, const SourceId &from_entry, const std::string &comment={})
 
void cancel (const SourceId &id)
 
void cancel_all ()
 
void order (const SourceId &id, bool is_long, double qty, double limit_price=std::numeric_limits< double >::quiet_NaN(), double stop_price=std::numeric_limits< double >::quiet_NaN(), const std::string &oca_name={}, int oca_type=0)
 
native_order::ExecutionTerms resolve_terms (const NativeExecutionTermsFacts &) const
 
void anchor_relative_exits ()
 
std::optional< double > resolve_anchored_level (const NativeAnchoredLevelView &) const
 
const AnchoredRelativeStats & anchored_relative_stats () const noexcept
 
bool core_sizes_default_opening (bool is_long) const
 
void preflight_id_pair_precommit (const NativePrecommitView &) const
 
NativePrecommitVerdict validate_precommit (const NativePrecommitView &) const
 
SourceMarginMoney source_margin_money (double mark_price, std::int64_t sub_bar_open_ms) const
 
double source_margin_units (const SourceMarginMoney &, bool opening_checkpoint, bool gated=true, double print=std::numeric_limits< double >::quiet_NaN()) const
 
double lagged_margin_follow_up_units (const std::vector< NativeOpenLot > &lots, const SourceMarginMoney &money, double called, double fill, std::int64_t sub_bar_open_ms) const
 
double source_margin_fill_price (double fire, bool close_is_buy) const
 
bool source_margin_rounded_tie_veto () const
 
bool margin_check_allowed (const NativeMarginCheckPoint &) const
 
bool intrabar_sample_checked (const NativeMarginCheckPoint &) const
 
std::optional< NativeMarginDecision > resolve_margin_requirement (const NativeMarginRequirementView &) const
 
std::optional< double > resolve_margin_call_units (const NativeMarginCallView &) const
 
void on_bar_open (const Bar &, const NativeDecisionContext &)
 
void on_tick (const Bar &, const NativeTickContext &)
 
void on_bar_close_before_script (const Bar &, const NativeDecisionContext &)
 
void on_bar_close (const Bar &, const NativeDecisionContext &)
 
void on_applied (const native_order::ExecutionAppliedEvent &, const NativeDecisionContext &)
 
void source_batch_end ()
 
std::int64_t chart_day_key (std::int64_t timestamp_ms) const noexcept
 
int short_seed_collision_role_v1 (native_order::RequestHandle) const noexcept
 
const PendingIntentView & pending_intent_view () const noexcept
 
std::vector< FixturePendingSnapshot > fixture_pending_snapshots () const
 
double source_unclosed_qty_for (const SourceId &id) const noexcept
 
int source_entry_slot_count () const noexcept
 
double fixture_close_logical_units (const SourceId &) const noexcept
 
std::size_t fixture_close_logical_count () const noexcept
 
double fixture_close_pending_debt () const noexcept
 
double fixture_close_admitted_total () const noexcept
 
std::vector< FixtureCloseCallsite > fixture_close_callsites () const
 
void set_risk_direction (int direction) noexcept
 
void set_risk_max_cons_loss_days (int value) noexcept
 
void set_risk_max_drawdown (double value, bool percent) noexcept
 
void set_risk_max_intraday_loss (double value, bool percent) noexcept
 
void set_risk_max_position_size (double value) noexcept
 
PineReplayRiskConfig capture_replay_risk_config () const noexcept
 
void restore_replay_risk_config (const PineReplayRiskConfig &) noexcept
 
bool allows_risk_direction (bool is_long) const noexcept
 
bool max_drawdown_is_percent () const noexcept
 
bool max_intraday_loss_is_percent () const noexcept
 
bool take_intraday_loss_relabel (std::uint64_t ordinal) noexcept
 
void set_margin_call_enabled (bool enabled) noexcept
 
void mark_market_pyramid_add (std::uint64_t incarnation)
 
bool market_pyramid_add (std::uint64_t incarnation) const noexcept
 
void enable_intraday_cap () noexcept
 
void attach_execution_adapter () noexcept
 
bool calc_on_order_fills () const noexcept
 
bool process_orders_on_close () const noexcept
 
bool fixture_coof_recalc_active () const noexcept
 
bool fixture_coof_cursor_is_bar_close () const noexcept
 
PineCancellationReceipt * fixture_mutable_cancellation (int index) noexcept
 
void fixture_remove_entry_without_named_cancel (const SourceId &)
 
void begin_source_evaluation () noexcept
 
bool fixture_named_entry_cancel_active (const SourceId &id) const noexcept
 
std::vector< native_order::RequestHandle > take_first_open_newborns ()
 
void observe_terminal_receipts ()
 
void flush_pending_bracket_legs (native_order::RequestHandle just_applied={}, bool post_calculation=true, bool pre_script_drain=false)
 
void flush_pending_entries ()
 
void flush_pending_closes ()
 
void release_delayed_orders (bool explicit_brackets_only=false, double current_open=std::numeric_limits< double >::quiet_NaN())
 
void begin_coof_recalc (const native_order::ExecutionAppliedEvent &, const NativeDecisionContext &, bool first_open, std::uint64_t source_fill_sequence)
 
void end_coof_recalc () noexcept
 
bool suppress_grouped_stop_recalc (const native_order::ExecutionAppliedEvent &, const NativeDecisionContext &) const noexcept
 
bool immediate_calculation_close (const native_order::ExecutionAppliedEvent &, const NativeDecisionContext &) const noexcept
 
std::uint64_t command_sequence_for_exit (const SourceId &exit_id, const SourceId &from_entry={}) const
 
bool is_open_phase_exit (std::size_t trade_index) const
 
std::uint8_t exit_phase_value (std::size_t trade_index) const
 
std::pair< std::size_t, std::uint64_t > exit_phase_prefix () const noexcept
 
std::size_t resident_exit_phases () const noexcept
 
void permute_exit_phases (std::size_t start, const std::vector< std::size_t > &indices)
 
void permute_exit_phase_rows (std::size_t start, std::size_t count, const std::function< std::size_t(std::size_t)> &source_at)
 
ExitGroupWork exit_group_work () const noexcept
 
std::optional< std::vector< std::uint32_t > > global_exit_child_ranks (const std::vector< SourceId > &ids) const
 
bool other_exit_reaches (double price, bool closing_long, const SourceId &exit_id, const native_order::RequestHandle &filled) const
 
void hash_state (BrokerStateHashSink &) const
 
const RetirementWork & retirement_work () const noexcept
 
RetirementPopulation retirement_population () const
 

Static Public Member Functions

static std::uint64_t fold_dropped_close (std::uint64_t digest, const DroppedCloseReceipt &receipt) noexcept
 
static std::uint64_t fold_exit_phase (std::uint64_t digest, std::uint8_t phase) noexcept
 

Data Fields

compat::pine::IntradayCap cap
 
compat::pine::OrderPriority priority
 
MarketAdmissionJournal admission_journal
 

Detailed Description

Definition at line 1633 of file pine_adapter.hpp.

Member Enumeration Documentation

◆ PositionTailGuard

Enumerator
None 
Inactive 
Invalidated 
PublicationRewind 
PublicationGap 
BeforeBarrier 
NonmonotoneTime 
MissingOrigin 
ReactivatedOrigin 
SideMismatch 
InvalidQuantity 
QuantumShift 
MagnitudeShift 
MagnitudeOverflow 
InvalidCertificate 
NonfiniteResult 
NonPineHost 
ShortSeed 
Amendment 
Relabel 
Flat 
Rebind 
Count 

Definition at line 1718 of file pine_adapter.hpp.

Constructor & Destructor Documentation

◆ PineExecutionAdapter() [1/2]

pineforge::source::PineExecutionAdapter::PineExecutionAdapter ( compat::pine::CapAttachment attachment = compat::pine::CapAttachment::None)
explicit

◆ PineExecutionAdapter() [2/2]

pineforge::source::PineExecutionAdapter::PineExecutionAdapter ( NativeStrategyHost & host,
compat::pine::CapAttachment attachment = compat::pine::CapAttachment::None )

Definition at line 1110 of file pine_adapter.cpp.

References bind(), and PineExecutionAdapter().

Member Function Documentation

◆ bind()

void pineforge::source::PineExecutionAdapter::bind ( NativeStrategyHost & host)
noexcept

Definition at line 1177 of file pine_adapter.cpp.

References PINEFORGE_POSITION_TAIL_DIAGNOSTICS, and Rebind.

Referenced by on_applied(), and PineExecutionAdapter().

◆ bind_exit_scratch()

◆ projection_bar_index() [1/2]

int pineforge::source::PineExecutionAdapter::projection_bar_index ( const NativeDecisionContext & context) const
noexcept

◆ projection_bar_index() [2/2]

int pineforge::source::PineExecutionAdapter::projection_bar_index ( const NativeCoordinate & coordinate) const
noexcept

◆ reset_for_run()

void pineforge::source::PineExecutionAdapter::reset_for_run ( )

Definition at line 2577 of file pine_adapter.cpp.

References admission_journal, and cap.

◆ set_cache_policy_for_run()

◆ set_configuration()

void pineforge::source::PineExecutionAdapter::set_configuration ( const PineStrategyConfig & config)
noexcept

Definition at line 2774 of file pine_adapter.cpp.

◆ set_staged_configuration()

void pineforge::source::PineExecutionAdapter::set_staged_configuration ( const StagedConfiguration & staged)

◆ set_begin_mode()

void pineforge::source::PineExecutionAdapter::set_begin_mode ( bool is_stream,
bool bar_magnifier = false )
noexcept

Definition at line 2790 of file pine_adapter.cpp.

◆ set_id_tables_directory()

void pineforge::source::PineExecutionAdapter::set_id_tables_directory ( const std::string & directory)

◆ set_auxiliary_tables_directory()

void pineforge::source::PineExecutionAdapter::set_auxiliary_tables_directory ( const std::string & directory)

◆ fixture_use_memory_auxiliary_tables()

void pineforge::source::PineExecutionAdapter::fixture_use_memory_auxiliary_tables ( )

◆ fixture_cohort_implicit_spill_interval()

void pineforge::source::PineExecutionAdapter::fixture_cohort_implicit_spill_interval ( std::size_t calls)
inlinenoexcept

◆ fixture_spill_predicate()

void pineforge::source::PineExecutionAdapter::fixture_spill_predicate ( bool(* predicate )(const std::string &))
inlinenoexcept

Definition at line 1677 of file pine_adapter.hpp.

◆ fixture_verify_source_entry_slots()

void pineforge::source::PineExecutionAdapter::fixture_verify_source_entry_slots ( bool enabled)
inlinenoexcept

Definition at line 1680 of file pine_adapter.hpp.

◆ fixture_bracket_remove_precheck()

void pineforge::source::PineExecutionAdapter::fixture_bracket_remove_precheck ( bool enabled)
inlinenoexcept

Definition at line 1683 of file pine_adapter.hpp.

◆ fixture_auxiliary_disk_bytes()

std::uint64_t pineforge::source::PineExecutionAdapter::fixture_auxiliary_disk_bytes ( ) const
noexcept

Definition at line 29064 of file pine_adapter.cpp.

References fixture_auxiliary_disk_bytes().

Referenced by fixture_auxiliary_disk_bytes().

◆ fixture_erased_digest()

std::uint64_t pineforge::source::PineExecutionAdapter::fixture_erased_digest ( ) const
inlinenoexcept

Definition at line 1687 of file pine_adapter.hpp.

References fixture_erased_digest().

Referenced by fixture_erased_digest().

◆ fixture_erased_rows()

std::uint64_t pineforge::source::PineExecutionAdapter::fixture_erased_rows ( ) const
inlinenoexcept

Definition at line 1688 of file pine_adapter.hpp.

◆ fixture_consumed_partial_exit_cycles()

const ::pineforge::detail::IdPairStore< std::int64_t, true > & pineforge::source::PineExecutionAdapter::fixture_consumed_partial_exit_cycles ( ) const
inlinenoexcept

Definition at line 1690 of file pine_adapter.hpp.

◆ pending_scan_work()

const PendingScanWork & pineforge::source::PineExecutionAdapter::pending_scan_work ( ) const
inlinenoexcept

Definition at line 1704 of file pine_adapter.hpp.

◆ cohort_table_work()

const auto & pineforge::source::PineExecutionAdapter::cohort_table_work ( ) const
inlinenoexcept

Definition at line 1705 of file pine_adapter.hpp.

◆ cohort_heap_estimate()

◆ position_tail_work()

PineExecutionAdapter::PositionTailWork pineforge::source::PineExecutionAdapter::position_tail_work ( ) const
noexcept

Definition at line 28676 of file pine_adapter.cpp.

◆ project()

NativeRunSpec pineforge::source::PineExecutionAdapter::project ( const PineStrategyConfig & config,
const StagedConfiguration & staged,
const NativeBeginArgs & args,
NativePathOrder path_order = NativePathOrder::Auto,
std::vector< NativeInstrumentFeed > * instrument_feeds = nullptr ) const

Definition at line 2916 of file pine_adapter.cpp.

References pineforge::native_run_spec_v3::NativeRunSpec::abort_reporting, pineforge::native_run_spec_v3::NativeRunSpec::account_fx, pineforge::source::StagedConfiguration::account_fx, pineforge::native_run_spec_v3::NativeRunSpec::allowed_open_directions, pineforge::engine_script_run_v19::NativeBeginArgs::bar_magnifier, pineforge::engine_script_run_v19::NativeBeginArgs::bars, pineforge::native_run_spec_v3::NativeRunSpec::basecurrency, pineforge::SymInfo::basecurrency, pineforge::native_run_spec_v3::NativeMarginModel::basis, pineforge::source::PineStrategyConfig::calc_on_order_fills, pineforge::native_run_spec_v3::NativeRunSpec::calculation, pineforge::native_run_spec_v3::NativeRunSpec::chart_timezone, pineforge::source::StagedConfiguration::chart_timezone, pineforge::native_run_spec_v3::NativeMarginModel::check, pineforge::native_run_spec_v3::NativeRunSpec::close_execution, pineforge::source::PineStrategyConfig::commission_type, pineforge::source::PineStrategyConfig::commission_value, pineforge::native_run_spec_v3::IntrabarPath::ContinuousSegments, pineforge::native_run_spec_v3::NativeRunSpec::currency, pineforge::SymInfo::currency, pineforge::native_run_spec_v3::NativeRunSpec::description, pineforge::SymInfo::description, detail::exit_scratch, pineforge::detect_timeframe(), pineforge::ENDPOINTS, pineforge::engine_invariant, pineforge::native_run_spec_v3::NativeRunSpec::event_retention, pineforge::native_run_spec_v3::NativeRunSpec::fee_kind, pineforge::native_run_spec_v3::NativeRunSpec::fee_value, pineforge::native_run_spec_v3::NativeRunSpec::identity, pineforge::native_run_spec_v3::NativeRunSpec::initial_capital, pineforge::source::PineStrategyConfig::initial_capital, pineforge::native_run_spec_v3::NativeMarginModel::initial_long, pineforge::native_run_spec_v3::NativeMarginModel::initial_short, pineforge::engine_script_run_v19::NativeBeginArgs::input_tf, pineforge::native_run_spec_v3::NativeRunSpec::input_tf, pineforge::native_run_spec_v3::NativeRunSpec::instrument_feeds, pineforge::native_run_spec_v3::NativeRunSpec::intrabar, pineforge::engine_script_run_v19::NativeBeginArgs::is_stream, pineforge::source::kCoofLoopGuard, pineforge::native_run_spec_v3::NativeRunSpec::legacy_tolerance, pineforge::native_run_spec_v3::NativeMarginModel::level_base, pineforge::native_run_spec_v3::NativeMarginModel::liquidation_comment, pineforge::native_run_spec_v3::NativeMarginModel::liquidation_label, pineforge::engine_script_run_v19::NativeBeginArgs::magnifier_distribution, pineforge::engine_script_run_v19::NativeBeginArgs::magnifier_samples, pineforge::engine_script_run_v19::NativeBeginArgs::magnifier_volume_weighted, pineforge::engine_script_run_v19::NativeBeginArgs::magnifier_volume_weighted_min_samples, pineforge::native_run_spec_v3::NativeMarginModel::maintenance_long, pineforge::native_run_spec_v3::NativeMarginModel::maintenance_short, pineforge::source::make_magnifier_path_source(), pineforge::native_run_spec_v3::NativeRunSpec::margin, pineforge::source::PineStrategyConfig::margin_long, pineforge::source::PineStrategyConfig::margin_short, pineforge::native_run_spec_v3::NativeRunSpec::max_recalculations_per_point, pineforge::SymInfo::mintick, pineforge::engine_script_run_v19::NativeBeginArgs::n, pineforge::native_bar_views_v1::normalize_native_run_spec(), pineforge::native_run_spec_v3::NativeRunSpec::path_order, pineforge::PERCENT, pineforge::native_run_spec_v3::NativeRunSpec::point_value, pineforge::SymInfo::pointvalue, pineforge::native_run_spec_v3::NativeRunSpec::price_tick, pineforge::source::PineStrategyConfig::process_orders_on_close, pineforge::native_run_spec_v3::NativeRunSpec::quantity_grid, pineforge::source::StagedConfiguration::quantity_grid, pineforge::native_run_spec_v3::NativeRunSpec::report_policy, pineforge::source::run_spec_field_failure(), pineforge::engine_script_run_v19::NativeBeginArgs::script_tf, pineforge::native_run_spec_v3::NativeRunSpec::script_tf, pineforge::native_run_spec_v3::NativeRunSpec::session, pineforge::SymInfo::session, pineforge::source::PineStrategyConfig::slippage, pineforge::native_run_spec_v3::NativeRunSpec::slippage_ticks, pineforge::native_run_spec_v3::NativeRunSpec::slot_label_policy, pineforge::source::StagedConfiguration::syminfo, pineforge::tf_ratio(), pineforge::native_run_spec_v3::NativeRunSpec::ticker, pineforge::SymInfo::ticker, pineforge::native_run_spec_v3::NativeRunSpec::tickerid, pineforge::SymInfo::tickerid, pineforge::native_run_spec_v3::NativeRunSpec::timeframe_undetected, pineforge::native_run_spec_v3::NativeRunSpec::timezone, pineforge::SymInfo::timezone, pineforge::source::tradingview_magnifier_bars(), pineforge::native_run_spec_v3::NativeRunSpec::type, pineforge::SymInfo::type, pineforge::native_run_spec_v3::IntrabarPath::value, pineforge::native_run_spec_v3::NativeRunSpec::volumetype, and pineforge::SymInfo::volumetype.

◆ entry()

void pineforge::source::PineExecutionAdapter::entry ( const SourceId & id,
bool is_long,
double limit_price = std::numeric_limits<double>::quiet_NaN(),
double stop_price = std::numeric_limits<double>::quiet_NaN(),
double qty = std::numeric_limits<double>::quiet_NaN(),
const std::string & comment = {},
const std::string & oca_name = {},
int oca_type = 0,
int qty_type = -1 )

◆ close()

void pineforge::source::PineExecutionAdapter::close ( const SourceId & id,
const std::string & comment = {},
double qty = std::numeric_limits<double>::quiet_NaN(),
double qty_percent = std::numeric_limits<double>::quiet_NaN(),
bool immediately = false,
std::uint64_t callsite_token = 0 )

Definition at line 10083 of file pine_adapter.cpp.

References pineforge::source::detail::callback_point(), cap, pineforge::source::Close, close(), pineforge::source::CloseAll, pineforge::source::PlacementSnapshot::command_ordinal, pineforge::native_order::native_order_v8::Request::comment, pineforge::source::PlacementSnapshot::comment, pineforge::engine_script_run_v19::BrokerStateHashSink::d(), pineforge::source::PlacementSnapshot::deferred_cohort, pineforge::source::Entry, entry(), pineforge::source::PlacementSnapshot::family, pineforge::FIXED, fixture_close_logical_units(), flush_pending_entries(), pineforge::source::PlacementSnapshot::from_entry, pineforge::engine_script_run_v19::BrokerStateHashSink::h, pineforge::engine_script_run_v19::BrokerStateHashSink::i(), pineforge::native_order::native_order_v8::Request::intent, pineforge::source::PlacementSnapshot::is_long, pineforge::native_order::native_order_v8::Request::label, pineforge::LONG, pineforge::source::PlacementSnapshot::market_admission, pineforge::native_order::native_order_v8::Request::owner, pineforge::source::PlacementSnapshot::paired_reversal_parent, pineforge::PERCENT_OF_EQUITY, pineforge::source::PlacementSnapshot::qty_percent, pineforge::source::PlacementSnapshot::requested_qty, pineforge::source::detail::run_position(), pineforge::source::detail::run_state(), pineforge::engine_script_run_v19::NativePhysicalPosition::signed_units, pineforge::source::PlacementSnapshot::sizing, pineforge::source::PlacementSnapshot::source_id, and pineforge::native_order::native_order_v8::Request::trigger.

Referenced by close(), and close_all().

◆ close_all()

◆ exit()

void pineforge::source::PineExecutionAdapter::exit ( const SourceId & exit_id,
const SourceId & from_entry,
double limit_price,
double stop_price,
double trail_points = std::numeric_limits<double>::quiet_NaN(),
double trail_offset = std::numeric_limits<double>::quiet_NaN(),
double trail_price = std::numeric_limits<double>::quiet_NaN(),
double qty_percent = 100.0,
const std::string & comment = {},
double qty = std::numeric_limits<double>::quiet_NaN(),
const std::string & oca_name = {},
double profit_ticks = std::numeric_limits<double>::quiet_NaN(),
double loss_ticks = std::numeric_limits<double>::quiet_NaN() )

Definition at line 11527 of file pine_adapter.cpp.

References pineforge::source::detail::callback_point(), pineforge::source::PlacementSnapshot::command_sequence, pineforge::source::PlacementSnapshot::comment, pineforge::engine_invariant, pineforge::source::Entry, pineforge::source::detail::exit_binding_rule_switches(), exit_cancel_bracket(), pineforge::source::PlacementSnapshot::exit_levels, pineforge::source::value_field::exit_trail_points, pineforge::source::ExitLimit, pineforge::source::ExitStop, pineforge::source::ExitTrail, pineforge::source::PlacementSnapshot::family, pineforge::FIXED, fixture_close_logical_units(), pineforge::FLAT, pineforge::source::PlacementSnapshot::from_entry, pineforge::source::detail::margin_opening_switches(), pineforge::source::PlacementSnapshot::oca_name, pineforge::source::detail::ExitBindingRuleSwitches::pending_bound_exit_survives_flat, PINEFORGE_POSITION_TAIL_DIAGNOSTICS, pineforge::source::PlacementSnapshot::projection_position_side, pineforge::source::PlacementSnapshot::qty_percent, pineforge::source::detail::replay_position_tail(), pineforge::source::PlacementSnapshot::requested_qty, pineforge::source::detail::run_position(), pineforge::engine_script_run_v19::NativePhysicalPosition::signed_units, pineforge::source::PlacementSnapshot::sizing, pineforge::source::PlacementSnapshot::source_id, pineforge::source::PlacementSnapshot::source_sequence, and pineforge::source::detail::MarginOpeningSwitches::void_flat_global_exit.

Referenced by cancel(), hash_state(), on_applied(), on_bar_open(), and validate_precommit().

◆ exit_cancel_bracket()

void pineforge::source::PineExecutionAdapter::exit_cancel_bracket ( const SourceId & exit_id,
const SourceId & from_entry,
const std::string & comment = {} )

Definition at line 15032 of file pine_adapter.cpp.

Referenced by exit().

◆ cancel()

void pineforge::source::PineExecutionAdapter::cancel ( const SourceId & id)

◆ cancel_all()

void pineforge::source::PineExecutionAdapter::cancel_all ( )

Definition at line 15160 of file pine_adapter.cpp.

References pineforge::source::detail::callback_point().

◆ order()

void pineforge::source::PineExecutionAdapter::order ( const SourceId & id,
bool is_long,
double qty,
double limit_price = std::numeric_limits<double>::quiet_NaN(),
double stop_price = std::numeric_limits<double>::quiet_NaN(),
const std::string & oca_name = {},
int oca_type = 0 )

◆ resolve_terms()

native_order::ExecutionTerms pineforge::source::PineExecutionAdapter::resolve_terms ( const NativeExecutionTermsFacts & facts) const

Definition at line 15428 of file pine_adapter.cpp.

References PF_RARE.

◆ anchor_relative_exits()

◆ resolve_anchored_level()

std::optional< double > pineforge::source::PineExecutionAdapter::resolve_anchored_level ( const NativeAnchoredLevelView & view) const

◆ anchored_relative_stats()

const AnchoredRelativeStats & pineforge::source::PineExecutionAdapter::anchored_relative_stats ( ) const
inlinenoexcept

Definition at line 1795 of file pine_adapter.hpp.

◆ core_sizes_default_opening()

bool pineforge::source::PineExecutionAdapter::core_sizes_default_opening ( bool is_long) const

◆ preflight_id_pair_precommit()

◆ validate_precommit()

NativePrecommitVerdict pineforge::source::PineExecutionAdapter::validate_precommit ( const NativePrecommitView & view) const

Definition at line 16988 of file pine_adapter.cpp.

References pineforge::engine_script_run_v19::NativePrecommitView::account, cap, pineforge::CASH, pineforge::source::Close, pineforge::source::detail::MarginRuleSwitches::close_first_admission, pineforge::source::CloseAll, pineforge::engine_script_run_v19::NativePrecommitView::cursor, pineforge::engine_script_run_v19::NativePrecommitView::definition, pineforge::native_driver_v5::NativeCoordinate::effective_time_ms, pineforge::source::Entry, exit(), pineforge::source::ExitLimit, pineforge::source::ExitStop, pineforge::source::ExitTrail, pineforge::FIXED, pineforge::FLAT, pineforge::native_order::native_order_v1::RequestHandle::incarnation, pineforge::execution::settlement_projection_v1::AccountEffectProjection::incoming_short, pineforge::engine_script_run_v19::NativePrecommitView::inspected_closed_units, pineforge::engine_script_run_v19::NativePrecommitView::inspected_opened_units, pineforge::native_driver_v5::NativeCoordinate::interval_index, pineforge::LONG, pineforge::source::detail::margin_opening_switches(), pineforge::source::detail::margin_rule_switches(), pineforge::source::detail::margin_schedule_switches(), pineforge::execution::settlement_projection_v1::AccountEffectProjection::marked_equity, pineforge::source::Order, pineforge::native_driver_v5::NativeCoordinate::path_phase, pineforge::PERCENT, pineforge::PERCENT_OF_EQUITY, PF_RARE, pineforge::native_order::native_order_v8::MatchCursor::point, preflight_id_pair_precommit(), projection_bar_index(), pineforge::engine_script_run_v19::NativePrecommitView::raw_price, pineforge::execution::settlement_projection_v1::AccountEffectProjection::realized_balance, pineforge::engine_script_run_v19::NativePrecommitView::resolved_price, pineforge::execution::settlement_projection_v1::AccountEffectProjection::resulting_abs_notional, pineforge::source::detail::run_position(), pineforge::source::detail::run_state(), pineforge::SHORT, pineforge::engine_script_run_v19::NativePhysicalPosition::signed_units, pineforge::engine_script_run_v19::NativePrecommitView::target, and pineforge::execution::settlement_projection_v1::AccountEffectProjection::would_open.

◆ source_margin_money()

◆ source_margin_units()

◆ lagged_margin_follow_up_units()

◆ source_margin_fill_price()

double pineforge::source::PineExecutionAdapter::source_margin_fill_price ( double fire,
bool close_is_buy ) const

Definition at line 18391 of file pine_adapter.cpp.

Referenced by on_bar_open().

◆ source_margin_rounded_tie_veto()

bool pineforge::source::PineExecutionAdapter::source_margin_rounded_tie_veto ( ) const

◆ margin_check_allowed()

◆ intrabar_sample_checked()

◆ resolve_margin_requirement()

◆ resolve_margin_call_units()

◆ on_bar_open()

void pineforge::source::PineExecutionAdapter::on_bar_open ( const Bar & bar,
const NativeDecisionContext & context )

Definition at line 22874 of file pine_adapter.cpp.

References cap, chart_day_key(), pineforge::source::Close, pineforge::Bar::close, pineforge::source::PlacementSnapshot::close_first_entry, pineforge::source::CloseAll, pineforge::native_driver_v5::NativeDecisionContext::coordinate, pineforge::native_driver_v5::NativeDecisionContext::driver_statistics, pineforge::source::Entry, exit(), pineforge::source::detail::exit_binding_rule_switches(), pineforge::source::PlacementSnapshot::exit_levels, pineforge::source::ExitLimit, pineforge::source::ExitStop, pineforge::source::ExitTrail, pineforge::source::PlacementSnapshot::family, pineforge::Bar::high, pineforge::native_driver_v5::NativeCoordinate::interval_index, pineforge::native_driver_v5::NativeDriverStatistics::intrabar_path_enabled, pineforge::source::PlacementSnapshot::is_long, pineforge::native_order::native_order_v8::ReplaceOptions::keep_handle, lagged_margin_follow_up_units(), pineforge::source::PineExitLevels::limit, pineforge::Bar::low, pineforge::source::detail::margin_opening_switches(), pineforge::source::detail::margin_rule_switches(), pineforge::source::detail::margin_schedule_switches(), observe_terminal_receipts(), pineforge::Bar::open, pineforge::source::PlacementSnapshot::opening, pineforge::source::Order, pineforge::PERCENT_OF_EQUITY, PF_RARE, pineforge::source::detail::MarginRuleSwitches::point_fills_before_margin, pineforge::source::detail::MarginRuleSwitches::point_order_trailing_exits, priority, projection_bar_index(), pineforge::source::PlacementSnapshot::projection_created_bar, release_delayed_orders(), pineforge::source::PlacementSnapshot::reverse_to, pineforge::source::detail::run_position(), pineforge::native_driver_v5::NativeDecisionContext::script_bar_open_ms, pineforge::engine_script_run_v19::NativePhysicalPosition::signed_units, pineforge::source::detail::skip_quiet(), source_batch_end(), source_margin_fill_price(), source_margin_money(), source_margin_rounded_tie_veto(), source_margin_units(), pineforge::source::PineExitLevels::stop, pineforge::native_driver_v5::NativeDecisionContext::sub_bar_open_ms, pineforge::native_driver_v5::NativeDecisionContext::sub_index, pineforge::Bar::timestamp, pineforge::source::PineExitLevels::trail_offset, and pineforge::native_order::native_order_v8::Request::trigger.

◆ on_tick()

void pineforge::source::PineExecutionAdapter::on_tick ( const Bar & tick,
const NativeTickContext & context )

◆ on_bar_close_before_script()

void pineforge::source::PineExecutionAdapter::on_bar_close_before_script ( const Bar & bar,
const NativeDecisionContext & context )

◆ on_bar_close()

void pineforge::source::PineExecutionAdapter::on_bar_close ( const Bar & bar,
const NativeDecisionContext & context )

◆ on_applied()

void pineforge::source::PineExecutionAdapter::on_applied ( const native_order::ExecutionAppliedEvent & event,
const NativeDecisionContext & context )

Definition at line 25053 of file pine_adapter.cpp.

References pineforge::source::detail::ExitScratchIndex::absent, bind(), pineforge::source::PlacementSnapshot::bracket_origin, pineforge::detail::clear_exposure_storage(), pineforge::source::Close, pineforge::source::CloseAll, pineforge::native_order::native_order_v8::ExecutionAppliedEvent::closed_trade_count, pineforge::native_order::native_order_v8::ExecutionAppliedEvent::closed_units, pineforge::source::PlacementSnapshot::comment, pineforge::source::detail::ExitScratchRows< T, Mode >::context(), pineforge::native_driver_v5::NativeDecisionContext::coordinate, pineforge::native_order::native_order_v8::ExecutionAppliedEvent::definition, pineforge::source::Dependency, pineforge::source::detail::ExitScratchIndex::each(), pineforge::source::Entry, entry(), exit(), pineforge::source::detail::exit_binding_rule_switches(), pineforge::source::PlacementSnapshot::exit_levels, pineforge::source::detail::exit_scratch_versions(), pineforge::source::ExitLimit, pineforge::source::ExitStop, pineforge::source::ExitTrail, pineforge::source::PlacementSnapshot::family, pineforge::source::detail::ExitScratchIndex::find(), pineforge::source::detail::ExitScratchRows< T, Mode >::finish(), pineforge::FLAT, flush_pending_bracket_legs(), pineforge::source::PlacementSnapshot::forced_execution_price, pineforge::source::PlacementSnapshot::from_entry, pineforge::native_order::native_order_v8::ExecutionAppliedEvent::handle(), pineforge::native_order::native_order_v1::RequestHandle::incarnation, pineforge::native_driver_v5::NativeCoordinate::interval_index, pineforge::source::PineExitLevels::limit, pineforge::LONG, pineforge::source::Margin, pineforge::source::detail::margin_rule_switches(), pineforge::source::detail::margin_schedule_switches(), pineforge::source::PlacementSnapshot::oca_name, pineforge::native_order::native_order_v8::ExecutionAppliedEvent::opened_units, pineforge::source::Order, order(), pineforge::source::detail::ExitScratchRows< T, Mode >::ordered(), pineforge::native_order::native_order_v8::ExecutionAppliedEvent::ordinal, pineforge::native_driver_v5::NativeCoordinate::path_phase, pineforge::PERCENT, pineforge::PERCENT_OF_EQUITY, PF_RARE, PINEFORGE_POSITION_TAIL_DIAGNOSTICS, PineStrategyHost, projection_bar_index(), pineforge::native_driver_v5::NativeCoordinate::provenance, pineforge::source::detail::ExitScratchRows< T, Mode >::push_back(), pineforge::source::detail::ExitScratchIndex::put(), pineforge::native_order::native_order_v8::ExecutionAppliedEvent::raw_price, pineforge::source::PlacementSnapshot::requested_qty, pineforge::native_order::native_order_v8::ExecutionAppliedEvent::resolved_price, pineforge::source::detail::ExitBindingRuleSwitches::resting_stop_entry_survives_close, pineforge::source::detail::run_position(), pineforge::source::detail::run_state(), pineforge::source::detail::ExitScratchRows< T, Mode >::scope(), pineforge::native_driver_v5::NativeDecisionContext::script_bar_open_ms, pineforge::source::detail::ExitScratchRows< T, Mode >::set(), pineforge::SHORT, pineforge::engine_script_run_v19::NativePhysicalPosition::signed_units, pineforge::source::detail::ExitScratchRows< T, Mode >::size(), pineforge::source::PlacementSnapshot::sizing, pineforge::source::PlacementSnapshot::source_id, pineforge::source::PineExitLevels::stop, pineforge::native_driver_v5::NativeDecisionContext::sub_count, and pineforge::native_driver_v5::NativeDecisionContext::sub_index.

◆ source_batch_end()

void pineforge::source::PineExecutionAdapter::source_batch_end ( )

Definition at line 21772 of file pine_adapter.cpp.

References cap.

Referenced by on_bar_open().

◆ chart_day_key()

std::int64_t pineforge::source::PineExecutionAdapter::chart_day_key ( std::int64_t timestamp_ms) const
noexcept

Definition at line 17999 of file pine_adapter.cpp.

Referenced by on_bar_open().

◆ short_seed_collision_role_v1()

int pineforge::source::PineExecutionAdapter::short_seed_collision_role_v1 ( native_order::RequestHandle handle) const
noexcept

Definition at line 27060 of file pine_adapter.cpp.

◆ pending_intent_view()

const PendingIntentView & pineforge::source::PineExecutionAdapter::pending_intent_view ( ) const
inlinenoexcept

Definition at line 1869 of file pine_adapter.hpp.

References PendingIntentView.

◆ fixture_pending_snapshots()

std::vector< PineExecutionAdapter::FixturePendingSnapshot > pineforge::source::PineExecutionAdapter::fixture_pending_snapshots ( ) const

Definition at line 27081 of file pine_adapter.cpp.

◆ source_unclosed_qty_for()

double pineforge::source::PineExecutionAdapter::source_unclosed_qty_for ( const SourceId & id) const
inlinenoexcept

Definition at line 1884 of file pine_adapter.hpp.

◆ source_entry_slot_count()

int pineforge::source::PineExecutionAdapter::source_entry_slot_count ( ) const
noexcept

Definition at line 5411 of file pine_adapter.cpp.

◆ fixture_close_logical_units()

double pineforge::source::PineExecutionAdapter::fixture_close_logical_units ( const SourceId & id) const
noexcept

Definition at line 27145 of file pine_adapter.cpp.

Referenced by close(), and exit().

◆ fixture_close_logical_count()

std::size_t pineforge::source::PineExecutionAdapter::fixture_close_logical_count ( ) const
inlinenoexcept

Definition at line 1889 of file pine_adapter.hpp.

References fixture_close_logical_count().

Referenced by fixture_close_logical_count().

◆ fixture_close_pending_debt()

double pineforge::source::PineExecutionAdapter::fixture_close_pending_debt ( ) const
inlinenoexcept

Definition at line 1892 of file pine_adapter.hpp.

◆ fixture_close_admitted_total()

double pineforge::source::PineExecutionAdapter::fixture_close_admitted_total ( ) const
inlinenoexcept

Definition at line 1895 of file pine_adapter.hpp.

◆ fixture_close_callsites()

std::vector< PineExecutionAdapter::FixtureCloseCallsite > pineforge::source::PineExecutionAdapter::fixture_close_callsites ( ) const

Definition at line 27152 of file pine_adapter.cpp.

◆ set_risk_direction()

void pineforge::source::PineExecutionAdapter::set_risk_direction ( int direction)
noexcept

Definition at line 27195 of file pine_adapter.cpp.

◆ set_risk_max_cons_loss_days()

void pineforge::source::PineExecutionAdapter::set_risk_max_cons_loss_days ( int value)
noexcept

Definition at line 27196 of file pine_adapter.cpp.

◆ set_risk_max_drawdown()

void pineforge::source::PineExecutionAdapter::set_risk_max_drawdown ( double value,
bool percent )
noexcept

Definition at line 27197 of file pine_adapter.cpp.

◆ set_risk_max_intraday_loss()

void pineforge::source::PineExecutionAdapter::set_risk_max_intraday_loss ( double value,
bool percent )
noexcept

Definition at line 27201 of file pine_adapter.cpp.

◆ set_risk_max_position_size()

void pineforge::source::PineExecutionAdapter::set_risk_max_position_size ( double value)
noexcept

Definition at line 27205 of file pine_adapter.cpp.

◆ capture_replay_risk_config()

PineReplayRiskConfig pineforge::source::PineExecutionAdapter::capture_replay_risk_config ( ) const
noexcept

Definition at line 27206 of file pine_adapter.cpp.

References cap.

◆ restore_replay_risk_config()

void pineforge::source::PineExecutionAdapter::restore_replay_risk_config ( const PineReplayRiskConfig & snapshot)
noexcept

Definition at line 27220 of file pine_adapter.cpp.

References cap.

◆ allows_risk_direction()

bool pineforge::source::PineExecutionAdapter::allows_risk_direction ( bool is_long) const
inlinenoexcept

Definition at line 1912 of file pine_adapter.hpp.

References allows_risk_direction().

Referenced by allows_risk_direction().

◆ max_drawdown_is_percent()

bool pineforge::source::PineExecutionAdapter::max_drawdown_is_percent ( ) const
inlinenoexcept

Definition at line 1915 of file pine_adapter.hpp.

◆ max_intraday_loss_is_percent()

bool pineforge::source::PineExecutionAdapter::max_intraday_loss_is_percent ( ) const
inlinenoexcept

Definition at line 1916 of file pine_adapter.hpp.

◆ take_intraday_loss_relabel()

bool pineforge::source::PineExecutionAdapter::take_intraday_loss_relabel ( std::uint64_t ordinal)
noexcept

Definition at line 27071 of file pine_adapter.cpp.

References PINEFORGE_POSITION_TAIL_DIAGNOSTICS, and Relabel.

◆ set_margin_call_enabled()

void pineforge::source::PineExecutionAdapter::set_margin_call_enabled ( bool enabled)
noexcept

Definition at line 27232 of file pine_adapter.cpp.

◆ mark_market_pyramid_add()

void pineforge::source::PineExecutionAdapter::mark_market_pyramid_add ( std::uint64_t incarnation)

Definition at line 27235 of file pine_adapter.cpp.

◆ market_pyramid_add()

bool pineforge::source::PineExecutionAdapter::market_pyramid_add ( std::uint64_t incarnation) const
inlinenoexcept

Definition at line 1931 of file pine_adapter.hpp.

◆ enable_intraday_cap()

void pineforge::source::PineExecutionAdapter::enable_intraday_cap ( )
noexcept

Definition at line 27238 of file pine_adapter.cpp.

References cap.

◆ attach_execution_adapter()

void pineforge::source::PineExecutionAdapter::attach_execution_adapter ( )
noexcept

Definition at line 27239 of file pine_adapter.cpp.

References priority.

◆ calc_on_order_fills()

bool pineforge::source::PineExecutionAdapter::calc_on_order_fills ( ) const
inlinenoexcept

Definition at line 1936 of file pine_adapter.hpp.

References calc_on_order_fills().

Referenced by calc_on_order_fills().

◆ process_orders_on_close()

bool pineforge::source::PineExecutionAdapter::process_orders_on_close ( ) const
inlinenoexcept

Definition at line 1937 of file pine_adapter.hpp.

◆ fixture_coof_recalc_active()

bool pineforge::source::PineExecutionAdapter::fixture_coof_recalc_active ( ) const
inlinenoexcept

Definition at line 1940 of file pine_adapter.hpp.

◆ fixture_coof_cursor_is_bar_close()

bool pineforge::source::PineExecutionAdapter::fixture_coof_cursor_is_bar_close ( ) const
inlinenoexcept

Definition at line 1941 of file pine_adapter.hpp.

◆ fixture_mutable_cancellation()

PineCancellationReceipt * pineforge::source::PineExecutionAdapter::fixture_mutable_cancellation ( int index)
noexcept

Definition at line 27164 of file pine_adapter.cpp.

◆ fixture_remove_entry_without_named_cancel()

void pineforge::source::PineExecutionAdapter::fixture_remove_entry_without_named_cancel ( const SourceId & id)

Definition at line 27171 of file pine_adapter.cpp.

References pineforge::source::Entry.

◆ begin_source_evaluation()

void pineforge::source::PineExecutionAdapter::begin_source_evaluation ( )
inlinenoexcept

Definition at line 1946 of file pine_adapter.hpp.

◆ fixture_named_entry_cancel_active()

bool pineforge::source::PineExecutionAdapter::fixture_named_entry_cancel_active ( const SourceId & id) const
inlinenoexcept

Definition at line 1951 of file pine_adapter.hpp.

◆ take_first_open_newborns()

std::vector< native_order::RequestHandle > pineforge::source::PineExecutionAdapter::take_first_open_newborns ( )

Definition at line 27241 of file pine_adapter.cpp.

◆ observe_terminal_receipts()

◆ flush_pending_bracket_legs()

void pineforge::source::PineExecutionAdapter::flush_pending_bracket_legs ( native_order::RequestHandle just_applied = {},
bool post_calculation = true,
bool pre_script_drain = false )

Definition at line 13308 of file pine_adapter.cpp.

References pineforge::engine_script_run_v19::NativePhysicalPosition::average_price, pineforge::source::PlacementSnapshot::birth, pineforge::source::PlacementSnapshot::bracket_origin, pineforge::source::detail::callback_point(), pineforge::source::PlacementSnapshot::command_sequence, pineforge::source::PlacementSnapshot::defer_until_post_parent_calculation, pineforge::source::PlacementSnapshot::deferred_cohort, pineforge::source::Entry, entry(), pineforge::source::detail::exit_binding_rule_switches(), pineforge::source::PlacementSnapshot::exit_levels, pineforge::source::ExitLimit, pineforge::source::ExitStop, pineforge::source::ExitTrail, pineforge::source::PlacementSnapshot::family, pineforge::FLAT, pineforge::source::PlacementSnapshot::forced_execution_price, pineforge::source::PlacementSnapshot::from_entry, pineforge::OrderBirth::from_fill(), pineforge::source::PlacementSnapshot::immediately, pineforge::native_order::native_order_v1::RequestHandle::incarnation, pineforge::source::PlacementSnapshot::is_long, pineforge::source::PineExitLevels::limit, pineforge::source::PineExitLevels::loss_ticks, pineforge::source::PlacementSnapshot::named_cancel_surviving_exit_incarnation, pineforge::source::PlacementSnapshot::oca_name, pineforge::source::PlacementSnapshot::oca_type, pineforge::source::PlacementSnapshot::opening, pineforge::source::PlacementSnapshot::placement_script_open_ms, priority, pineforge::source::PineExitLevels::profit_ticks, pineforge::source::PlacementSnapshot::projection_after_close, pineforge::source::PlacementSnapshot::projection_created_bar, pineforge::source::PlacementSnapshot::projection_created_bar_pinned, pineforge::source::PlacementSnapshot::projection_over_pyramiding, pineforge::source::PlacementSnapshot::projection_position_side, pineforge::source::PlacementSnapshot::projection_predecessor, pineforge::source::PlacementSnapshot::qty_percent, pineforge::source::PlacementSnapshot::recreated_after_named_cancelled_entry_incarnation, pineforge::source::PlacementSnapshot::requested_qty, pineforge::source::PlacementSnapshot::reservation_deferred_to_pending_entry, pineforge::source::PlacementSnapshot::retained_parent_topology, pineforge::source::detail::run_position(), pineforge::source::detail::script_rule_switches(), pineforge::engine_script_run_v19::NativePhysicalPosition::signed_units, pineforge::source::PlacementSnapshot::source_id, pineforge::source::PlacementSnapshot::source_sequence, pineforge::source::PineExitLevels::stop, pineforge::source::PlacementSnapshot::stop_limit_activated, pineforge::source::PineExitLevels::trail_offset, pineforge::source::PineExitLevels::trail_points, pineforge::source::PineExitLevels::trail_price, and pineforge::source::PlacementSnapshot::void_issue.

Referenced by on_applied().

◆ flush_pending_entries()

void pineforge::source::PineExecutionAdapter::flush_pending_entries ( )

◆ flush_pending_closes()

void pineforge::source::PineExecutionAdapter::flush_pending_closes ( )

◆ release_delayed_orders()

void pineforge::source::PineExecutionAdapter::release_delayed_orders ( bool explicit_brackets_only = false,
double current_open = std::numeric_limits<double>::quiet_NaN() )

◆ begin_coof_recalc()

◆ end_coof_recalc()

void pineforge::source::PineExecutionAdapter::end_coof_recalc ( )
noexcept

Definition at line 7178 of file pine_adapter.cpp.

◆ suppress_grouped_stop_recalc()

◆ immediate_calculation_close()

bool pineforge::source::PineExecutionAdapter::immediate_calculation_close ( const native_order::ExecutionAppliedEvent & event,
const NativeDecisionContext & context ) const
noexcept

Definition at line 7270 of file pine_adapter.cpp.

References pineforge::source::Close, and pineforge::source::CloseAll.

◆ command_sequence_for_exit()

std::uint64_t pineforge::source::PineExecutionAdapter::command_sequence_for_exit ( const SourceId & exit_id,
const SourceId & from_entry = {} ) const

Definition at line 6693 of file pine_adapter.cpp.

◆ is_open_phase_exit()

bool pineforge::source::PineExecutionAdapter::is_open_phase_exit ( std::size_t trade_index) const

Definition at line 6710 of file pine_adapter.cpp.

References exit_phase_value().

◆ exit_phase_value()

std::uint8_t pineforge::source::PineExecutionAdapter::exit_phase_value ( std::size_t trade_index) const

◆ exit_phase_prefix()

std::pair< std::size_t, std::uint64_t > pineforge::source::PineExecutionAdapter::exit_phase_prefix ( ) const
inlinenoexcept

Definition at line 1991 of file pine_adapter.hpp.

◆ resident_exit_phases()

std::size_t pineforge::source::PineExecutionAdapter::resident_exit_phases ( ) const
inlinenoexcept

Definition at line 1994 of file pine_adapter.hpp.

◆ permute_exit_phases()

void pineforge::source::PineExecutionAdapter::permute_exit_phases ( std::size_t start,
const std::vector< std::size_t > & indices )

Definition at line 6714 of file pine_adapter.cpp.

References permute_exit_phase_rows().

◆ permute_exit_phase_rows()

void pineforge::source::PineExecutionAdapter::permute_exit_phase_rows ( std::size_t start,
std::size_t count,
const std::function< std::size_t(std::size_t)> & source_at )

◆ exit_group_work()

PineExecutionAdapter::ExitGroupWork pineforge::source::PineExecutionAdapter::exit_group_work ( ) const
noexcept

Definition at line 29949 of file pine_adapter.cpp.

References exit_group_work().

Referenced by exit_group_work().

◆ global_exit_child_ranks()

std::optional< std::vector< std::uint32_t > > pineforge::source::PineExecutionAdapter::global_exit_child_ranks ( const std::vector< SourceId > & ids) const

Definition at line 6801 of file pine_adapter.cpp.

◆ other_exit_reaches()

bool pineforge::source::PineExecutionAdapter::other_exit_reaches ( double price,
bool closing_long,
const SourceId & exit_id,
const native_order::RequestHandle & filled ) const

◆ hash_state()

◆ fold_dropped_close()

◆ fold_exit_phase()

std::uint64_t pineforge::source::PineExecutionAdapter::fold_exit_phase ( std::uint64_t digest,
std::uint8_t phase )
staticnoexcept

◆ retirement_work()

const RetirementWork & pineforge::source::PineExecutionAdapter::retirement_work ( ) const
inlinenoexcept

Definition at line 3306 of file pine_adapter.hpp.

◆ retirement_population()

Field Documentation

◆ cap

◆ priority

compat::pine::OrderPriority pineforge::source::PineExecutionAdapter::priority

◆ admission_journal

MarketAdmissionJournal pineforge::source::PineExecutionAdapter::admission_journal

Definition at line 2024 of file pine_adapter.hpp.

Referenced by hash_state(), and reset_for_run().


The documentation for this class was generated from the following files: