错误、漏洞、问题 - 页 2426

 
Alexandr Gavrilin:

最新版本的metaeditor中的双倍字体到底是怎么了?在mt4和mt5中,它都写了一些废话,而不是-0.01。这些数字是怎么来的,在我的情况下,变量被重置为零。

我必须改变记忆。在旧版本中也是如此。

 

在相同的情况下,编译器的行为是不同的。

从kodobase下载了2个文件:https://www.mql5.com/en/code/15440

是在iTime()出现之前制作的,很明显。他们中的一个人在编译,另一个人在发誓。

这些功能是相同的。

呼叫也是如此。

骂人的原因很明显,可以理解,而且很容易通过自动更换来解决,但在类似情况下的不同行为却令人震惊。

PS。

编译后的指标工作正常。

Volume Profile + Range v6.0
Volume Profile + Range v6.0
  • www.mql5.com
Volume Profile + Range v6.0 (former TPO). Distribution of deals by price levels at a given time interval. Displayed as a histogram. The width of the histogram at the level means the number of transactions carried out on it. If a broker provides data on a real volume, the indicator is able to display distribution on it as well. VP: display...
 
Alexey Viktorov:

你必须更换内存。这在旧版本中是完全一样的。

什么记忆?记忆与它有什么关系?

 

我运行了以下代码。

 Temp.ask=0; Temp.bid=0; Temp.time=0;
 Print("Старт Ask=",Temp.ask," Bid=",Temp.bid," Time=",Temp.time);
 Print("Ответ SymbolInfoTick=", SymbolInfoTick("",Temp) );
 Print("Ask=",Temp.ask," Bid=",Temp.bid," Time=",Temp.time);

并得到了一个奇怪的结果。

Старт Ask=0.0 Bid=0.0 Time=1970.01.01 00:00:00
Ответ SymbolInfoTick=true
Ask=69.75 Bid=69.33 Time=2019.04.08 21:21:12

例如,SymbolInfoTick 的第一个参数等于"",出于某种原因,会返回图表符号的最后一个刻度,而不是假的和从零开始的一个刻度。尽管根据文档中的定义,它不应该是这样的。

bool  SymbolInfoTick( 
   string    symbol,     // символ 
   MqlTick&  tick        // ссылка на структуру 
   );
 
Igor Zakharov:

财产严格?

 
Alexandr Gavrilin:

最新版本的metaeditor中的双倍字体到底是怎么了?在mt4和mt5中,它都写了一些废话,而不是-0.01。这些数字是怎么来的? 我把变量设置为零。

这是从2007年开始的建设。

它一直是0.01,但现在我不明白了。


 
Andrei Trukhanovich:

财产严格?

在两者中是一样的。

我没有检查到符号(正如上面指出的--代码不是我的),但粗略一看,它们有95%是相同的。而区别并不在于错误出现的地方。但是,由于某些原因,一个可以编译,另一个却不能。我已经为自己解决了这个问题,但我要把这个奇怪的现象告知开发者。

 

这个错误似乎已经出现在MT5的最近版本中。

该错误是在CryptEncode()CryptDecode() 函数中。CRYPT_AES256转换方法的问题

你可以用这个脚本在最新的(2009)版本中重现这个错误。

//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
{
   string Txt = "The quick brown fox jumps over the lazy dog. A0 A1 A2 A3 A4 A5 A6 A7 A8 A9"; 

//---Key
   uchar Key[32];
   ArrayInitialize(Key, 3);

//---encode
   uchar SourceArr[], EncodedArr[];
   
   StringToCharArray(Txt, SourceArr); 
   
   int EncodeRes = CryptEncode(CRYPT_AES256, SourceArr, Key, EncodedArr);
   
//---decode
   uchar DecodedArr[];
   
   int DecodeRes = CryptDecode(CRYPT_AES256, EncodedArr, Key, DecodedArr);
   
   string DecodedTxt = CharArrayToString(DecodedArr);

//---res
   Print("Txt: ",Txt);
   Print("EncodeRes: ",EncodeRes);
   
   Print("DecodedTxt: ",DecodedTxt);
   Print("DecodeRes: ",DecodeRes);
   
//---
   return;
}
 
Marat Sultanov:

这个错误似乎已经出现在MT5的最近版本中。

该错误是在CryptEncode()CryptDecode() 函数中。CRYPT_AES256转换方法的问题

你可以用这个脚本重现上次(2009年)构建中的错误。

该修正很可能只在升级到新版本时出现。
 
Vitaly Muzichenko:

自2007年起在此建造

一直是0.01,现在不清楚了。


显示输出代码
原因: