mql5/Experts/_Architecture/Events/EventBus/AbstractEvent.mqh
younglubah-gmail d258b1c6ec
2026-08-10 20:23:58 +02:00

45 lines
1.9 KiB
MQL5

//+------------------------------------------------------------------+
//| AbstractEvent.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 "EventTypes.mqh"
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
class AbstractEvent
{
protected:
datetime m_timestamp;
ENUM_TIMEFRAMES m_tf;
string m_symbol;
public:
AbstractEvent(string symbol, datetime timestamp, ENUM_TIMEFRAMES tf);
~AbstractEvent();
virtual EventType GetType() const = 0;
datetime GetTimestamp() const { return m_timestamp; }
ENUM_TIMEFRAMES GetTimeFrame() const {return m_tf;}
string GetSymbolName() const {return m_symbol;}
};
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
AbstractEvent::AbstractEvent(string symbol, datetime timestamp, ENUM_TIMEFRAMES tf):
m_timestamp(timestamp), m_tf(tf), m_symbol(symbol)
{
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
AbstractEvent::~AbstractEvent()
{
}
//+------------------------------------------------------------------+