71 lines
2.8 KiB
MQL5
71 lines
2.8 KiB
MQL5
//+------------------------------------------------------------------+
|
|
//| TradingCenter.mqh |
|
|
//| Thorsten Fischer Copyright 2020 |
|
|
//| https://mql5.tfsystem.de |
|
|
//+------------------------------------------------------------------+
|
|
#property copyright "Thorsten Fischer Copyright 2020"
|
|
#property link "https://mql5.tfsystem.de"
|
|
#property version "1.00"
|
|
#property strict
|
|
//---
|
|
#include "..\..\TF-Dateien\TF-Class\TFObject.mqh"
|
|
#include "TFGUI.mqh"
|
|
|
|
//+------------------------------------------------------------------+
|
|
//| |
|
|
//+------------------------------------------------------------------+
|
|
class CTradingCenter : public CTFObject
|
|
{
|
|
private:
|
|
CTFGUI m_tfgui;
|
|
|
|
public:
|
|
CTradingCenter();
|
|
~CTradingCenter();
|
|
//---
|
|
virtual bool OnInitEvent(void);
|
|
virtual void OnDeInitEvent(const int aReason=0);
|
|
virtual void ChartEvent(const int id,const long &lparam,const double &dparam,const string &sparam);
|
|
virtual void OnTickEvent(void) {}
|
|
};
|
|
//+------------------------------------------------------------------+
|
|
//| |
|
|
//+------------------------------------------------------------------+
|
|
CTradingCenter::CTradingCenter()
|
|
{
|
|
}
|
|
//+------------------------------------------------------------------+
|
|
//| |
|
|
//+------------------------------------------------------------------+
|
|
CTradingCenter::~CTradingCenter()
|
|
{
|
|
}
|
|
//+------------------------------------------------------------------+
|
|
//| |
|
|
//+------------------------------------------------------------------+
|
|
bool CTradingCenter::OnInitEvent(void)
|
|
{
|
|
//---
|
|
if(!m_tfgui.OnInitEvent()) return(false);
|
|
//---
|
|
return(true);
|
|
}
|
|
//+------------------------------------------------------------------+
|
|
//| |
|
|
//+------------------------------------------------------------------+
|
|
void CTradingCenter::OnDeInitEvent(const int aReason=0)
|
|
{
|
|
//---
|
|
m_tfgui.OnDeInitEvent(aReason);
|
|
//---
|
|
CTFObject::OnDeInitEvent(aReason);
|
|
}
|
|
//+------------------------------------------------------------------+
|
|
//| |
|
|
//+------------------------------------------------------------------+
|
|
void CTradingCenter::ChartEvent(const int id,const long &lparam,const double &dparam,const string &sparam)
|
|
{
|
|
//---
|
|
m_tfgui.ChartEvent(id,lparam,dparam,sparam);
|
|
}
|
|
//+------------------------------------------------------------------+
|