Files

51 lines
4.0 KiB
Plaintext
Raw Permalink Normal View History

2018-06-23 11:25:42 +02:00
//+------------------------------------------------------------------+
//| Expert.mq5 |
//| Copyright 2015, Vasiliy Sokolov. |
//| http://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2015, Vasiliy Sokolov."
#property link "http://www.mql5.com"
#property version "1.00"
#include "Strategy.mqh"
CStrategy Agent;
//+------------------------------------------------------------------+
//| Expert initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
EventSetTimer(5);
MarketBookAdd(Symbol());
MarketBookAdd("Si-12.15");
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Expert deinitialization function |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
EventKillTimer();
}
//+------------------------------------------------------------------+
//| Expert tick function |
//+------------------------------------------------------------------+
void OnTick()
{
Agent.OnTick();
}
//+------------------------------------------------------------------+
//| Timer function |
//+------------------------------------------------------------------+
void OnTimer()
{
Agent.OnTimer();
}
//+------------------------------------------------------------------+
//| BookEvent function |
//+------------------------------------------------------------------+
void OnBookEvent(const string &symbol)
{
Agent.OnBookEvent(symbol);
}
//+------------------------------------------------------------------+