mql5/Experts/Motivated/Systems/AbstractSystem.mqh

38 lines
1.3 KiB
MQL5

2026-06-09 05:44:15 +02:00
//+------------------------------------------------------------------+
//| AbstractSystem.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"
2026-06-23 21:44:37 +02:00
2026-06-09 05:44:15 +02:00
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
class AbstractSystem
{
protected:
CommonHelper com;
EventBus eventBus;
2026-06-23 21:44:37 +02:00
StructureLevels* levels;
2026-06-09 05:44:15 +02:00
public:
2026-06-23 21:44:37 +02:00
AbstractSystem() {}
~AbstractSystem() {}
2026-06-09 05:44:15 +02:00
virtual void OnCalculate(int i, CommonHelper &commonHelper)
{
com = commonHelper;
}
2026-06-23 21:44:37 +02:00
virtual int OnInit(StructureLevels* levels_, EventBus &_eventBus)
2026-06-09 05:44:15 +02:00
{
2026-06-23 21:44:37 +02:00
levels = levels_;
2026-06-09 05:44:15 +02:00
eventBus = _eventBus;
return INIT_SUCCEEDED;
}
};
//+------------------------------------------------------------------+