本帖最后由 killnight 于 2015-6-28 16:15 编辑
我看到很多人的代码中都有print到底如何才能看到print打出的东西。软件帮助文档里说的不是很清楚。这对我很重要如果您知道,或者知道谁会请一定告诉我。
挂了好几天终于找到print的方法了。
[s:132]
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);
- }
|