Errors, bugs, questions - page 513

 
Neofit:
Silly of me to say so, in fact, I understand that if I've already expanded a dynamic array to 302, I can access any element from 0 to 301 without ArrayResize.
Well, that's fine then :)
 
pusheax:

A glitch in the strategy tester.

It suddenly stops and all local and remote agents have the message finished and so hangs.

Can you tell me how to run it further, sorry time to start all over again?

Disable some of the agents.

This problem has already been fixed, wait for the next build

 
Can you tell me if theOBJPROP_ZORDER propertydoes not apply to orders behind objects? A click on the object brings up the order window. I remember the problem has already been voiced more than once. Will it be solved?
 
It's been voiced more than once. I've been banging on about it for two months now at Service Desk. claim #182300
 

The SymbolInfoInteger() function returns incorrect property type, namely:

 int digits = SymbolInfoInteger(Symbol(),SYMBOL_DIGITS); 

I want to get the number of decimal places, but it swears, like:possible loss of data due to type conversion

I am type conversion, but according to the description it should return int , in short, it returns long

I need to normalize the value and put into the function exactly int here:

  double test = NormalizeDouble(1.645645646456456456,digits); 
_Digits works fine, but it doesn't work for me.

like this:

NormalizeDouble(1.645645646456456456,SymbolInfoInteger(Symbol(),SYMBOL_DIGITS));

The result is the same.

Please do not kick me if anything ) Am I the only one who has such a bug ?

 
kosuhin:

The SymbolInfoInteger() function returns incorrect property type, namely:

I want to get the number of decimal places, but it says something like:possible loss of data due to type conversion

The SymbolInfoInteger() function always returns long type, even though the real property values can be of any integer type. You have to convert the result of the function to the target type yourself.

 
Rosh:

The SymbolInfoInteger() function always returns the long type, although real property values can be of any integer type. You have to convert the result of the function to the target type yourself.

Thank you, I got it. The only thing I'm not clear about is what I should do in this particular case. Don't pay attention to the compiler's warning?

If not, how should I convert long to int I do not understand? If you can please give me an example of what I should do in this case.

I am writing an EA for a championship, will it be considered as an error in the code or not ? Basically everything works fine, only the compiler gives me a warning.

 
kosuhin:

If not, how do I convert long to int ? If you can please give me an example of what I should do in this case

Like this, for example:

int digits = (int)SymbolInfoInteger(Symbol(),SYMBOL_DIGITS); 

Note. A warning is not an error message. It is just to shake up the programmer.

Note 2: See type casting, explicit and implicit.

 
Yedelkin:

Like this, for example:

Note. A warning is not an error message. It is to shake up the programmer.

Note 2: See "Type conversion", explicit and implicit.

Thanks Yedelkin, I knew the truth is somewhere near! The log is clean now )

"Type conversion" didn't even see it before )

 
IE6 doesn't allow pictures, links, videos, etc. to be inserted on this site. I.e. there is no button bar when entering a post. And when replying there is no quote of the original post. If you click "Edit", it also doesn't copy the corrected message into the edit window.
MQL5.community - Памятка пользователя
MQL5.community - Памятка пользователя
  • 2010.02.23
  • MetaQuotes Software Corp.
  • www.mql5.com
Вы недавно зарегистрировались и у вас возникли вопросы: Как вставить картинку в сообщение на форуме, как красиво оформить исходный код MQL5, где находятся ваши Личные сообщения? В этой статье мы подготовили для вас несколько практических советов, которые помогут быстрее освоиться на сайте MQL5.community и позволят в полной мере воспользоваться доступными функциональными возможностями.
Reason: