97 lines
3.4 KiB
MQL5
97 lines
3.4 KiB
MQL5
//+------------------------------------------------------------------+
| |
//| _includeEa.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 <Mql5Book\ExpertAdvisor.mqh>
| |
#include "SystemEngine.mqh"
| |
| |
System smcSystem;
| |
class _includeEa: public ExpertAdvisor {
| |
| |
private:
| |
| |
public:
| |
_includeEa(const EAConfig &config);
| |
~_includeEa();
| |
| |
void Enable() {
| |
cfg.enabled = true;
| |
}
| |
void Disable() {
| |
cfg.enabled = false;
| |
}
| |
bool IsEnabled() const {
| |
return cfg.enabled;
| |
}
| |
| |
virtual int OnInit();
| |
virtual void OnTick();
| |
};
| |
//+------------------------------------------------------------------+
| |
//| |
| |
//+------------------------------------------------------------------+
| |
_includeEa::_includeEa(const EAConfig &config) : ExpertAdvisor(config) {
| |
}
| |
//+------------------------------------------------------------------+
| |
//| |
| |
//+------------------------------------------------------------------+
| |
_includeEa::~_includeEa() {
| |
}
| |
//+------------------------------------------------------------------+
| |
//| |
| |
//+------------------------------------------------------------------+
| |
int _includeEa::OnInit() {
| |
| |
smcSystem.OnInit( Config().name, Config().timeframe);
| |
| |
return INIT_SUCCEEDED;
| |
}
| |
| |
//+------------------------------------------------------------------+
| |
//| |
| |
//+------------------------------------------------------------------+
| |
void _includeEa::OnTick() {
| |
smcSystem.OnCalculate();
| |
}
| |
//+------------------------------------------------------------------+
| |
/**
| |
//+------------------------------------------------------------------+
| |
//| _includeEa.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 <Mql5Book\ExpertAdvisor.mqh>
| |
| |
class _includeEa: public ExpertAdvisor {
| |
| |
private:
| |
| |
public:
| |
_includeEa(const EAConfig &config);
| |
~_includeEa();
| |
};
| |
//+------------------------------------------------------------------+
| |
//| |
| |
//+------------------------------------------------------------------+
| |
_includeEa::_includeEa(const EAConfig &config) : ExpertAdvisor(config) {
| |
}
| |
//+------------------------------------------------------------------+
| |
//| |
| |
//+------------------------------------------------------------------+
| |
_includeEa::~_includeEa() {
| |
}
| |
//+------------------------------------------------------------------+
| |
| |
//+------------------------------------------------------------------+
| |
| |
*/
| |
//+------------------------------------------------------------------+
|