PineForge unreleased
Deterministic PineScript v6 backtest runtime — C ABI reference
Loading...
Searching...
No Matches
pine_adapter.hpp File Reference
#include <pineforge/native_host.hpp>
#include <pineforge/compat/pine/exit_activation.hpp>
#include <pineforge/compat/pine/exit_lifecycle.hpp>
#include <pineforge/compat/pine/intraday_cap.hpp>
#include <pineforge/compat/pine/order_birth.hpp>
#include <pineforge/compat/pine/order_priority.hpp>
#include <pineforge/compat/pine/reservation_expansion.hpp>
#include <pineforge/source/market_admission.hpp>
#include <pineforge/detail/disk_resident_id_table.hpp>
#include <pineforge/detail/id_pair_store.hpp>
#include <pineforge/detail/adapter_exposure_storage.hpp>
#include <pineforge/detail/scratch_sequence.hpp>
#include <pineforge/source/exit_scratch.hpp>
#include <pineforge/source/live_source_identity.hpp>
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <iterator>
#include <limits>
#include <map>
#include <memory>
#include <optional>
#include <stdexcept>
#include <string>
#include <string_view>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#include <array>
Include dependency graph for pine_adapter.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  pineforge::source::PineStrategyConfig
 
struct  pineforge::source::StrategyOverrides
 
struct  pineforge::source::StagedInstrumentFeed
 
struct  pineforge::source::StagedConfiguration
 
struct  pineforge::source::PineExitLevels
 
struct  pineforge::source::PineCancellationReceipt
 
struct  pineforge::source::PineSizingSnapshot
 
struct  pineforge::source::PlacementSnapshot
 
struct  pineforge::source::detail::MarginRuleSwitches
 
struct  pineforge::source::detail::ScriptRuleSwitches
 
struct  pineforge::source::detail::ExitBindingRuleSwitches
 
struct  pineforge::source::detail::PoocCloseFillViewSwitches
 
class  pineforge::source::PlacementTable
 
class  pineforge::source::PlacementTable::Iterator< IsConst >
 
class  pineforge::source::OriginRoster
 
class  pineforge::source::BracketRoster
 
class  pineforge::source::BracketRoster::const_iterator
 
struct  pineforge::source::BracketRoster::Settled
 
struct  pineforge::source::BracketRoster::RemovalSelection
 
struct  pineforge::source::ShortSeedPlan
 
struct  pineforge::source::PendingShortSeedPlan
 
struct  pineforge::source::DroppedCloseReceipt
 
struct  pineforge::source::OpenEntryFeeFact
 
struct  pineforge::source::SourceDayLedger
 
struct  pineforge::source::PineRiskState
 
struct  pineforge::source::PineReplayRiskConfig
 
class  pineforge::source::PendingIntentView
 
class  pineforge::source::PineExecutionAdapter
 
struct  pineforge::source::PineExecutionAdapter::FixturePendingSnapshot
 
struct  pineforge::source::PineExecutionAdapter::FixtureCloseCallsite
 
struct  pineforge::source::PineExecutionAdapter::PendingScanCounter
 
struct  pineforge::source::PineExecutionAdapter::PendingScanWork
 
struct  pineforge::source::PineExecutionAdapter::CohortHeapEstimate
 
struct  pineforge::source::PineExecutionAdapter::PositionTailWork
 
struct  pineforge::source::PineExecutionAdapter::AnchoredRelativeStats
 
struct  pineforge::source::PineExecutionAdapter::SourceMarginMoney
 
struct  pineforge::source::PineExecutionAdapter::CohortFacts::Record
 
struct  pineforge::source::PineExecutionAdapter::ExitGroupWork
 
struct  pineforge::source::PineExecutionAdapter::RetiredRowScratch::HeldLeg
 
struct  pineforge::source::PineExecutionAdapter::RetirementWork
 
struct  pineforge::source::PineExecutionAdapter::RetirementPopulation
 
struct  pineforge::source::detail::MarginScheduleSwitches
 
struct  pineforge::source::detail::MarginOpeningSwitches
 

Namespaces

namespace  pineforge
 
namespace  pineforge::source
 
namespace  pineforge::source::detail
 
namespace  pineforge::detail
 

Macros

#define PINEFORGE_PLACEMENT_AUDIT   0
 

Typedefs

using pineforge::source::SourceId = std::string
 

Enumerations

enum class  pineforge::source::PineOrderFamily : std::uint8_t {
  pineforge::source::Entry = 0 ,
  pineforge::source::Close = 1 ,
  pineforge::source::CloseAll = 2 ,
  pineforge::source::ExitLimit = 3 ,
  pineforge::source::ExitStop = 4 ,
  pineforge::source::ExitTrail = 5 ,
  pineforge::source::Order = 6 ,
  pineforge::source::Margin = 7 ,
  pineforge::source::Risk = 8
}
 
enum class  pineforge::source::PineCancellationCause : std::int32_t {
  pineforge::source::None = 0 ,
  pineforge::source::Replacement = 1 ,
  pineforge::source::Dependency = 2 ,
  pineforge::source::Admission = 3 ,
  pineforge::source::Explicit = 4
}
 

Functions

void pineforge::source::detail::placement_audit_erase (const PlacementTable *table, std::uint64_t incarnation, PlacementSnapshot &&row)
 
void pineforge::source::detail::placement_audit_forget (const PlacementTable *table) noexcept
 
void pineforge::source::detail::placement_audit_miss (const PlacementTable *table, std::uint64_t incarnation, unsigned line) noexcept
 
void pineforge::source::detail::placement_audit_scan_hit (const PlacementTable *table, std::uint64_t incarnation, unsigned line) noexcept
 
const std::vector< std::pair< std::uint64_t, const PlacementSnapshot * > > * pineforge::source::detail::placement_audit_tombstones (const PlacementTable *table)
 
MarginRuleSwitches & pineforge::source::detail::margin_rule_switches () noexcept
 
ScriptRuleSwitches & pineforge::source::detail::script_rule_switches () noexcept
 
ExitBindingRuleSwitches & pineforge::source::detail::exit_binding_rule_switches () noexcept
 
PoocCloseFillViewSwitches & pineforge::source::detail::pooc_close_fill_view_switches () noexcept
 
void pineforge::detail::bind_tree_scratch_tables (source::PineExecutionAdapter &, const std::shared_ptr< ScratchSlab > &)
 
void pineforge::detail::bind_id_pair_scratch_tables (source::PineExecutionAdapter &, const std::shared_ptr< ScratchSlab > &)
 
MarginScheduleSwitches & pineforge::source::detail::margin_schedule_switches () noexcept
 
MarginOpeningSwitches & pineforge::source::detail::margin_opening_switches () noexcept
 

Variables

constexpr char pineforge::source::kSourceAdapterDomain [] = "pineforge-source-adapter/v4"
 
constexpr char pineforge::source::kMarginCallLabel [] = "__margin_call__"
 
constexpr char pineforge::source::kIntradayLossComment [] = "Close Position (Max intraday Loss)"
 
constexpr char pineforge::source::kFillCapCommentPrefix []
 
constexpr std::uint32_t pineforge::source::kCoofLoopGuard = 1U << 20
 

Macro Definition Documentation

◆ PINEFORGE_PLACEMENT_AUDIT

#define PINEFORGE_PLACEMENT_AUDIT   0

Definition at line 574 of file pine_adapter.hpp.