PineForge v0.13.1-379-g9b50973
Deterministic PineScript v6 backtest runtime — C ABI reference
Loading...
Searching...
No Matches
compat/pine/reservation_expansion.hpp
Go to the documentation of this file.
1#pragma once
2
4
5#include <cstdint>
6#include <string>
7#include <vector>
8
10
11// Source-side selection evidence. The generic core keeps ownership and
12// match-time cohort resolution; this merely decides whether an adapter exit
13// receives a historical reservation-growth receipt.
15 std::uint64_t incarnation = 0;
16 std::string source_id;
17 bool market_entry = false;
18 bool from_fill = false;
19 bool at_entry_capacity = false;
20 bool is_long = true;
22 int created_bar = -1;
23};
24
25std::vector<std::uint64_t> select_reservation_growth_sources(
26 const std::vector<ReservationGrowthCandidate>& candidates,
27 const std::string& from_entry, bool process_on_close, bool effectively_flat,
28 double percent, int bar, PositionSide side);
29bool admits_reservation_expansion(const std::vector<std::uint64_t>& selected,
30 bool partial, double reserved, double live) noexcept;
31
32} // namespace pineforge::compat::pine
bool admits_reservation_expansion(const std::vector< std::uint64_t > &selected, bool partial, double reserved, double live) noexcept
std::vector< std::uint64_t > select_reservation_growth_sources(const std::vector< ReservationGrowthCandidate > &candidates, const std::string &from_entry, bool process_on_close, bool effectively_flat, double percent, int bar, PositionSide side)