//+------------------------------------------------------------------+ //| Chapter2.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 "../Systems/StructureSystem.mqh" #include "AbstractChapter.mqh" //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ class Chapter2 : public AbstractChapter { private: StructureSystem structureSystem; public: Chapter2(); ~Chapter2(); int OnInit(StructureLevels* levels_, string prefix_, ENUM_TIMEFRAMES tf_, CommonHelper &commonHelper) override; void OnCalculate(int i, CommonHelper &commonHelper) override; void SetEventBus(EventBus &_eventBus) { AbstractChapter::SetEventBus(_eventBus); structureSystem.OnInit(levels, &_eventBus); } }; //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ Chapter2::Chapter2() { } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ Chapter2::~Chapter2() { } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int Chapter2:: OnInit(StructureLevels* levels_, string prefix_, ENUM_TIMEFRAMES tf_, CommonHelper &commonHelper) { return AbstractChapter::OnInit(levels_, prefix_, tf_, &commonHelper); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ void Chapter2::OnCalculate(int i, CommonHelper &commonHelper) { AbstractChapter::OnCalculate(i, &commonHelper); structureSystem.OnCalculate(i, &commonHelper); } //+------------------------------------------------------------------+