mql4-bar/knitpkg/include/douglasrechia/bar/TimeSeries.mqh
2026-02-03 10:27:54 -03:00

26 行
1.3 KiB
MQL5

//+------------------------------------------------------------------+
//| Series.mqh |
//| |
//| KnitPkg for MetaTrader |
//| |
//| MIT License |
//| Copyright (c) 2025 Douglas Rechia |
//| |
//| Generic series interface for type-safe data access. |
//| |
//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
//| ITimeSeries — generic interface for chronological data sequences |
//+------------------------------------------------------------------+
template<typename T>
interface ITimeSeries
{
public:
// Returns the element at the given shift (shift = 0 is the most recent bar).
T ValueAtShift(int shift = 0);
// Returns the total number of elements
int Size();
};
//+------------------------------------------------------------------+