mql4-bar/knitpkg/include/douglasrechia/bar/TimeSeries.mqh

26 lines
1.3 KiB
MQL5
Raw Permalink Normal View History

2026-01-05 16:50:37 -03:00
//+------------------------------------------------------------------+
//| Series.mqh |
//| |
2026-01-07 16:36:28 -03:00
//| KnitPkg for MetaTrader |
2026-01-05 16:50:37 -03:00
//| |
//| 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();
};
//+------------------------------------------------------------------+