下载MetaTrader 5
要添加评论,请登录注册
加快MQL5 Cloud Network的速度。安装策略测试代理!
虔诚2050
30
虔诚2050 2011.06.27 16:00 

//+------------------------------------------------------------------+
//| 我的交易.mq4 |
//| Copyright ?2011, MetaQuotes Software Corp. |
//| http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#property copyright "wenyun"
#property link "http://www.126.com/"
#include <WinUser32.mqh>
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
{
Print("you are the best No.1 init()");
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
Print("错误0:",GetLastError());
PlaySound("alert.wav");
Print("错误2:",GetLastError());
MessageBox("hello","world",MB_YESNO|MB_ICONQUESTION);
Print("错误1:",GetLastError());

Print("you are the best No.2 deinit()");
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
return(0);
}
//+------------------------------------------------------------------+

虔诚2050
30
虔诚2050 2011.06.27 16:01  

简化的代码如下:

#property copyright "wenyun"
#property link "http://www.126.com/"
#include <WinUser32.mqh>
int init()
{
Print("you are the best No.1 init()");
return(0);
}
int deinit()
{
Print("错误0:",GetLastError());
PlaySound("alert.wav");
Print("错误2:",GetLastError());
MessageBox("hello","world",MB_YESNO|MB_ICONQUESTION);
Print("错误1:",GetLastError());

Print("you are the best No.2 deinit()");
return(0);
}
int start()
{
return(0);
}
//+------------------------------------------------------------------+

虔诚2050
30
虔诚2050 2011.06.27 16:01  

简化的代码如下:

#property copyright "wenyun"
#property link "http://www.126.com/"
#include <WinUser32.mqh>
int init()
{
Print("you are the best No.1 init()");
return(0);
}
int deinit()
{
Print("错误0:",GetLastError());
PlaySound("alert.wav");
Print("错误2:",GetLastError());
MessageBox("hello","world",MB_YESNO|MB_ICONQUESTION);
Print("错误1:",GetLastError());

Print("you are the best No.2 deinit()");
return(0);
}
int start()
{
return(0);
}
//+------------------------------------------------------------------+

虔诚2050
30
虔诚2050 2011.06.27 16:03  

刚开始按F5编译,能跳出对话框和声音,后来就不行了。

虔诚2050
30
虔诚2050 2011.06.28 09:44  

为什么没人回答呢?

/
要添加评论,请登录注册