Errors, bugs, questions - page 130

 

Can anyone tell me what the compile-time warning is?

truncation of constant value    me-mm-cls-v003.mqh      64      45
In general, where can I find a description of compilation errors and warnings?
 
pronych:

Generally, where to find descriptions of compilation errors and warnings

See MQL5 Reference / Standard constants, enumerations and structures / Error and warning codes / Compiler warnings

And the neighbouring sections.

Документация по MQL5: Стандартные константы, перечисления и структуры / Коды ошибок и предупреждений / Предупреждения компилятора
Документация по MQL5: Стандартные константы, перечисления и структуры / Коды ошибок и предупреждений / Предупреждения компилятора
  • www.mql5.com
Стандартные константы, перечисления и структуры / Коды ошибок и предупреждений / Предупреждения компилятора - Документация по MQL5
 

Help solve an amazing mystery :)

Everything works fine on the demo, but in the tester it hangs without starting to test. I mean the tester shows 1.1% and nothing else happens, I press undo button, respectively testing stops.

I have a lot of parameters in the main EA, I have not figured it out yet...

In general, it is this bit of code. The first point of the parabolic from the current series is defined here.

if(SLпоПервойТочкеПараболика==true)
   for(i=0;;i=i+1)
      {
      if(iLow(PERIOD_CURRENT,i+1,1)<Параболик(PERIOD_CURRENT,0.02,0.2,i+1))
         break;
      }

If this code is used, the tester hangs, but if SLfirstParabolic Point=false, everything is normal. In reality, everything works accurately and without errors in any case

The code as a ready-made Expert Advisor is attached

Files:
Otladka.mq5  8 kb
 
Dmitriy2:

The code as a ready-made EA is enclosed

You forgot to attach the EA.
 
alexvd:
You forgot to attach the EA.

I can't seem to attach the file, I've tried it five times...

ps I pasted it as code.

 
Dmitriy2:

I can't seem to attach the file, I've tried it five times...

ps I pasted it as code

Just checked it, it worked. What's your browser, what's the file name?
 

Rosh:
Только что проверил - код вставился. Какой у Вас браузер, какое имя файла?

code is inserted, file is not attached

IE8, HP home

file name both in Russian and in English Debugging.mq5 Otladka.mq5

I do the right thing? I click "attach file", overview, select the file and click "update".

 
Dmitriy2:

Am I doing it right? I click "attach file", review, select the file, and click "update".

The steps are correct, the situation has been reproduced.

We'll fix it as soon as possible.

 
alexvd:

The steps are correct, the situation has been reproduced.

We'll fix it as soon as possible.

Yeah, thanks, but the code if anything, I'd like to find out why the tester hangs up soon... :)

 
Dmitriy2:

Yeah, thanks, but there's a code if anything, I'd like to find out soon why the tester hangs up... :)


It hangs because of the infinite loop.

You have only one way out of the loop - by break. But you have a break when a certain condition is met. One of the components

Параболик(PERIOD_CURRENT,0.02,0.2,i+1)

Inside the function you get indicator handle every time and copy it without checking if the data is ready.

Suggestion.

1. Take the handle variable to the global level.

2. Receive the indicator handle at OnInit (you do not change the parabolic parameters anyway).

3. Before copying data from the indicator buffer, check if it is ready (calculated) - the BarsCalculated(Parabolic) function will help you.

4) Organize the exit from the cycle, if the item 3 is not fulfilled. 3 is not fulfilled.