62 lines
5.1 KiB
MQL5
62 lines
5.1 KiB
MQL5
//+------------------------------------------------------------------+
|
|
//| TestLibrary.mq5 |
|
|
//| Copyright 2015, MetaQuotes Software Corp. |
|
|
//| http://www.mql5.com |
|
|
//+------------------------------------------------------------------+
|
|
#property copyright "2015, MetaQuotes Software Corp."
|
|
#property link "http://www.mql5.com"
|
|
//--- Including the trading panel class
|
|
#include "Program.mqh"
|
|
CProgram program;
|
|
//+------------------------------------------------------------------+
|
|
//| Expert initialization function |
|
|
//+------------------------------------------------------------------+
|
|
int OnInit(void)
|
|
{
|
|
program.OnInitEvent();
|
|
//--- Set the trading panel
|
|
if(!program.CreateTradePanel())
|
|
{
|
|
::Print(__FUNCTION__," > Failed to create graphical interface!");
|
|
return(INIT_FAILED);
|
|
}
|
|
//--- Initialization successful
|
|
return(INIT_SUCCEEDED);
|
|
}
|
|
//+------------------------------------------------------------------+
|
|
//| Expert deinitialization function |
|
|
//+------------------------------------------------------------------+
|
|
void OnDeinit(const int reason)
|
|
{
|
|
program.OnDeinitEvent(reason);
|
|
}
|
|
//+------------------------------------------------------------------+
|
|
//| Expert tick function |
|
|
//+------------------------------------------------------------------+
|
|
void OnTick(void)
|
|
{
|
|
}
|
|
//+------------------------------------------------------------------+
|
|
//| Timer function |
|
|
//+------------------------------------------------------------------+
|
|
void OnTimer(void)
|
|
{
|
|
program.OnTimerEvent();
|
|
}
|
|
//+------------------------------------------------------------------+
|
|
//| Trade function |
|
|
//+------------------------------------------------------------------+
|
|
void OnTrade(void)
|
|
{
|
|
}
|
|
//+------------------------------------------------------------------+
|
|
//| ChartEvent function |
|
|
//+------------------------------------------------------------------+
|
|
void OnChartEvent(const int id,
|
|
const long &lparam,
|
|
const double &dparam,
|
|
const string &sparam)
|
|
{
|
|
program.ChartEvent(id,lparam,dparam,sparam);
|
|
}
|
|
//+------------------------------------------------------------------+
|