3#include <pineforge/pineforge.h>
32 const pf_bar_t*
data() const noexcept {
return bars_.data(); }
34 std::size_t
size() const noexcept {
return bars_.size(); }
36 bool empty() const noexcept {
return bars_.empty(); }
38 const std::vector<pf_bar_t>&
bars() const noexcept {
return bars_; }
41 std::vector<pf_bar_t> bars_;
Immutable in-memory OHLCV input shared by independent trial executions.
const std::vector< pf_bar_t > & bars() const noexcept
Returns the immutable owning bar container.
const pf_bar_t * data() const noexcept
Returns a const pointer suitable for PineForge backtest calls.
std::size_t size() const noexcept
Returns the number of bars.
bool empty() const noexcept
Returns whether the dataset contains no bars.
static Dataset load_csv(const std::filesystem::path &path)
Loads timestamp,open,high,low,close,volume columns from a CSV file.
Dataset(std::vector< pf_bar_t > bars)
Takes ownership of validated bars.