mql5/Experts/Motivated/Chapters/Chapter2.mqh

64 lines
2.6 KiB
MQL5

2026-06-09 05:44:15 +02:00
//+------------------------------------------------------------------+
//| 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();
2026-06-23 21:44:37 +02:00
int OnInit(StructureLevels* levels_, string prefix_, ENUM_TIMEFRAMES tf_, CommonHelper &commonHelper) override;
2026-06-09 05:44:15 +02:00
void OnCalculate(int i, CommonHelper &commonHelper) override;
2026-06-23 21:44:37 +02:00
void SetEventBus(EventBus &_eventBus)
2026-06-09 05:44:15 +02:00
{
AbstractChapter::SetEventBus(_eventBus);
2026-06-23 21:44:37 +02:00
structureSystem.OnInit(levels, &_eventBus);
2026-06-09 05:44:15 +02:00
}
};
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
Chapter2::Chapter2()
{
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
Chapter2::~Chapter2()
{
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
2026-06-23 21:44:37 +02:00
int Chapter2:: OnInit(StructureLevels* levels_, string prefix_, ENUM_TIMEFRAMES tf_, CommonHelper &commonHelper)
2026-06-09 05:44:15 +02:00
{
2026-06-23 21:44:37 +02:00
return AbstractChapter::OnInit(levels_, prefix_, tf_, &commonHelper);
2026-06-09 05:44:15 +02:00
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void Chapter2::OnCalculate(int i, CommonHelper &commonHelper)
{
AbstractChapter::OnCalculate(i, &commonHelper);
structureSystem.OnCalculate(i, &commonHelper);
}
//+------------------------------------------------------------------+