Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 634

 
Valerius:

Good afternoon!

Guys, I've got a loop. It seems to be simple as pie.

int r=10;

for(int i=r; i<300; i++)

{

Print(i);

}

So, i starts printing from 250 instead of 10.

Why and how can I fight it?

Is this the right way to print?

int r=10;
for(int i=r; i<300; i++)
{
Print(i);
Sleep(123);
}
 
Igor Makanu:

Is this the right way to print?

Much. ))))

 
Galim_V:

Much. ))))

All in all, you don't understand the reason and stick to your own opinion. Well, insert Sleep() in all your codes

 
Igor Makanu:

is this the right way to print?

Made lazy and crutchy another user. The question is: why?

 
Artyom Trishkin:

Another user is made lazy and a crutch-maker. The question is why?

there was a question how to print Print(), I wrote a code example of how I would print

well what would the user do with the code... maybe smash his head in.... maybe he invents a nuclear bomb.... he might become lazy, frankly not interested, I'm not trying to guess what's in someone's head for a long time, because I know - "have their own cockroaches" ;)

;)

PS: I can't find information on the forum and in help, but for some reason I think I've seen information that when Sleep() with parameter more than 100ms is called, the EA will give control to the terminal and it always correctly handles both graphics and Print(), i.e. we write Sleep(123) with many Prints()

and you will always see a log with prints in output, it is always like that in my debugging

 
Artyom Trishkin:

All in all, just as you didn't understand the reason, you stuck to your guns. Well, insert Sleep() in all your codes

Instead of these two and a half sentences, the reason for this interesting behaviour for. Once upon a time you too had to wonder why the indicator buffer produced 2.3 kilos.

 
Galim_V:

Instead of these two and a half sentences, the reason for this interesting behaviour for. Once upon a time, too, you had to wonder why the indicator buffer produced 2.3 kilos.

The answer is on the page before last:

Forum on trading, automated trading systems and trading strategy testing

Any questions from newbies on MQL4, help and discussion on algorithms and codes

Artyom Trishkin, 2018.09.27 21:07

Not everything can be output to the tester log - there are skips to speed it up. See full log via PKM


 
Igor Makanu:

there was a question how to print Print(), I wrote a code example of how I would print

well what would the user do with the code... maybe smash his head in.... maybe he invents a nuclear bomb.... he might get lazy, frankly not interested, I'm not trying to guess what's in someone's head for a long time, because I know - "my own cockroaches" ;)

;)

PS: I can't find information on the forum and in help, but for some reason I think I've seen information that when Sleep() with parameter more than 100ms is called, the EA will give control to the terminal and it always correctly handles both graphics and Print(), i.e. we write Sleep(123) with many Prints()

and you will always see a log of the prints in the output - I always see it when debugging

The question was "why" in the first place. The answer was given a few posts ago. The question "how to fight", the answer is still there. You don't. Just look at the full log. Or, as you put it, to stall the program for the sake of being too lazy to open the full log.
 
Artyom Trishkin:
Well, or according to you - to slow down the program for the sake of laziness to open a full log.

or my way: add slips() while searching for bugs

Log is really rarely open, especially as a text file, because often the code page does not match in the output of the Russian language, then you forget to delete and find the right message takes time, I found it easier to print, find the bug and remove the print

 
Artyom Trishkin:
The question was "why" in the first place. The answer was given several posts ago. The question "how to fight" was answered in the same place. You don't. Just look at the full log. Or, as you put it, to stall the program for the sake of being too lazy to open the full log.

Thank you very much.

No way to fight it))) . A total dipshit and hello to the methaquotovs. MT4 is complete crap that the methaquotes don't want to fix. How can you do anything in MT4 if you can't really track anything.

How many times have I told myself that a programmer writes a program for himself, not for people. The program is understandable only to him, but not to the user. No matter how many programs you take, for example, 1C, Metaeditor, Taxpayer, programs of Sberbank, Rostelecom, etc. None of them are too complicated for an average person to understand what and where and why.

You have to dig around in this fucking MT4 to find something somewhere. You have to twist yourself to find the truth. Why do they make it so complicated for us? Either the programmers are idiots or too arcane.

Thank you all for your help. I have solved the problem, I had to poke around on various forums to find the right one. I have not found the answer here. I found it on another forum. Although the professionals responding to messages here are not bad.

Good luck to everyone!

Reason: