Questions from a "dummy" - page 178

 
Dimka-novitsek:
Good evening! I'm trying to open five orders - I'm actually learning the peculiarities of the fifth terminal. Well, it's been 40 minutes, I can't see the print message log! If you can, please take a look at it.

There's half of it lost...

 for( ;i<5;i++){

What's that?

 
And I've declared for out of function! I mean, i !
 
What's lost? I'm kind of off the record...
 
I don't know, so
 for(i ;i<5;i++){

swears... 'i' - expression has no effect ordered.mq5 36 27

It's working and that's fine. I don't always see the prints, and it's not very convenient, because it's so good to pull variables in them when debugging!

 

Option 1

for(int i=0 ;i<5;i++)
{
//-----
}

Variant 2

int i;

for(i=0;i<5;i++)
{
//-----
}

You missed the starting values altogether.

 
I'll get that. Daddy plays too.
 
I declared int i; outside the functions, above it ticks, that it would open orders exactly five! Otherwise it opens many of them. After all, the main thing is that it works.
 

I also recommend doing a Code Alignment Styler to improve readability.

 
It's the first time I've heard or read it! Interesting.
 
Cool!!! Thank you.
Reason: