客服热线:18391752892

如何使用print终于解决了

   日期:2019-01-12     浏览:741    
马上注册,结交更多好友,下载更多资源

您需要 登录 才可以下载或查看,没有帐号?注册 本帖最后由 killnight 于 2015-6-28 16:15 编辑
我看到很多人的代码中都有print到底如何才能看到print打出的东西。软件帮助文档里说的不是很清楚。这对我很重要如果您知道,或者知道谁会请一定告诉我。
挂了好几天终于找到print的方法了。

http://ea.whyhui.com/thread-11923-1-1.html
请参考taylor的帖子
但是这种方法已经过时。print的内容还是会在哪里显示,不过有条件。
于是我做了个测试EA//+------------------------------------------------------------------+
//|                                      testEA.mq4 |
//|                       Killnight a coder on breadline |
//|                               https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright Killnight a coder on breadline
#property link      https://www.mql5.com
#property version    1.00
#property strict
//+------------------------------------------------------------------+
//| Expert initialization function                       |
//+------------------------------------------------------------------+
int onInit()
 {
//--- create timer
   EventSetTimer(60);
     
     Print( hello onInit
//---
   return(INIT_SUCCEEDED);
 }
//+------------------------------------------------------------------+
//| Expert deinitialization function                       |
//+------------------------------------------------------------------+
void onDeinit(const int reason)
 {
 
 Print( hello onDeinit
//--- destroy timer
   EventKillTimer();
     
 }
//+------------------------------------------------------------------+
//| Expert tick function                               |
//+------------------------------------------------------------------+
void onTick()
 {
//---

Print( hello ontick
   
 }
//+------------------------------------------------------------------+
//| Timer function                                   |
//+------------------------------------------------------------------+
void onTimer()
 {
//---
   Print( hello onTimer
 }
//+------------------------------------------------------------------+
//| Tester function                                 |
//+------------------------------------------------------------------+
double onTester()
 {
//---
   double ret=0.0;
   
   Print( hello onTester
//---

//---
   return(ret);
 }
//+------------------------------------------------------------------+
//| ChartEvent function                                |
//+------------------------------------------------------------------+
void onChartEvent(const int id,
             const long lparam,
             const double dparam,
             const string sparam)
 {
//---
Print( hello onCharEvent    
 }
//+------------------------------------------------------------------+

int start()
{
Print( hello start
return(0);
}
复制代码结论:有4个部分的print 可以显示
1. onInit 2.onDeinit 3.onTimer 4.OnChartEvent

外汇交易有很大的风险性,本站所有资源均来自网络,请选择使用,如若出现亏损,本站不承担任何责任!


特别提示:本信息由相关企业自行提供,真实性未证实,仅供参考。请谨慎采用,风险自负。


0相关评论
相关行情
推荐行情
点击排行