Errors, bugs, questions - page 1959

 
What is the difference between the two lines?
void OnStart()
{
  int i1 = (1 / 2) ? 1 : 0; // expression not boolean
  int i2 = (0) ? 1 : 0;     // no problem
}
 

By editor.

  • If a class is defined inside a method, the editor mistakenly shows methods of that class in the function list (ALT+M).
  • How can the editor tell which function/method the cursor is now inside?
  • If you type the following line in the Metaeditor
    DoubleToString(GetMicro
    GetMicrosecondCount tooltip (or what is it called correctly?) does not appear.


  • When a tooltip with options appears, it is not possible to move down the list by pressing the UP key. The list is not looped, which is wrong.
 

When closing a chart with an EA running on it by hand, please give confirmation of the action. It is now very easy to accidentally close a chart with an EA.

 

If a long time ago there were trades made on a symbol that is now NOT in the Market Watch (including the hidden part), where does the terminal get the Digits data for these symbols when displaying these trades?

 
Is it possible to make StringReplace easier/more logical to use?
int  StringReplace( 
   string&         str,              // строка, в которой будет осуществляться замена 
   const string    find,             // искомая подстрока 
   const string    replacement,      // подстрока, которая будет вставлена в найденные места 
   const uint Amount = 0             // Максимальное количество замен, 0 - все меняем.
   );

For example, if we know that the string to be replaced occurs only once, why waste computational resources searching after the first replacement?

 

When running Optimisation, please highlight the Log tab in case of an error. Now you have to guess whether an optimisation error has occurred or whether Optimisation is taking a long time to run. You won't know until you look at the logbook yourself. The user should be notified at once if there is an error.

 
Tester bug
void OnInit()
{
  ExpertRemove();

  Print((bool)_StopFlag); // Реал - true, тестер - false
}
 
_StopFlag and IsStopped() are not bools. Correct the Help.
void OnStart()
{
  Print(_StopFlag);   // 0
  Print(IsStopped()); // 0
  
  bool StopFlag = _StopFlag;
  
  Print(StopFlag); // false
}
 

In the tester, when withdrawing money, it is not possible to set a comment. Please add

bool  TesterWithdrawal( 
   double money      // размер снимаемой суммы 
   const string Comment = "withdrawal"
   );
 

In the tester with local agents only, I get this message

Tester  debug version of "fxsaber\Test.ex5" detected
Tester  debug version of "MQL5\Experts\fxsaber\Test.ex5" can be optimized on local agents only, no Cloud, no Farm
Tester  OnTesterInit works too long...
Tester  OnTesterInit works too long...

Clearly a bug.

Reason: