错误、漏洞、问题 - 页 2994

 
Alexandr Bryzgalov:

该参考文献没有正确说明参数的顺序。


你的证据是什么?

 
Vladimir Karputov:

你的证据是什么?

/

 
Vladimir Karputov:

你的证据是什么?

不,没有任何错误。

我对这个命令本身感到困惑。而事实上,它不接受0,它总是想要一个变量。


 
Alexandr Bryzgalov:

不,没有任何错误。

秩序本身是混乱的。而且,它不取0,它必然需要一个变量。

这就是帮助中所说的--它需要一个VARIABLE

   int&           sub_window,   // The number of the subwindow 
 
Vladimir Karputov:

概况介绍中就是这么说的--需要变量

 

朋友们,在这里帮帮我吧。我完全不明白发生了什么事。

#property indicator_chart_window
#property indicator_plots 0

int                      ma_handle;
bool FirstStart;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
   if(ChartPeriod()!=PERIOD_M1)
     {
      ChartSetSymbolPeriod(0,_Symbol,PERIOD_M1);
     }
   ma_handle=iCustom(Symbol(),PERIOD_H1,"Indicator For Search Data");
   FirstStart = true;
   return(INIT_SUCCEEDED);
  }

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
   ulong tmpTimeCopy = GetMicrosecondCount();
   if(FirstStart)
     {
      double tmp[];
      datetime DateStart=D'2018.07.19', DateEnd=D'2021.01.19 23:59:59';
      int DataCopy=-1;
      while(true)
        {
         DataCopy=CopyBuffer(ma_handle,0,DateStart,DateEnd,tmp);
         if(DataCopy<0)
            Print("Return");
         else
           {
            IndicatorRelease(ma_handle);
            FirstStart=false;
           }
         if(!FirstStart)
            break;
        }
      Print("Time Copy Buffer: ", GetMicrosecondCount() - tmpTimeCopy);
      Print("Data to Copy: ", DataCopy, " ", tmp[0], " ", tmp[1], " ", tmp[2], " ", tmp[3], " ", tmp[4]);
      Print(datetime(tmp[0])," ",datetime(tmp[1])," ",datetime(tmp[ArraySize(tmp)-1]));

     }
   return(rates_total);
  }

这里是整个指标。当它启动时,它开始给出

屏幕截图

为什么如此乐观。如果我按下暂停或停止,我仍然在工具箱窗口的专家顾问选项卡中得到数值。有指标的窗口已经关闭,但数值却成功显示。

这种情况是如何发生的?谁能解释一些事情?

 
ROMAN KIVERIN:

朋友们,在这里帮帮我吧。我完全不明白发生了什么事。

这里是整个指标。当它启动时,它开始给出

为什么如此乐观。如果我按下暂停或停止,我仍然在工具箱窗口的专家顾问选项卡中得到数值。有指标的窗口已经关闭,但数值却成功显示。

这种情况是如何发生的?谁能解释一下?

谁说 CopyBuffer()至少会成功一次?

谁说 iCustom()会成功?

"错误会形成循环。其中最顽固的是无限的"。错误理论。
 

自上次更新以来,EnumToString 函数不能正确工作,这取决于被调用的代码Enum_ 的单独调用并没有重现这个错误

template<typename T>

int Enum_(T enum_value)
  {
   ...
         s1=EnumToString(T(i1));

   ...

   }

在调试器中。

GetLastError 返回。

err_invalid_parameter。

4003

调用系统函数时出现错误的参数

 

来自MT4杂志的帮助副本

sell 0.20 CL-MAY21 at 59.36 sl: 0.00 tp: 0.00 -> sl: 0.00 tp: 58.00
14:07:13.521 Trade: '50223437': order #5595882 sell 0.20 CL-MAY21 at 59.36 was modified -> sl: 0.00 tp: 58.00
15:56:34.215 Startup: MetaTrader 4 for Android
15:56:34.223 Startup: Copyright 2001-2021, MetaQuotes Software Corp.
15:56:34.223 Startup:
15:56:34.223 Startup: Device: samsung a41 (QP1A.190711.020.A415FXXU1BUC3) 10(REL) 29SDK
15:56:34.223 Startup: Kernel: 4.14.141-20194519
15:56:34.239 Terminal: Native library initialized. Version 400 Build 1334
15:56:34.259 Chat: initialization success
15:57:43.276 Terminal: Codepage for current language (ru_RU) is 'CP1251'
15:57:43.277 Terminal: Using 'windows-1251' for server strings
15:57:43.284 Terminal: Terminal instance created
15:57:43.641 Terminal: Connecting to PinedaIntl-Trader through 'Main'
15:57:43.793 Terminal: Connected to PinedaIntl-Trader through Main
15:57:43.993 Chat: connected to msg.mql5.com:443
15:57:44.088 Network: '50223437': login successfull [connection type: unknown]
15:58:02.749 GL: Texture size: 256x256
15:59:35.745 Trade: '50223437': modify order #5595882 sell 0.20 CL-MAY21 at 54.19 sl: 0.00 tp: 58.00 -> sl: 0.00 tp: 52.0015:59:36.073 Trade: '50223437': order #5595882

怎么会这样

 
JRandomTrader:

谁说 CopyBuffer()会成功?

谁说 iCustom()会成功?

"错误会形成循环。其中最顽固的是无限的"。错误理论。

有趣的是,这个函数被成功执行。它被执行并产生价值。此后,终端只进入了一个不可理解的状态。

iCustom()函数也被成功执行。