Help! - page 3

 
Alexey Busygin:
So what if it does? It's not a loop.
I think what they meant to say is that if you have a thousand ifs in your EA, the speed will really suffer, so if possible, you should get rid of ifs...
 
Maxim Dmitrievsky:
I think what they meant to say is that if you have a thousand ifs in your EA, the speed will really suffer, so if possible, you should get rid of ifs...

Suggestion:

Remove IF statement from MQL

 
Alexey Busygin:
So what if it does? It's not a loop.

Where there's one if, there's a second and a third and so on. It's tempting to make a bunch of functions with switches.

Whether it is looped or not, it depends on how you look at it; testing in the tester may be considered as looping.

 
Михаил:

Suggestion:

Remove the IF statement from the MQL

A vote should be taken on this issue :)
 
Maxim Dmitrievsky:
I think what they meant to say is that if you have a thousand ifs in your EA, the speed will really suffer, so you should get rid of ifs if possible...

You have to try really hard to noticeably slow down through if to do that.

If you write a thousand variables with value assignment, it would also take the same amount of time to handle a thousand ifs

The nagging is different here, it's just that there are more lines than one.

 
Dmitry Fedoseev:
It reduces the speed of operation.
By how much? By as much as the dreaded 10e-99 percent? )))
 
Maxim Dmitrievsky:
We should have a vote on this :)
Don't be silly!
 
Alexey Volchanskiy:
By how much? By as much as an awful 10e-99 percent? )))

And why not write such a template, cram everything you can into it. All the known trailers, like 50 pieces, etc., in the same style?

If you don't care, I do.

 
Alexey Busygin:

You'd have to try hard to slow down noticeably with an if.

If you write a thousand variables and assign a value, it will also take the same amount of time it would take to handle a thousand ifs.

The nag is different here, it's just that there are more strings than one.

I don't know. If everything is slow to begin with, 10 ifs may not make a difference. And I have already on the third noticeable. So the need for each new ife is carefully weighed.
 

Guys, I'm not good at this yet, how do I fill in the lines?

double sto1=(bar close price);

double sto2=(open price of a new bar) ;