MQL5-SyntheticTestHarness/MQL5/Include/SyntheticTestHarness/ITickProvider.mqh

36 lines
1.8 KiB
MQL5
Raw Permalink Normal View History

//+------------------------------------------------------------------+
//| ITickProvider.mqh |
//| Synthetic Test Harness for MetaTrader 5 |
//| Institutional Architecture in MQL5 - Part 1 Series |
//+------------------------------------------------------------------+
2026-07-18 22:59:46 -03:00
#ifndef SYNTHETIC_TEST_HARNESS_ITICK_PROVIDER_MQH
#define SYNTHETIC_TEST_HARNESS_ITICK_PROVIDER_MQH
#include "MockTick.mqh"
//+------------------------------------------------------------------+
//| ITickProvider: inbound port for tick data sources. |
//| |
//| This is the Strategy Pattern interface. The engine depends on |
//| this abstraction, never on a concrete data source. New sources |
//| (CSV file, network stream, random generator) extend the system |
//| by implementing this interface - no existing code changes. |
//| |
//| Concrete implementations: |
//| - CArrayProvider (in-memory array, for rapid prototyping) |
//| - [Future] CFileProvider (CSV/binary file) |
//| - [Future] CRandomProvider (Monte Carlo scenarios) |
//+------------------------------------------------------------------+
interface ITickProvider
{
//--- Returns true if the provider has remaining ticks to deliver
bool HasNext(void);
//--- Advances the cursor and fills out_tick with the next data point.
//--- Returns false if no tick was available (exhausted).
bool GetNextTick(MockTick &out_tick);
};
//+------------------------------------------------------------------+
2026-07-18 22:59:46 -03:00
#endif