Errors, bugs, questions - page 2611

 
RickD:

There are no folders in the tester for Expert Advisors either. But MQLInfoString(MQL_PROGRAM_NAME) returns the same value when testing an Expert Advisor.

And I need the same value to associate the version under test with the version on the chart using named channels.

Fixed by
 
 

I am running the EA in debug mode. I need to make a breakpoint at the exact moment when I manually unchart the EA. How do I do that?


The matter is that the Terminal hangs permanently when I remove the EA. I need to understand where it happens.

 
fxsaber:

I run the EA in debug mode. I need to make a breakpoint at the exact moment when I manually unchart the EA. How do I do that?

I wrote the following code:

int OnInit()
  {
     if(IsStopped()) DeInitEA(1);
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
   if(IsStopped()) DeInitEA(2);

  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
   if(IsStopped()) DeInitEA(3);
  }
//+------------------------------------------------------------------+

void DeInitEA(const int callfunc)
{
   string s = "";
   switch (callfunc)
   {
      case 1: s = "OnInit"; break;
      case 2: s = "OnDeinit"; break;
      case 3: s = "OnTick"; break;
   }
   Print(s + " , остановка работы советника");
   
}

set breakpoint on string s = ""; - returned to ME without problems, debugging windows appeared, well, everything is as usual

 

First they cut the stats and now they've killed them altogether?


 
Igor Makanu:

wrote the following code:

set breakpoint on string s = ""; - returned to ME without problems, debugging windows appeared, well, everything as usual

With this approach we have to put a breakpoint check after each operator. It doesn't fit.

 
TheXpert:

First they cut the stats and now they've killed them altogether?

it's working

 
fxsaber:

With this approach, you have to put a stop check after each operator. Not suitable.

You don't need to do it after each statement, use half division check - at the beginning, at the end and in the middle of the code, then when you find the right half, repeat it again and divide the code into two parts, I think it's fast

 
Igor Makanu:

after each statement is not necessary, put a half division check - at the beginning, at the end and in the middle of the code, then finding the right half of the code repeat the division of the code into two parts, in my opinion it is fast

It's a big program. It takes about 30 seconds each time to reproduce the hang-up.

 
fxsaber:

I run the EA in debug mode. I need to make a breakpoint at the exact moment when I manually unchart the EA. How do I do that?


The matter is that the Terminal hangs permanently when I remove the EA. I need to understand where it happens.

Is it completely fixed or does it take a while for the EA to be unloaded? If the latter, look for a loop.