Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 267

 
Leo59:
There's one thing I don't understand. Why do you have to get involved in history?
The Expert Advisor works, the order is closed and the variable has a new value. Why shouldn't this value be immediately put in the array of these values?

I guess with my brains, I'm just a sausage trader((

Also, on the subject of speed and savvy Dimitri.
If you compare the implementation of the same in your performance and in mine, it is the same as comparing the speed of Formula 1 and Zaporozhets, respectively.
So, everything in this world is relative. And this is not flattery to you, but a bitter fact of my incompetence.

I'm going to bed(((

I don't have pending orders. Therefore, it is more correct to talk not about closed ORDERS, but about closed trades.
 
SpikeOne:
Do you guys have a version of the martingale EA that opens a position in either direction with a stop loss and take profit of 20 pips, if the position played, then opens in the same direction, if not - it opens in the opposite direction with the same stop loss and take profit, but the position has doubled, and so opens in different directions every time until the winner. If you know such a broker, give me a link please.

Maybe exactly with 20 pips and your rule does not exist. In general the standard martin, the depo killer...
 
Leo59:
One thing I don't understand. Why do I have to look at the history?
The Expert Advisor works, an order is closed and the variable has a new value. Why doesn't this value immediately go into the array of these values?

This algorithm is for the tester. It is unreliable for real and demo trading. Imagine for example that we had to restart the Expert Advisor for some reason while it was running. When the EA is restarted next time, all of the variables that store data on orders will be initialized with their original values, and we will lose the order data. This means that the EA will not be able to continue working in the mode it was working in before the restart. It will start from the beginning.
 
How do I make my pending orders modify every minute, is there any way of knowing when the last modification was made?
 
zaqwsx123:
Question: how can you make pending orders modify every minute? Is there any way to find out the time of last modification?

For example, save the time after a successful order modification in a variable. Preferably in GV.

Aren't you afraid of getting blocked by autotrading?

 
zaqwsx123:
Such a question, how to make pending orders modify every minute, is there any way to know the time of the last modification?
artmedia70:

For example, save the time after a successful order modification in a variable. Preferably in GV.

Maybe the simplest solution is to run the EA on M1?
 

Hi Experts! Suddenly I found out that for some time I had a condition with an error, which the compiler didn't notice:

if(n >= 0 < N) And I needed if(n >= 0 && n < N) Or it could be both! (509th Bild)

 
borilunad:

Hi Experts! Suddenly I found out that for some time I had a condition with an error, which the compiler didn't notice:

if(n >= 0 < N) And I needed if(n >= 0 && n < N) Or it could be both! (509th bild)


Why is there an error? From the viewpoint of the compiler, both variants are correct, but they only mean different things and this is on the programmer's conscience ;).

In the first case you are comparing the result of the n to zero comparison operation with the N value.

In the second case you check if n falls into the range from 0 to N.

How can the compiler know what you want? The language syntax rules are not violated and therefore this is "none of the compiler's business" ;)..... So the choice is yours and the compiler only translates it into executable code.

 
VladislavVG:


Why is there an error? From the compiler's point of view both variants are correct, but they mean different things and this is on the programmer's conscience ;).

In the first case you are comparing the result of the comparison operation n with zero with the value N.

In the second case you check if n falls into the range from 0 to N.

How can the compiler know what you want? The language syntax rules are not violated and therefore this is "none of the compiler's business" ;)..... So, the choice is yours and the compiler only translates it into executable code.

Thanks! I just didn't know you could compare like that! There's an n number of items, and N is the limit of their number! I'll take a look at the Doc, clear my head!

Didn't find this case in the Doc. How much more unknown-unknown awaits us!

 
borilunad:

Thank you! I just didn't know you could compare like that! There's an n number of items, and N is the limit on the number of items! I'll take a look at the Doc, clear my head!

Didn't find this case in the Doc. How much more unknown-unknown awaits us!


This is from the C standard. You can compare a lot of things in C in general - a poorly typed language, but all the responsibility is on the programmer. MKL is essentially a stripped-down C, written in it (more precisely, MS VS 6.0 is C\C++), probably, the project has already been ported to a more modern platform. It is not for nothing that the developers suggested to refer to the C standard for all low-visibility cases back in the early days of MKL4 development.