//+------------------------------------------------------------------+ //| AbstractChapter.mqh | //| Copyright 2025, MetaQuotes Ltd. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2025, MetaQuotes Ltd." #property link "https://www.mql5.com" #property version "1.00" #include "../Utils/CommonHelper.mqh" #include "../Systems/EventBus.mqh" //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ class AbstractChapter { private: ENUM_TIMEFRAMES timeframe; protected: string prefix; CommonHelper com; EventBus eventBus; StructureLevels* levels; public: AbstractChapter(); ~AbstractChapter(); virtual int OnInit(StructureLevels* levels_, string prefix_, ENUM_TIMEFRAMES tf_, CommonHelper &commonHelper) { timeframe = tf_; prefix = prefix_; com = commonHelper; levels = levels_; return INIT_SUCCEEDED; } virtual void OnCalculate(int i, CommonHelper &commonHelper) { com = commonHelper; } void SetEventBus(EventBus &_eventBus) { eventBus = _eventBus; } }; //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ AbstractChapter::AbstractChapter() { } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ AbstractChapter::~AbstractChapter() { } //+------------------------------------------------------------------+