mql5/Experts/Motivated/Chapters/AbstractChapter.mqh
younglubah-gmail 9639b8b362
2026-06-23 21:44:37 +02:00

64 lines
2.1 KiB
MQL5

//+------------------------------------------------------------------+
//| 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()
{
}
//+------------------------------------------------------------------+