Errors, bugs, questions - page 166

 
Renat:

Cybernet?

Laptops now live their lives under their own resource managers (Windows settings are secondary), rising from sleep/hybernet instantly. I'm judging from my own machines.

Something tells me there's something wrong here. My laptop can't get out of the gyber with a swipe of the mouse either. Never mind, I'll try it again. It doesn't play that easily.

If it does, it'll be through Service Desk.

 
Erm955:

Something tells me there's something wrong here. My laptop can't get out of the gyber with a swipe of the mouse either. Never mind, I'll try it again. It's not that easy to reproduce.

Why complicate your life? Look in the events of the operating system for starters, that's how it goes to sleep:


 
AlexSTAL:

Why complicate your life? Look into the events of the operating system for a start, this is how it transitions to sleep:


I ran through the log, but now I can't remember the point in time when the error popped up. It doesn't necessarily go to sleep. Probably better to wait until the bug recurs and go to the log immediately, otherwise I have to dig through everything.

 
vesel:

A bug when working with text.

When copying text with combination (Ctrl + left mouse button) font is always Arial, although in properties it is other.

Press again properties, parameters, where font, click ok, then it changes.

The same bug, there is also when working with the text label and drawing graphics (not saved date scale parameters, i.e. no checkmark, but the scale is, click ok, and then changes )

Please fix it.

Thanks for the message. Will be fixed.
 

What is this warning "sign mismatch" ?
there are two such blocks and two warnings for the whole EA (CountTry is an EA variable)

         ExitMain = 0;
         while (nExitMain < CountTry)
          {

           ....

          } 

What is this warning: "possible use of uninitialized variable"?

wherever variables are initialized in the case structure this warning comes out I have 10 warnings about nothing ....

   switch(pType)
     {
      case 0:
         MainPrice = ....;
         break;

      case 1:
         MainPrice = ....;
         break;
     }
   if(MainPrice > .. )
     {
      ....

     } 

 

sign mismatch - most likely mixing signed and unsigned integer.

uninitialized variable - means that the variable is guaranteed to have a pass-through branch when it is uninitialized. for example, default is explicitly omitted in switch, in which MainPrice should be explicitly initialized (or explicitly zeroed out when declared).

 
Renat:

sign mismatch - most likely mixing sign and unsigned integer.

uninitialized variable - means that a variable is guaranteed to have a pass-through branch when it's uninitialized. e.g., default is explicitly omitted in switch, where MainPrice should be explicitly initialized (or zeroed out when declaring).


Thank you, all the warnings are gone.

1 sign mismatch - that was a signed and unsigned integer

2 uninitialized variable - but I just initialized in switch either buy - 0 or sell -1 depending on position type and default is not needed...

Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства позиций
Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства позиций
  • www.mql5.com
Стандартные константы, перечисления и структуры / Торговые константы / Свойства позиций - Документация по MQL5
 
Konstantin83:

2 uninitialized variable - but I just initialized in switch either buy - 0 or sell -1 depending on position type and default is sort of unnecessary...

In human terms, this is "kind of unnecessary". In reality, it is very necessary when it comes to writing error-proof programs.

The MQL5 compiler becomes more powerful with every build, catching serious errors in traders' programs. Not every commercial C++ compiler is able to trace all the chains of variable initialization and give a warning.

 
Renat:

In human terms, this is "kind of unnecessary". But in reality it is very necessary when it comes to writing error-proof programs.

The MQL5 compiler becomes more powerful with every build, catching serious errors in traders' programs. Not every commercial C++ compiler is able to trace all chains of variable initialization and display a warning.

I don't argue, but in my case, I know that there will be two variants of events and I initialize them depending on that...

And so it's a great thing... e.g. found a couple of variables that were not used in EA)

 
notused:

Here's a glitch noticed (under investor password, build 342):

It didn't work (although it's probably just a GUI glitch)

https://www.mql5.com/ru/forum/1111/page159/#comment_28838

In 344 it stays that way.

Also, I'd like a comment on off_quotes after weekends, which OrderCheck doesn't catch - is this necessary or can it be fixed?

Reason: