错误、漏洞、问题 - 页 2656

 
Andrey Khatimlianskii:

请提供复制的细节。也许有人会感兴趣。根本就没有这种机会。

代码、工具、测试参数。

我已经在上面提到过2次这个工具了,如图所示。在MOEX股票部分的任何代码都会得到这个结果。任何设置也是如此,但股权只有在改变计算方法时才会正常显示。
 
Andrey Khatimlianskii:

请提供复制的细节。也许有人会感兴趣。根本就没有这种机会。

代码、工具、测试参数。




 

在没有dll 的情况下,以编程方式改变常规鼠标指针的能力是非常欠缺的。

或者只是能够禁用普通鼠标的渲染。

 

EventChartCustom()的帮助说。

斯帕拉姆

[in] 字符串类型的事件参数,传递给OnChartEvent函数。如果该字符串超过63个字符,则该字符串被截断。

然而,一个96个字符的长字符串被成功通过,是否有什么变化?

在这里,我对字符串进行了加密,并在事件中传递,成功解密,字符串没有像帮助中所说的那样被截断,这很好(第一个字符串被加密,然后是解密的)。

2020.02.26 14:36:10.949 iSpy (EURUSD,H1) 38CFD250C299F2420D5AFB1D070196F2F9246A164C2B1905C3921E466D6124306D836A2A09D4A06DD4B02FBDD1DE6857

2020.02.26 14:36:10.949 iSpy (EURUSD,H1) EURUSD:1.08753:1.0875:0.0:1582716971862:0.0

2020.02.26 14:36:16.391 iSpy (EURUSD,H1) 2588EC84729FA3BFE07B09BCB13832AF026A4F9DEA5634477EFF2C1FCAC355A35A67EDC5D5A8621570D3EBF80A7A942A

2020.02.26 14:36:16.391 iSpy (EURUSD,H1) EURUSD:1.08752:1.08749:0.0:1582716977068:0.0


现实中能在事件中传输的字符串有多长而不被截断?


 
Andrey Dik:

EventChartCustom()的帮助说。

斯帕拉姆

[in] 字符串类型的事件参数,传递给OnChartEvent函数。如果该字符串超过63个字符,则该字符串被截断。

然而,一个长度为96个字符的字符串被成功传递,是否有什么变化?

128字节。这是127个Uchar-characters,或63个ushort-characters。

 

如何在MQL中实现这样的事情。

#include <Controls\Button.mqh>

  class Collection
  {
    protected:
      int size;

    public:
      Collection(CWnd &refs[]) { size = ArraySize(refs); }
  };


void OnStart()
{
  CButton buttons[];
  CWnd wnd[];
  Collection data1(wnd);     // ok
  Collection data2(buttons); // error
  // 'buttons' - parameter conversion not allowed
  // 'buttons' - variable of the same type expected
}
?
 
fxsaber :

128字节。这是127个Uchar字符,或63个ushort字符。

这实际上是160个字节。


附加的文件:
 
Stanislav Korotky:

如何在MQL中实现这样的事情。

?
从CWnd继承CButtons
或者它们是标准库类的对象
如果它们中的每一个都是从一个CObject继承的,那么。
Collection(CObject &refs[]) { size = ArraySize(refs); }
 

亲爱的开发者,是否有可能以某种方式改变UTM标签?


或者你能把标签按顺序排列吗?

utm_campaign=mt4terminal

utm_source=properties.indicator

utm_medium=指标名称

utm_term=indicatorVersion

utm_content=Year


现在的UTM标签没有信息...

Finteza panel: website analytics and advertising management
Finteza panel: website analytics and advertising management
  • panel.finteza.com
Real-time unsampled analytical data, traffic attribution and quality evaluation, creation of conversion funnels and targeted advertising in apps and websites
 
Artyom Trishkin:
从CWnd继承CButtons
还是说它们是标准的库类对象
如果它们中的每一个都是从CObject继承的,那么。

问题就在这里,类树有一个共同的节点CWnd(CObject比较远,一般在根部)。

CButton -> CWndObj -> CWnd -> CObject。

如果你把方法中的参数改为CObject,你会得到2倍的错误。

'wnd' - parameter conversion not allowed
'wnd' - variable of the same type expected
'buttons' - parameter conversion not allowed
'buttons' - variable of the same type expected

类似的类层次结构适用于非数组的情况。以下是编译后的代码。

#include <Controls\Button.mqh>

  class Collection
  {
    protected:
      int size;

    public:
      Collection(CWnd &object) { size = 1; }
  };


void OnStart()
{
  CButton button1;
  CWnd wnd1;
  Collection data1(wnd1);     // ok
  Collection data2(button1);  // ok
}

问题是如何让它对阵列也起作用?

我知道模板有帮助,但我只想避免它。

IMHO,它应该通过继承权在没有模板的情况下工作。

我像在C++中一样检查了它。

class CWnd
{
  public:
    int x;
    CWnd(int _x = 0): x(_x){}
};
class CButton: public CWnd
{
  public:
    CButton(): CWnd(10) {}
};

class Collection
{
  public:
    Collection(CWnd (&ptrs)[1]) { cout << ptrs[0].x; }
};


int main()
{
  CButton buttons[1];
  CWnd wnd[1];
  Collection data1(wnd);
  Collection data2((CWnd (&)[1]) buttons);
  return 0;
}

它是有效的。但MQL在有索引和无索引的情况下都不会消化它。