#property copyright "Copyright © 2009, MetaQuotes Software Corp."
#property link "https://www.metaquotes.net"
//+------------------------------------------------------------------+
//| 专家初始化函数 |
//+------------------------------------------------------------------+
void OnInit()
{
//--- EA交易初始化输出信息示例
Print(" __MQLBUILD__ = ",__MQLBUILD__," __FILE__ = ",__FILE__);
//--- 设置定时器事件间的间隔
EventSetTimer(5);
//---
}
//+------------------------------------------------------------------+
//| 专家无法初始化函数 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
//--- EA交易无法初始化输出信息示例
Print(" __MQLBUILD__ = ",__MQLBUILD__," __FILE__ = ",__FILE__);
//---
}
//+------------------------------------------------------------------+
//| 专家订单号函数 |
//+------------------------------------------------------------------+
void OnTick()
{
//--- 订单收据输出信息
Print(" __MQLBUILD__ = ",__MQLBUILD__," __FILE__ = ",__FILE__);
Print(" __MQLBUILD__ = ",__MQLBUILD__," __FILE__ = ",__FILE__);
test1(__FUNCTION__);
test2();
//---
}
//+------------------------------------------------------------------+
//| test1 |
//+------------------------------------------------------------------+
void test1(string par)
{
//--- 函数内部信息输出
Print(" __FUNCTION__ = ",__FUNCTION__," __LINE__ = ",__LINE__," par=",par);
}
//+------------------------------------------------------------------+
//| test2 |
//+------------------------------------------------------------------+
void test2()
{
//--- 函数内部信息输出
Print(" __MQLBUILD__ = ",__MQLBUILD__," __FILE__ = ",__FILE__);
}
//+------------------------------------------------------------------+
//| OnTimer event handler |
//+------------------------------------------------------------------+
void OnTimer()
{
//---
Print(" __MQLBUILD__ = ",__MQLBUILD__," __FILE__ = ",__FILE__);
test1(__FUNCTION__);
}
|