PineForge unreleased
Deterministic PineScript v6 backtest runtime — C ABI reference
Loading...
Searching...
No Matches
pineforge::TimeframeAggregator::PeriodSource Class Referenceabstract

A period partition generated on demand rather than stored: what set_native_period_source installs where set_native_periods installs stamps, for a partition whose stamps would grow with the feed (one per N trading dates of an N-day request). More...

#include <timeframe.hpp>

Public Member Functions

virtual ~PeriodSource ()=default
 
virtual bool stamp_at (int64_t ms, int64_t &stamp, bool &last)=0
 The open of the latest period at or before ms; false before the first period.
 
virtual int64_t last_stamp () const =0
 The final period's open.
 
virtual std::size_t stamps_held () const =0
 How many period opens the source holds in memory right now.
 

Detailed Description

A period partition generated on demand rather than stored: what set_native_period_source installs where set_native_periods installs stamps, for a partition whose stamps would grow with the feed (one per N trading dates of an N-day request).

The aggregator asks it exactly what it asks of stored stamps – the latest period opening at or before an instant – and keeps nothing of the answers. The source owns its memory bound, and its answers do not depend on the order of the questions.

Definition at line 464 of file timeframe.hpp.

Constructor & Destructor Documentation

◆ ~PeriodSource()

virtual pineforge::TimeframeAggregator::PeriodSource::~PeriodSource ( )
virtualdefault

Member Function Documentation

◆ stamp_at()

virtual bool pineforge::TimeframeAggregator::PeriodSource::stamp_at ( int64_t ms,
int64_t & stamp,
bool & last )
pure virtual

The open of the latest period at or before ms; false before the first period.

last says that period is the final one.

◆ last_stamp()

virtual int64_t pineforge::TimeframeAggregator::PeriodSource::last_stamp ( ) const
pure virtual

◆ stamps_held()

virtual std::size_t pineforge::TimeframeAggregator::PeriodSource::stamps_held ( ) const
pure virtual

How many period opens the source holds in memory right now.

Implemented in pineforge::source::multi_day_detail::RescannedSource, and pineforge::source::multi_day_detail::Source.


The documentation for this class was generated from the following file: