8#if (defined(_MSVC_LANG) ? _MSVC_LANG : __cplusplus) < 201703L
10 "OpenPine C++ wrapper headers require C++17 (std::optional, std::string_view)."
36 double price()
const {
return data_.price; }
39 double quantity()
const {
return data_.quantity; }
42 ffi::FilledOrder data_{};
53 std::unique_ptr<ffi::FilledOrdersIterator,
54 decltype(&ffi::filledOrdersIteratorDelete)>
63 : p_(p, ffi::filledOrdersIteratorDelete) {}
71 return ffi::filledOrdersIteratorNext(p_.get(), &out.data_);
A single filled order (signal name, price, signed quantity).
std::string_view orderId() const
Signal/order id (e.g. entry or exit name).
double quantity() const
Signed quantity (positive = buy, negative = sell).
double price() const
Fill price.
friend class FilledOrdersIterator
bool next(FilledOrder &out)
Advances to the next filled order and writes it into out.
FilledOrdersIterator(ffi::FilledOrdersIterator *p)
Constructs an iterator from the C ABI handle.
std::string_view refToView(const ffi::PineStringRef &ref)
Shared helpers for converting C ABI string refs to std::string_view.