PineForge v0.13.1-379-g9b50973
Deterministic PineScript v6 backtest runtime — C ABI reference
Loading...
Searching...
No Matches
pine_language_state.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace pineforge::source {
6
7class PineScheduler;
9
10// Data only. Stateful helpers remain PineStrategyHost members so they retain
11// unqualified access to the generic broker state they read.
13 friend class PineScheduler;
14 friend class PineStrategyHost;
15protected:
16 // @source-state begin
20 std::unordered_map<std::string, double> pos_view_frozen_entry_qty_;
21
22 bool _src_series_active_ = false;
32 double prev_chart_close_ = std::numeric_limits<double>::quiet_NaN();
33 double last_chart_close_ = std::numeric_limits<double>::quiet_NaN();
35
36 bool is_first_tick_ = true;
37 bool is_last_tick_ = true;
49 double coof_checkpoint_prev_chart_close_ = std::numeric_limits<double>::quiet_NaN();
50 double coof_checkpoint_last_chart_close_ = std::numeric_limits<double>::quiet_NaN();
51 // @source-state end
52
54 _src_open_.clear();
55 _src_high_.clear();
56 _src_low_.clear();
57 _src_close_.clear();
58 _src_volume_.clear();
59 prev_chart_close_ = std::numeric_limits<double>::quiet_NaN();
60 last_chart_close_ = std::numeric_limits<double>::quiet_NaN();
61 coof_checkpoint_prev_chart_close_ = std::numeric_limits<double>::quiet_NaN();
62 coof_checkpoint_last_chart_close_ = std::numeric_limits<double>::quiet_NaN();
63 _src_hl2_.clear();
64 _src_hlc3_.clear();
65 _src_ohlc4_.clear();
66 _src_hlcc4_.clear();
67 }
68};
69
70} // namespace pineforge::source
std::unordered_map< std::string, double > pos_view_frozen_entry_qty_