Errors, bugs, questions - page 169

 

papaklass:
Я думаю, что компилятор не обладает искуссвенным интелектом. Скорее всего он отслеживает инициализацию по блокам и подразумевает, что если есть обращение к переменной, то она должна быть инициализирована. Компилятор не проверяет логику кода, т.е. в Вашем случае компилятор предполагает, что если есть в коде какое-либо условие, то оно рано или поздно должно выполниться. Он не может догадаться, что этот блок выполнится только тогда, когда инициализации будет сделана.  

... This is what you wrote about in your previous posts.

It wasn't me who wrote it, I was pointing out that the compiler does not check the code logic and cannot guess that a particular block will be executed only when initialization is done (in your words). The compiler just assumes that if there is any uninitialized variable in code, it will be used sooner or later. And the point of my posts is that sometimes, unlike Renate's categorical statement, this assumption may not come true.

So, to avoid such errors, always initialize your variables.

As you have seen, the example above shows that this warning does not always mean an error, that's all.

 

In the latest build, the forward analysis does not work:

 
Erm955:

In the latest build, the forward analysis does not work:

Thank you for the message. Will be fixed in the next build.
 

Some indicators may not use indicator buffers.

If you don't specify #property indicator_buffers directive, you will get a compiler warning: no indicator plot defined for indicator

At the same time, specifying the number of buffers equal to zero is not allowed. This situation could be somehow corrected - the message could be either removed or the null number of buffers could be permitted.

It is in build 344.


Документация по MQL5: Стандартные константы, перечисления и структуры / Коды ошибок и предупреждений / Предупреждения компилятора
Документация по MQL5: Стандартные константы, перечисления и структуры / Коды ошибок и предупреждений / Предупреждения компилятора
  • www.mql5.com
Стандартные константы, перечисления и структуры / Коды ошибок и предупреждений / Предупреждения компилятора - Документация по MQL5
 
Why does the debugger only work inside OnInit() ?
 
fellow:
Why does the debugger only work inside OnInit() ?
Everything seems to work fine. Just now checked, not only everything in Expert Advisor is OK, but also in modules with objects...
 
fellow:
Why does the debugger only work inside OnInit() ?

And from oninit comes out with what result?

Maybe the output has a non-zero result, that's why the debugging stops.

 

To the developers.

Can the sl close be coloured red (or any other colour of your choice) in the deal history along with the so close?

PS

I would also like to get negative amounts colored red in the "profit" column (amounts of withdrawals and losing trades)...

 
Interesting:

To the developers.

Can the sl close be coloured red (or any other colour of your choice) in the deal history along with the so close?

PS

I would also like to get negative amounts colored red in the "profit" column (amounts of withdrawals and losing trades)...


support
 

I wonder why four OnTrade events occur when a position is closed?

Isn't that a lot?

Reason: