|
PineForge v0.13.1-379-g9b50973
Deterministic PineScript v6 backtest runtime — C ABI reference
|
#include <pine_strategy_host.hpp>
Data Structures | |
| class | FixtureCommissionTypeSlot |
| struct | FixtureIntentRow |
| class | FixtureQtyTypeSlot |
| class | FixtureRiskDirectionSlot |
| class | SourceCloseObligationView |
| class | SourceIdLedgerView |
Public Types | |
| enum class | FixtureIntentKind { MARKET , EXIT , ENTRY , RAW_ORDER } |
Public Member Functions | |
| PineStrategyHost (compat::pine::CapAttachment cap=compat::pine::CapAttachment::None) | |
| std::uint64_t | broker_state_hash_projection () const override |
| void | prepare_native_begin (const NativeBeginArgs &) final |
| void | on_native_run_begin () final |
| void | on_native_input (const Bar &, const NativeInputContext &) final |
| void | on_native_tick (const Bar &, const NativeTickContext &) final |
| void | on_native_bar_open (const Bar &, const NativeDecisionContext &) final |
| void | on_native_bar (const Bar &, const NativeDecisionContext &) final |
| void | on_native_recalculate (const Bar &, const NativeDecisionContext &, NativeCalculationReason, const native_order::ExecutionAppliedEvent *) final |
| void | on_native_applied (const native_order::ExecutionAppliedEvent &, const NativeDecisionContext &) final |
| native_order::ExecutionTerms | resolve_execution_terms (const NativeExecutionTermsFacts &) const final |
| NativePrecommitVerdict | validate_execution_precommit (const NativePrecommitView &) const final |
| bool | margin_check_allowed (const NativeMarginCheckPoint &) const final |
| std::optional< NativeMarginDecision > | resolve_margin_requirement (const NativeMarginRequirementView &) const final |
| std::optional< double > | resolve_margin_call_units (const NativeMarginCallView &) const final |
| std::optional< double > | resolve_anchored_level (const NativeAnchoredLevelView &) const final |
| bool | owns_lot_excursions () const noexcept final |
| ClosedLotExcursion | closed_lot_excursion (const ClosedLotExcursionFacts &) const final |
| bool | adapter_core_sizes_default_opening (bool is_long) const |
| virtual void | on_source_bar (const Bar &)=0 |
| void | configure_pine_strategy (const PineStrategyConfig &) |
| void | set_strategy_override (const StrategyOverrides &) |
| void | set_syminfo_session (const std::string &) |
| void | set_pine_risk_direction (int) |
| void | set_pine_risk_max_cons_loss_days (int) |
| void | set_pine_risk_max_drawdown (double, bool) |
| void | set_pine_risk_max_intraday_loss (double, bool) |
| void | set_pine_risk_max_intraday_filled_orders (int) |
| void | set_pine_risk_max_position_size (double) |
| void | strategy_entry (const std::string &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 | strategy_close (const std::string &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) |
| void | strategy_close (const std::string &id, const std::string &comment, double qty, double qty_percent, bool immediately, std::uint64_t callsite_token) |
| void | strategy_close_all () |
| void | strategy_exit (const std::string &id, const std::string &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 | strategy_exit_cancel_bracket (const std::string &exit_id, const std::string &from_entry, const std::string &comment={}) |
| void | strategy_cancel (const std::string &id) |
| void | strategy_cancel_all () |
| void | strategy_order (const std::string &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) |
| int | pine_bar_index () const |
| int | pine_last_bar_index () const |
| double | prev_chart_close () const |
| bool | is_first_tick () const noexcept |
| bool | is_last_tick () const noexcept |
| bool | history_advances_new_bar () const noexcept |
| bool | security_series_slot_is_new (int) const noexcept |
| int | last_bar_dual_entry_path () const |
| double | live_position_size () const override |
| int | pending_order_count () const |
| MarketAdmissionJournal & | market_admission_journal () |
| const MarketAdmissionJournal & | market_admission_journal () const |
| std::vector< admission::Field > | market_admission_fields () const |
| int | probe_fill_qty (int index, double fill_price, double *qty, int *close_only, int *partition) const |
| int | pending_order_level_resolved (int index) const |
| int | pending_order_effective_levels (int index, double *stop, double *limit, double *trail_activation) const |
| const PendingIntentView & | pending_intent_view () const noexcept |
| int | short_seed_collision_role_v1 (native_order::RequestHandle) const noexcept |
| void | enable_pine_intraday_cap () |
| void | attach_pine_execution_adapter () |
| void | set_syminfo_metadata (const std::string &, double) override |
| bool | set_aux_security_feed (const Bar *bars, int n, const std::string &input_tf) override |
| bool | source_aux_security_feed_enabled () const override |
| void | source_aux_security_input_view (const Bar *&, int &) const override |
| int | observe_last_bar_dual_entry_path_v1 () const override |
| int | observe_pending_count_v1 () const override |
| int | observe_pending_copy_v1 (int, pf_pending_order_v1_t *) const override |
| int | observe_probe_fill_qty (int, double, double *, int *, int *) const override |
| int | observe_pending_level_resolved (int) const override |
| int | observe_pending_effective_levels (int, double *, double *, double *) const override |
| double | observe_trail_best_price_v1 () const override |
| void | set_margin_call_enabled (bool enabled) |
| bool | margin_call_enabled () const |
| bool | set_realtime_tail (bool on, int horizon_bars) override |
| bool | realtime_tail () const |
| bool | set_probe_suppress_tail_logic (bool on) override |
| bool | probe_suppress_tail_logic () const |
Protected Member Functions | |
| PineStrategyConfig & | fixture_configuration () noexcept |
| const PineStrategyConfig & | fixture_configuration () const noexcept |
| bool | fixture_intraday_cap_latched () |
| compat::pine::CapClock | fixture_cap_clock () const |
| compat::pine::Calculation | fixture_cap_calculation () const |
| BarTime | fixture_chart_time (std::int64_t timestamp_ms) const |
| std::int64_t | fixture_chart_day_key (std::int64_t timestamp_ms) const noexcept |
| std::uint64_t | fixture_applied_receipt_count () const |
| bool | fixture_cap_due_pending () const noexcept |
| FixtureQtyTypeSlot | fixture_default_qty_type_slot () noexcept |
| FixtureCommissionTypeSlot | fixture_commission_type_slot () noexcept |
| FixtureRiskDirectionSlot | fixture_risk_direction_slot () noexcept |
| SourceIdLedgerView | source_id_ledger_view () const noexcept |
| double | signed_position_size () const |
| void | freeze_script_position_view () |
| void | clear_script_position_view () |
| const Series< double > & | source_series (const std::string &) const |
| const Series< double > & | source_input_series (const std::string &key, const Series< double > &fallback) const |
| const Series< double > & | get_input_source (const std::string &key, const Series< double > &fallback) const |
| double | margin_liquidation_price () const |
| void | fixture_publish_source_series (const Bar &bar, bool new_history_slot) |
| int64_t | time_close () const |
| bool | pine_session_ismarket (const std::string &session, const std::string &timezone, std::int64_t bar_ms) const |
| bool | pine_session_ispremarket (const std::string &session, const std::string &timezone, std::int64_t bar_ms) const |
| bool | pine_session_ispostmarket (const std::string &session, const std::string &timezone, std::int64_t bar_ms) const |
| const std::vector< FixtureIntentRow > & | source_pending_view () const |
| void | register_security_eval (int sec_id, const std::string &requested_tf, const std::string &input_tf, bool lookahead_on, bool gaps_on=false, bool heikinashi=false) |
| void | register_security_lower_tf_eval (int sec_id, const std::string &requested_tf, const std::string &input_tf) |
| int | security_lower_tf_sub_bar_index (int sec_id) const |
| void | validate_security_timeframes (const std::string &input_tf) |
| void | source_stream_entry_comment (const PyramidEntry &, std::string &) const override |
| void | hash_host_extension (BrokerStateHashSink &) const override |
| void | hash_source_extension (BrokerStateHashSink &sink) const final |
| void | apply_realtime_tail_horizon (const Bar *bars, int n, bool script_bar_geometry) |
Definition at line 241 of file pine_strategy_host.hpp.
|
strong |
| Enumerator | |
|---|---|
| MARKET | |
| EXIT | |
| ENTRY | |
| RAW_ORDER | |
Definition at line 381 of file pine_strategy_host.hpp.
|
explicit |
Definition at line 127 of file pine_strategy_host.cpp.
References _src_close_, _src_high_, _src_hl2_, _src_hlc3_, _src_hlcc4_, _src_low_, _src_ohlc4_, _src_open_, _src_series_active_, _src_volume_, adapter_, is_last_tick_, and scheduler_.
Referenced by pineforge::source::PineStrategyHost::FixtureCommissionTypeSlot::FixtureCommissionTypeSlot(), pineforge::source::PineStrategyHost::FixtureQtyTypeSlot::FixtureQtyTypeSlot(), and pineforge::source::PineStrategyHost::FixtureRiskDirectionSlot::FixtureRiskDirectionSlot().
|
override |
Definition at line 159 of file pine_strategy_host.cpp.
|
final |
Definition at line 228 of file pine_strategy_host.cpp.
References pineforge::source::StagedConfiguration::account_fx_effective_from_ms, adapter_, pineforge::engine_script_run_v18::NativeBeginArgs::bar_magnifier, pineforge::engine_script_run_v18::NativeBeginArgs::bars, pineforge::source::PineStrategyConfig::calc_on_order_fills, config_, pineforge::detect_timeframe(), pineforge::engine_script_run_v18::NativeBeginArgs::input_tf, pineforge::engine_script_run_v18::NativeBeginArgs::inputs, pineforge::engine_script_run_v18::NativeBeginArgs::is_stream, margin_call_enabled_, pineforge::SymInfo::mintick, pineforge::engine_script_run_v18::NativeBeginArgs::n, pineforge::engine_script_run_v18::NativeBeginArgs::overrides_opaque, probe_suppress_tail_logic_, realtime_tail_, scheduler_, pineforge::engine_script_run_v18::NativeBeginArgs::script_tf, source_configuration_captured_, pineforge::source::PineStrategyConfig::src_series_active, pineforge::engine_script_run_v18::NativeBeginArgs::syminfo, and pineforge::tf_ratio().
|
final |
Definition at line 323 of file pine_strategy_host.cpp.
References scheduler_, source_bar_index_, source_callback_count_, source_last_bar_index_, and source_prepare_failed_.
|
final |
Definition at line 347 of file pine_strategy_host.cpp.
References scheduler_, and source_prepare_failed_.
|
final |
Definition at line 359 of file pine_strategy_host.cpp.
References adapter_, pineforge::native_driver_v5::NativeDecisionContext::coordinate, pineforge::engine_script_run_v18::NativeTickContext::decision, pineforge::native_driver_v5::NativeCoordinate::interval_index, pineforge::source::sample_open_trade_extremes(), scheduler_, and source_prepare_failed_.
|
final |
Definition at line 377 of file pine_strategy_host.cpp.
References adapter_, pineforge::native_driver_v5::NativeDecisionContext::driver_statistics, pineforge::native_driver_v5::NativeDriverStatistics::sample_ticks_processed, scheduler_, source_prepare_failed_, and pineforge::native_driver_v5::NativeDriverStatistics::sub_bars_processed.
|
final |
Definition at line 389 of file pine_strategy_host.cpp.
References adapter_, pineforge::native_driver_v5::NativeDecisionContext::coordinate, pineforge::native_driver_v5::NativeDecisionContext::driver_statistics, pineforge::source::Entry, pineforge::Bar::high, pineforge::native_driver_v5::NativeCoordinate::interval_index, pineforge::native_driver_v5::NativeDecisionContext::is_terminal_sub_bar, pineforge::Bar::low, pineforge::source::sample_open_trade_extremes(), pineforge::native_driver_v5::NativeDriverStatistics::sample_ticks_processed, scheduler_, source_last_bar_index_, source_prepare_failed_, and pineforge::native_driver_v5::NativeDriverStatistics::sub_bars_processed.
Referenced by on_native_recalculate().
|
final |
Definition at line 590 of file pine_strategy_host.cpp.
References on_native_bar(), scheduler_, and source_prepare_failed_.
|
final |
Definition at line 449 of file pine_strategy_host.cpp.
References adapter_, pineforge::Trade::close_cause, pineforge::native_order::native_order_v6::ExecutionAppliedEvent::cursor, pineforge::source::Entry, excursion_level_fill_, excursion_margin_call_, excursion_margin_fill_only_, excursion_margin_prefix_, excursion_priced_fill_, excursion_trail_offset_ticks_, excursion_trail_raw_price_, pineforge::Trade::exit_comment, pineforge::Trade::exit_id, pineforge::execution::FillCap, pineforge::FLAT, pineforge::native_order::native_order_v6::ExecutionAppliedEvent::handle(), pineforge::native_order::native_order_v1::RequestHandle::incarnation, pineforge::source::kFillCapCommentPrefix, pineforge::source::kIntradayLossComment, pineforge::source::kMarginCallLabel, pineforge::execution::Liquidation, pineforge::native_order::native_order_v6::ExecutionAppliedEvent::opened_units, pineforge::source::Order, pineforge::native_order::native_order_v6::ExecutionAppliedEvent::ordinal, pineforge::native_driver_v5::NativeCoordinate::path_phase, pineforge::native_order::native_order_v6::MatchCursor::point, precommit_held_units_, pineforge::execution::RiskLimit, scheduler_, and source_prepare_failed_.
|
final |
Definition at line 609 of file pine_strategy_host.cpp.
References adapter_.
|
final |
Definition at line 634 of file pine_strategy_host.cpp.
References adapter_, config_, pineforge::engine_script_run_v18::NativePrecommitView::cursor, pineforge::engine_script_run_v18::NativePrecommitView::definition, excursion_level_fill_, excursion_margin_call_, excursion_margin_fill_only_, excursion_margin_prefix_, excursion_priced_fill_, excursion_trail_offset_ticks_, excursion_trail_raw_price_, pineforge::native_order::native_order_v1::RequestHandle::incarnation, pineforge::native_driver_v5::NativeCoordinate::interval_index, pineforge::native_driver_v5::NativeCoordinate::path_phase, pineforge::native_order::native_order_v6::MatchCursor::point, precommit_held_units_, pineforge::engine_script_run_v18::NativePrecommitView::raw_price, pineforge::engine_script_run_v18::NativePrecommitView::resolved_price, pineforge::compat::pine::snap_trail_level_to_tick_grid(), pineforge::source::PineExecutionAdapter::source_kernel_liquidation(), and pineforge::engine_script_run_v18::NativePrecommitView::target.
|
final |
Definition at line 614 of file pine_strategy_host.cpp.
References adapter_.
|
final |
Definition at line 619 of file pine_strategy_host.cpp.
References adapter_.
|
final |
Definition at line 624 of file pine_strategy_host.cpp.
References adapter_.
|
final |
Definition at line 629 of file pine_strategy_host.cpp.
References adapter_.
|
inlinefinalnoexcept |
Definition at line 283 of file pine_strategy_host.hpp.
|
final |
Definition at line 719 of file pine_strategy_host.cpp.
References pineforge::ClosedLotExcursion::adverse, pineforge::ClosedLotExcursionFacts::carried_adverse, pineforge::ClosedLotExcursionFacts::carried_favorable, pineforge::Bar::close, pineforge::ClosedLotExcursionFacts::closed_qty, config_, pineforge::ClosedLotExcursionFacts::entry_bar_high_masked, pineforge::ClosedLotExcursionFacts::entry_bar_index, pineforge::ClosedLotExcursionFacts::entry_bar_low_masked, pineforge::ClosedLotExcursionFacts::entry_price, excursion_level_fill_, excursion_margin_call_, excursion_margin_fill_only_, excursion_margin_prefix_, excursion_priced_fill_, excursion_range_end_projection_, excursion_trail_offset_ticks_, excursion_trail_raw_price_, pineforge::ClosedLotExcursionFacts::exit_bar_index, pineforge::ClosedLotExcursion::favorable, pineforge::ClosedLotExcursionFacts::fill_price, pineforge::Bar::high, pineforge::ClosedLotExcursionFacts::is_long, pineforge::ClosedLotExcursionFacts::lot_qty, pineforge::Bar::low, pineforge::source::margin_call_sample_bar(), and scheduler_.
| bool pineforge::source::PineStrategyHost::adapter_core_sizes_default_opening | ( | bool | is_long | ) | const |
Definition at line 1799 of file pine_strategy_host.cpp.
References adapter_.
|
pure virtual |
| void pineforge::source::PineStrategyHost::configure_pine_strategy | ( | const PineStrategyConfig & | config | ) |
Definition at line 842 of file pine_strategy_host.cpp.
References adapter_, config_, scheduler_, and source_configuration_captured_.
| void pineforge::source::PineStrategyHost::set_strategy_override | ( | const StrategyOverrides & | overrides | ) |
Definition at line 850 of file pine_strategy_host.cpp.
References adapter_, config_, override_, scheduler_, and source_configuration_captured_.
| void pineforge::source::PineStrategyHost::set_syminfo_session | ( | const std::string & | session | ) |
Definition at line 859 of file pine_strategy_host.cpp.
| void pineforge::source::PineStrategyHost::set_pine_risk_direction | ( | int | direction | ) |
Definition at line 867 of file pine_strategy_host.cpp.
References adapter_.
| void pineforge::source::PineStrategyHost::set_pine_risk_max_cons_loss_days | ( | int | value | ) |
Definition at line 871 of file pine_strategy_host.cpp.
References adapter_.
| void pineforge::source::PineStrategyHost::set_pine_risk_max_drawdown | ( | double | value, |
| bool | percent ) |
Definition at line 875 of file pine_strategy_host.cpp.
References adapter_.
| void pineforge::source::PineStrategyHost::set_pine_risk_max_intraday_loss | ( | double | value, |
| bool | percent ) |
Definition at line 879 of file pine_strategy_host.cpp.
References adapter_.
| void pineforge::source::PineStrategyHost::set_pine_risk_max_intraday_filled_orders | ( | int | limit | ) |
Definition at line 883 of file pine_strategy_host.cpp.
References adapter_.
| void pineforge::source::PineStrategyHost::set_pine_risk_max_position_size | ( | double | value | ) |
Definition at line 887 of file pine_strategy_host.cpp.
References adapter_.
| void pineforge::source::PineStrategyHost::strategy_entry | ( | const std::string & | 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 ) |
Definition at line 25 of file pine_strategy_commands.cpp.
| void pineforge::source::PineStrategyHost::strategy_close | ( | const std::string & | 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 ) |
Definition at line 37 of file pine_strategy_commands.cpp.
| void pineforge::source::PineStrategyHost::strategy_close | ( | const std::string & | id, |
| const std::string & | comment, | ||
| double | qty, | ||
| double | qty_percent, | ||
| bool | immediately, | ||
| std::uint64_t | callsite_token ) |
Definition at line 43 of file pine_strategy_commands.cpp.
| void pineforge::source::PineStrategyHost::strategy_close_all | ( | ) |
Definition at line 52 of file pine_strategy_commands.cpp.
| void pineforge::source::PineStrategyHost::strategy_exit | ( | const std::string & | id, |
| const std::string & | 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 59 of file pine_strategy_commands.cpp.
| void pineforge::source::PineStrategyHost::strategy_exit_cancel_bracket | ( | const std::string & | exit_id, |
| const std::string & | from_entry, | ||
| const std::string & | comment = {} ) |
Definition at line 74 of file pine_strategy_commands.cpp.
| void pineforge::source::PineStrategyHost::strategy_cancel | ( | const std::string & | id | ) |
Definition at line 83 of file pine_strategy_commands.cpp.
| void pineforge::source::PineStrategyHost::strategy_cancel_all | ( | ) |
Definition at line 88 of file pine_strategy_commands.cpp.
| void pineforge::source::PineStrategyHost::strategy_order | ( | const std::string & | 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 ) |
Definition at line 93 of file pine_strategy_commands.cpp.
| int pineforge::source::PineStrategyHost::pine_bar_index | ( | ) | const |
Definition at line 891 of file pine_strategy_host.cpp.
References scheduler_, and source_bar_index_.
| int pineforge::source::PineStrategyHost::pine_last_bar_index | ( | ) | const |
Definition at line 895 of file pine_strategy_host.cpp.
References scheduler_, and source_last_bar_index_.
| double pineforge::source::PineStrategyHost::prev_chart_close | ( | ) | const |
Definition at line 987 of file pine_strategy_host.cpp.
References scheduler_.
|
noexcept |
Definition at line 899 of file pine_strategy_host.cpp.
References scheduler_.
|
noexcept |
Definition at line 903 of file pine_strategy_host.cpp.
References scheduler_.
|
noexcept |
Definition at line 982 of file pine_strategy_host.cpp.
References scheduler_.
|
noexcept |
Definition at line 109 of file pine_security_eval.cpp.
References pine_security_states_, and security_history_publication_replay_.
| int pineforge::source::PineStrategyHost::last_bar_dual_entry_path | ( | ) | const |
Definition at line 991 of file pine_strategy_host.cpp.
References adapter_.
|
override |
Definition at line 1023 of file pine_strategy_host.cpp.
| int pineforge::source::PineStrategyHost::pending_order_count | ( | ) | const |
Definition at line 1027 of file pine_strategy_host.cpp.
References pending_intent_view().
| MarketAdmissionJournal & pineforge::source::PineStrategyHost::market_admission_journal | ( | ) |
Definition at line 1031 of file pine_strategy_host.cpp.
References adapter_.
| const MarketAdmissionJournal & pineforge::source::PineStrategyHost::market_admission_journal | ( | ) | const |
Definition at line 1035 of file pine_strategy_host.cpp.
References adapter_.
| std::vector< admission::Field > pineforge::source::PineStrategyHost::market_admission_fields | ( | ) | const |
Definition at line 1039 of file pine_strategy_host.cpp.
References adapter_.
| int pineforge::source::PineStrategyHost::probe_fill_qty | ( | int | index, |
| double | fill_price, | ||
| double * | qty, | ||
| int * | close_only, | ||
| int * | partition ) const |
Definition at line 1047 of file pine_strategy_host.cpp.
References pending_intent_view().
| int pineforge::source::PineStrategyHost::pending_order_level_resolved | ( | int | index | ) | const |
Definition at line 1052 of file pine_strategy_host.cpp.
References pending_intent_view().
| int pineforge::source::PineStrategyHost::pending_order_effective_levels | ( | int | index, |
| double * | stop, | ||
| double * | limit, | ||
| double * | trail_activation ) const |
Definition at line 1056 of file pine_strategy_host.cpp.
References pending_intent_view().
|
noexcept |
Definition at line 1061 of file pine_strategy_host.cpp.
References adapter_.
Referenced by observe_last_bar_dual_entry_path_v1(), observe_pending_copy_v1(), observe_pending_count_v1(), observe_pending_effective_levels(), observe_pending_level_resolved(), observe_probe_fill_qty(), pending_order_count(), pending_order_effective_levels(), pending_order_level_resolved(), and probe_fill_qty().
|
noexcept |
Definition at line 1065 of file pine_strategy_host.cpp.
References adapter_.
| void pineforge::source::PineStrategyHost::enable_pine_intraday_cap | ( | ) |
Definition at line 1070 of file pine_strategy_host.cpp.
References adapter_.
| void pineforge::source::PineStrategyHost::attach_pine_execution_adapter | ( | ) |
Definition at line 1074 of file pine_strategy_host.cpp.
References adapter_.
|
override |
Definition at line 1083 of file pine_strategy_host.cpp.
References adapter_, chart_ema_na_warmup_, config_, historical_security_lookahead_projection_, scheduler_, security_range_start_ms_, and security_range_start_na_warmup_.
|
override |
Definition at line 20 of file pine_aux_security.cpp.
References aux_security_bars_, aux_security_input_tf_, and pineforge::tf_to_seconds().
|
override |
Definition at line 59 of file pine_aux_security.cpp.
References aux_security_bars_.
|
override |
Definition at line 63 of file pine_aux_security.cpp.
References aux_security_bars_.
|
override |
Definition at line 1112 of file pine_strategy_host.cpp.
References pending_intent_view().
|
override |
Definition at line 1116 of file pine_strategy_host.cpp.
References pending_intent_view().
|
override |
Definition at line 1120 of file pine_strategy_host.cpp.
References pending_intent_view().
|
override |
Definition at line 1125 of file pine_strategy_host.cpp.
References pending_intent_view().
|
override |
Definition at line 1130 of file pine_strategy_host.cpp.
References pending_intent_view().
|
override |
Definition at line 1134 of file pine_strategy_host.cpp.
References pending_intent_view().
|
override |
Definition at line 1139 of file pine_strategy_host.cpp.
References adapter_.
|
inline |
Definition at line 423 of file pine_strategy_host.hpp.
References margin_call_enabled_.
|
inline |
Definition at line 427 of file pine_strategy_host.hpp.
References margin_call_enabled_.
|
inlineoverride |
Definition at line 445 of file pine_strategy_host.hpp.
References realtime_tail_, and realtime_tail_horizon_bars_.
|
inline |
Definition at line 451 of file pine_strategy_host.hpp.
References realtime_tail_.
|
inlineoverride |
Definition at line 471 of file pine_strategy_host.hpp.
References probe_suppress_tail_logic_.
|
inline |
Definition at line 476 of file pine_strategy_host.hpp.
References probe_suppress_tail_logic_.
Referenced by pineforge::source::PineScheduler::bar().
|
inlineprotectednoexcept |
Definition at line 482 of file pine_strategy_host.hpp.
References config_.
|
inlineprotectednoexcept |
Definition at line 483 of file pine_strategy_host.hpp.
References config_.
|
protected |
Definition at line 935 of file pine_strategy_host.cpp.
References adapter_, pineforge::compat::pine::Deny, and fixture_cap_clock().
|
protected |
Definition at line 907 of file pine_strategy_host.cpp.
References pineforge::native_driver_v5::NativeDecisionContext::coordinate, fixture_chart_time(), pineforge::native_driver_v5::NativeCoordinate::interval_index, pineforge::native_driver_v5::NativeDecisionContext::script_bar_open_ms, and pineforge::native_driver_v5::NativeDecisionContext::sub_bar_open_ms.
Referenced by fixture_intraday_cap_latched().
|
protected |
Definition at line 923 of file pine_strategy_host.cpp.
References adapter_, pineforge::native_driver_v5::NativeDecisionContext::coordinate, pineforge::native_driver_v5::NativeCoordinate::interval_index, pineforge::native_driver_v5::NativeDecisionContext::script_bar_open_ms, and pineforge::native_driver_v5::NativeDecisionContext::sub_bar_open_ms.
|
protected |
Definition at line 940 of file pine_strategy_host.cpp.
Referenced by fixture_cap_clock().
|
inlineprotectednoexcept |
Definition at line 488 of file pine_strategy_host.hpp.
References adapter_.
|
protected |
Definition at line 970 of file pine_strategy_host.cpp.
|
inlineprotectednoexcept |
Definition at line 492 of file pine_strategy_host.hpp.
References adapter_.
|
inlineprotectednoexcept |
Definition at line 508 of file pine_strategy_host.hpp.
|
inlineprotectednoexcept |
Definition at line 524 of file pine_strategy_host.hpp.
|
inlineprotectednoexcept |
Definition at line 537 of file pine_strategy_host.hpp.
|
inlineprotectednoexcept |
Definition at line 570 of file pine_strategy_host.hpp.
|
protected |
Definition at line 995 of file pine_strategy_host.cpp.
References scheduler_.
|
protected |
Definition at line 999 of file pine_strategy_host.cpp.
References scheduler_.
|
protected |
Definition at line 1004 of file pine_strategy_host.cpp.
References scheduler_.
|
protected |
Definition at line 1008 of file pine_strategy_host.cpp.
References scheduler_.
|
protected |
Definition at line 1012 of file pine_strategy_host.cpp.
References scheduler_.
Referenced by get_input_source().
|
inlineprotected |
Definition at line 580 of file pine_strategy_host.hpp.
References source_input_series().
|
protected |
Definition at line 170 of file pine_strategy_host.cpp.
|
inlineprotected |
Definition at line 587 of file pine_strategy_host.hpp.
References scheduler_.
|
inlineprotected |
Definition at line 590 of file pine_strategy_host.hpp.
References pineforge::pine_time_close().
|
inlineprotected |
Definition at line 598 of file pine_strategy_host.hpp.
References pineforge::pine_session_ismarket().
|
inlineprotected |
Definition at line 603 of file pine_strategy_host.hpp.
References pineforge::pine_session_ispremarket().
|
inlineprotected |
Definition at line 608 of file pine_strategy_host.hpp.
References pineforge::pine_session_ispostmarket().
|
protected |
Definition at line 1163 of file pine_strategy_host.cpp.
References adapter_, pineforge::source::PineStrategyHost::FixtureIntentRow::affordability_placement_equity, pineforge::admission::market_admission_v2::Draft::bind(), pineforge::source::PlacementSnapshot::birth, pineforge::OrderBirth::cause(), pineforge::OrderBirth::chart_evaluation(), pineforge::source::Close, pineforge::source::CloseAll, pineforge::source::PlacementSnapshot::command_ordinal, config_, pineforge::source::PineStrategyHost::FixtureIntentRow::created_bar, pineforge::source::PineStrategyHost::FixtureIntentRow::created_seq, pineforge::source::PineStrategyHost::FixtureIntentRow::default_stop_placement_equity, pineforge::source::PineStrategyHost::FixtureIntentRow::default_stop_placement_qty, pineforge::source::PineStrategyHost::FixtureIntentRow::default_stop_placement_signal_close, pineforge::source::PineStrategyHost::FixtureIntentRow::default_stop_sizing_price, pineforge::source::Entry, pineforge::source::PineSizingSnapshot::equity, pineforge::source::PlacementSnapshot::exit_levels, pineforge::source::ExitLimit, pineforge::source::ExitStop, pineforge::source::ExitTrail, pineforge::source::PlacementSnapshot::family, pineforge::FLAT, pineforge::source::PineStrategyHost::FixtureIntentRow::from_entry, pineforge::source::PlacementSnapshot::from_entry, pineforge::source::PineStrategyHost::FixtureIntentRow::frozen_default_qty, pineforge::source::PlacementSnapshot::frozen_market_instruction, pineforge::source::PineStrategyHost::FixtureIntentRow::frozen_market_own_units, pineforge::source::PlacementSnapshot::frozen_market_own_units, pineforge::source::PlacementSnapshot::frozen_market_targeted_close, pineforge::source::PineStrategyHost::FixtureIntentRow::frozen_market_transaction_units, pineforge::source::PlacementSnapshot::frozen_market_transaction_units, pineforge::source::PineSizingSnapshot::frozen_units, pineforge::source::PineSizingSnapshot::fx, pineforge::source::PineStrategyHost::FixtureIntentRow::id, pineforge::source::PineStrategyHost::FixtureIntentRow::incarnation, pineforge::source::PineStrategyHost::FixtureIntentRow::is_long, pineforge::source::PlacementSnapshot::is_long, pineforge::source::PineExitLevels::limit, pineforge::source::Margin, pineforge::source::PineSizingSnapshot::mark, pineforge::source::PineStrategyHost::FixtureIntentRow::market_admission, pineforge::source::PlacementSnapshot::market_admission, pineforge::admission::market_admission_v2::Draft::observation(), pineforge::source::PlacementSnapshot::oca_name, pineforge::source::PlacementSnapshot::oca_type, pineforge::source::Order, pineforge::source::PineStrategyHost::FixtureIntentRow::over_pyramiding_cap_at_placement, pineforge::source::PineStrategyHost::FixtureIntentRow::paired_flat_market_peer_seq, pineforge::source::PineStrategyHost::FixtureIntentRow::paired_flat_market_transaction_qty, pineforge::PERCENT_OF_EQUITY, pineforge::source::PlacementSnapshot::placement_cycle, pineforge::source::PineSizingSnapshot::price, pineforge::source::PlacementSnapshot::projection_affordability_equity, pineforge::source::PlacementSnapshot::projection_created_bar, pineforge::source::PlacementSnapshot::projection_default_stop_equity, pineforge::source::PlacementSnapshot::projection_default_stop_signal_close, pineforge::source::PlacementSnapshot::projection_over_pyramiding, pineforge::source::PlacementSnapshot::projection_remaining_qty, pineforge::source::PineStrategyHost::FixtureIntentRow::qty, pineforge::source::PineStrategyHost::FixtureIntentRow::qty_percent, pineforge::source::PlacementSnapshot::qty_percent, pineforge::source::PlacementSnapshot::qty_type, pineforge::source::PlacementSnapshot::requested_qty, pineforge::source::Risk, pineforge::source::PlacementSnapshot::sizing, source_bar_index_, pineforge::source::PlacementSnapshot::source_id, source_pending_view_cache_, pineforge::source::PlacementSnapshot::source_sequence, pineforge::source::PineExitLevels::stop, pineforge::source::PineStrategyHost::FixtureIntentRow::type, and pineforge::Unattributed.
|
protected |
Definition at line 49 of file pine_security_eval.cpp.
References pineforge::source::PineSecurityEvalState::gaps_on, pineforge::source::PineSecurityEvalState::heikinashi, pineforge::source::PineSecurityEvalState::lookahead_on, pineforge::source::PineSecurityEvalState::lower_tf_emulation, pineforge::source::PineSecurityEvalState::lower_tf_ratio, pineforge::source::PineSecurityEvalState::lower_tf_requested, pineforge::source::PineSecurityEvalState::lower_tf_seconds, and pine_security_states_.
Referenced by register_security_lower_tf_eval().
|
protected |
Definition at line 96 of file pine_security_eval.cpp.
References register_security_eval().
|
protected |
Definition at line 126 of file pine_security_eval.cpp.
|
protected |
Definition at line 162 of file pine_security_eval.cpp.
References pineforge::source::PineSecurityEvalState::calling_close_completes_partial, pineforge::source::PineSecurityEvalState::calling_open_latches_first, pineforge::source::PineSecurityEvalState::deferred_aux, pineforge::source::PineSecurityEvalState::first_bucket_published, pineforge::source::PineSecurityEvalState::gaps_on, pineforge::source::PineSecurityEvalState::lookahead_on, pineforge::source::PineSecurityEvalState::lower_tf_array_requested, pineforge::source::PineSecurityEvalState::lower_tf_emulation, pineforge::source::PineSecurityEvalState::lower_tf_input_aggregation_ratio, pineforge::source::PineSecurityEvalState::lower_tf_input_buffer, pineforge::source::PineSecurityEvalState::lower_tf_ratio, pineforge::source::PineSecurityEvalState::lower_tf_requested, pineforge::source::PineSecurityEvalState::lower_tf_seconds, pineforge::source::PineSecurityEvalState::lower_tf_use_input, pineforge::source::PineSecurityEvalState::publish_gate_tf_seconds, pineforge::safe_tf_to_seconds(), and pineforge::tf_to_seconds().
|
overrideprotected |
Definition at line 1310 of file pine_strategy_host.cpp.
|
overrideprotected |
Definition at line 629 of file pine_state_hash.cpp.
References adapter_, aux_security_bars_, aux_security_chart_begin_, aux_security_chart_end_, aux_security_input_tf_, pineforge::engine_script_run_v18::BrokerStateHashSink::b(), pineforge::Bar::close, config_, pineforge::engine_script_run_v18::BrokerStateHashSink::d(), excursion_level_fill_, excursion_margin_fill_only_, excursion_margin_prefix_, excursion_trail_raw_price_, pineforge::Bar::high, pineforge::engine_script_run_v18::BrokerStateHashSink::i(), pineforge::source::kSourceAdapterDomain, pineforge::source::kSourceSecurityDomain, pineforge::Bar::low, pineforge::Bar::open, override_, pine_security_states_, pineforge::engine_script_run_v18::BrokerStateHashSink::s(), scheduler_, source_bar_index_, source_callback_count_, source_configuration_captured_, source_prepare_failed_, pineforge::Bar::timestamp, pineforge::engine_script_run_v18::BrokerStateHashSink::u(), and pineforge::Bar::volume.
Referenced by hash_source_extension().
|
inlinefinalprotected |
Definition at line 648 of file pine_strategy_host.hpp.
References hash_host_extension().
|
protected |
Definition at line 1368 of file pine_strategy_host.cpp.
References realtime_tail_, realtime_tail_horizon_bars_, and pineforge::Bar::timestamp.
|
protected |
Definition at line 778 of file pine_strategy_host.hpp.
Referenced by adapter_core_sizes_default_opening(), attach_pine_execution_adapter(), configure_pine_strategy(), pineforge::source::PineScheduler::coof_recalculation_due(), enable_pine_intraday_cap(), fixture_cap_calculation(), fixture_cap_due_pending(), fixture_chart_day_key(), fixture_intraday_cap_latched(), hash_host_extension(), last_bar_dual_entry_path(), margin_check_allowed(), market_admission_fields(), market_admission_journal(), market_admission_journal(), observe_trail_best_price_v1(), on_native_applied(), on_native_bar(), on_native_bar_open(), on_native_tick(), pending_intent_view(), PineStrategyHost(), prepare_native_begin(), pineforge::source::PineScheduler::recalculate(), resolve_anchored_level(), resolve_execution_terms(), resolve_margin_call_units(), resolve_margin_requirement(), set_pine_risk_direction(), set_pine_risk_max_cons_loss_days(), set_pine_risk_max_drawdown(), set_pine_risk_max_intraday_filled_orders(), set_pine_risk_max_intraday_loss(), set_pine_risk_max_position_size(), set_strategy_override(), set_syminfo_metadata(), short_seed_collision_role_v1(), source_pending_view(), strategy_cancel(), strategy_cancel_all(), strategy_close(), strategy_close(), strategy_close_all(), strategy_entry(), strategy_exit(), strategy_exit_cancel_bracket(), strategy_order(), and validate_execution_precommit().
|
protected |
Definition at line 792 of file pine_strategy_host.hpp.
|
protected |
Definition at line 793 of file pine_strategy_host.hpp.
Referenced by closed_lot_excursion(), configure_pine_strategy(), pineforge::source::PineScheduler::coof_recalculation_due(), fixture_configuration(), fixture_configuration(), hash_host_extension(), prepare_native_begin(), pineforge::source::PineScheduler::recalculate(), set_strategy_override(), set_syminfo_metadata(), source_pending_view(), strategy_cancel(), strategy_cancel_all(), strategy_close(), strategy_close(), strategy_close_all(), strategy_entry(), strategy_exit(), strategy_exit_cancel_bracket(), strategy_order(), and validate_execution_precommit().
|
protected |
Definition at line 794 of file pine_strategy_host.hpp.
Referenced by hash_host_extension(), and set_strategy_override().
|
protected |
Definition at line 795 of file pine_strategy_host.hpp.
Referenced by clear_script_position_view(), closed_lot_excursion(), configure_pine_strategy(), fixture_publish_source_series(), freeze_script_position_view(), hash_host_extension(), history_advances_new_bar(), is_first_tick(), is_last_tick(), on_native_applied(), on_native_bar(), on_native_bar_open(), on_native_input(), on_native_recalculate(), on_native_run_begin(), on_native_tick(), pine_bar_index(), pine_last_bar_index(), PineStrategyHost(), prepare_native_begin(), prev_chart_close(), set_strategy_override(), set_syminfo_metadata(), signed_position_size(), source_input_series(), and source_series().
|
protected |
Definition at line 798 of file pine_strategy_host.hpp.
Referenced by PineStrategyHost().
|
protected |
Definition at line 799 of file pine_strategy_host.hpp.
Referenced by PineStrategyHost().
|
protected |
Definition at line 800 of file pine_strategy_host.hpp.
Referenced by PineStrategyHost().
|
protected |
Definition at line 801 of file pine_strategy_host.hpp.
Referenced by PineStrategyHost().
|
protected |
Definition at line 802 of file pine_strategy_host.hpp.
Referenced by PineStrategyHost().
|
protected |
Definition at line 803 of file pine_strategy_host.hpp.
Referenced by PineStrategyHost().
|
protected |
Definition at line 804 of file pine_strategy_host.hpp.
Referenced by PineStrategyHost().
|
protected |
Definition at line 805 of file pine_strategy_host.hpp.
Referenced by PineStrategyHost().
|
protected |
Definition at line 806 of file pine_strategy_host.hpp.
Referenced by PineStrategyHost().
|
protected |
Definition at line 807 of file pine_strategy_host.hpp.
Referenced by PineStrategyHost().
|
protected |
Definition at line 808 of file pine_strategy_host.hpp.
Referenced by PineStrategyHost().
|
protected |
Definition at line 809 of file pine_strategy_host.hpp.
Referenced by hash_host_extension(), on_native_run_begin(), pine_bar_index(), and source_pending_view().
|
protected |
Definition at line 810 of file pine_strategy_host.hpp.
Referenced by on_native_bar(), on_native_run_begin(), and pine_last_bar_index().
|
protected |
Definition at line 811 of file pine_strategy_host.hpp.
Referenced by hash_host_extension(), and on_native_run_begin().
|
protected |
Definition at line 812 of file pine_strategy_host.hpp.
Referenced by configure_pine_strategy(), hash_host_extension(), prepare_native_begin(), and set_strategy_override().
|
protected |
Definition at line 813 of file pine_strategy_host.hpp.
Referenced by hash_host_extension(), on_native_applied(), on_native_bar(), on_native_bar_open(), on_native_input(), on_native_recalculate(), on_native_run_begin(), and on_native_tick().
|
protected |
Definition at line 815 of file pine_strategy_host.hpp.
Referenced by hash_host_extension(), set_aux_security_feed(), source_aux_security_feed_enabled(), and source_aux_security_input_view().
|
protected |
Definition at line 816 of file pine_strategy_host.hpp.
Referenced by hash_host_extension(), and set_aux_security_feed().
|
protected |
Definition at line 817 of file pine_strategy_host.hpp.
Referenced by hash_host_extension().
|
protected |
Definition at line 818 of file pine_strategy_host.hpp.
Referenced by hash_host_extension().
|
protected |
Definition at line 825 of file pine_strategy_host.hpp.
Referenced by hash_host_extension(), register_security_eval(), and security_series_slot_is_new().
|
protected |
Definition at line 831 of file pine_strategy_host.hpp.
Referenced by margin_call_enabled(), prepare_native_begin(), and set_margin_call_enabled().
|
protected |
Definition at line 837 of file pine_strategy_host.hpp.
Referenced by apply_realtime_tail_horizon(), prepare_native_begin(), realtime_tail(), and set_realtime_tail().
|
protected |
Definition at line 838 of file pine_strategy_host.hpp.
Referenced by apply_realtime_tail_horizon(), and set_realtime_tail().
|
protected |
Definition at line 839 of file pine_strategy_host.hpp.
Referenced by prepare_native_begin(), probe_suppress_tail_logic(), and set_probe_suppress_tail_logic().
|
protected |
Definition at line 866 of file pine_strategy_host.hpp.
Referenced by set_syminfo_metadata().
|
protected |
Definition at line 877 of file pine_strategy_host.hpp.
Referenced by set_syminfo_metadata().
|
protected |
Definition at line 878 of file pine_strategy_host.hpp.
Referenced by set_syminfo_metadata().
|
protected |
Definition at line 902 of file pine_strategy_host.hpp.
|
protected |
Definition at line 911 of file pine_strategy_host.hpp.
|
protected |
Definition at line 918 of file pine_strategy_host.hpp.
Referenced by set_syminfo_metadata().
|
protected |
Definition at line 919 of file pine_strategy_host.hpp.
|
protected |
Definition at line 926 of file pine_strategy_host.hpp.
Referenced by security_series_slot_is_new().
|
mutableprotected |
Definition at line 929 of file pine_strategy_host.hpp.
Referenced by source_pending_view().
|
mutableprotected |
Definition at line 934 of file pine_strategy_host.hpp.
Referenced by closed_lot_excursion(), on_native_applied(), and validate_execution_precommit().
|
mutableprotected |
Definition at line 935 of file pine_strategy_host.hpp.
Referenced by closed_lot_excursion(), hash_host_extension(), on_native_applied(), and validate_execution_precommit().
|
mutableprotected |
Definition at line 936 of file pine_strategy_host.hpp.
Referenced by closed_lot_excursion(), on_native_applied(), and validate_execution_precommit().
|
mutableprotected |
Definition at line 942 of file pine_strategy_host.hpp.
Referenced by closed_lot_excursion(), hash_host_extension(), on_native_applied(), and validate_execution_precommit().
|
mutableprotected |
Definition at line 946 of file pine_strategy_host.hpp.
Referenced by closed_lot_excursion(), hash_host_extension(), on_native_applied(), and validate_execution_precommit().
|
mutableprotected |
Definition at line 947 of file pine_strategy_host.hpp.
Referenced by closed_lot_excursion().
|
mutableprotected |
Definition at line 948 of file pine_strategy_host.hpp.
Referenced by closed_lot_excursion(), on_native_applied(), and validate_execution_precommit().
|
mutableprotected |
Definition at line 952 of file pine_strategy_host.hpp.
Referenced by on_native_applied(), and validate_execution_precommit().
|
mutableprotected |
Definition at line 958 of file pine_strategy_host.hpp.
Referenced by closed_lot_excursion(), hash_host_extension(), on_native_applied(), and validate_execution_precommit().