Features of the mql4 language, subtleties and techniques - page 9

 
fxsaber:

So the meaning would be very different there.

What kind of meaning do you have in mind?

 
Alexey Viktorov:

What sense do you mean?

for (int i = OrdersTotal() - 1; i >= 0; i--)
  if (OrderGetTicket(i))
    Lots[(int)OrderGetInteger(ORDER_TYPE)] += OrderGetDouble(ORDER_VOLUME_CURRENT);

I.e. the meaning is completely different in such a code because of the positions/orders.

 
fxsaber:

I.e. the meaning is totally different in such a code because of the positions/orders.

Well, I don't know... The flies are separate, the cutlets are separate. It's fine for my taste.

 
Alexey Viktorov:

Well, I don't know... The flies are separate, the cutlets are separate. It's all right for my taste.

That's the "unexpected" thing about the four.

 
fxsaber:

That's the 'unexpected' thing about the four.

I cannot understand what the surprise is. In 4 there is an int value of order type right in the documentation.

OP_BUY

0

Buy

OP_SELL

1

Sell

OP_BUYLIMIT

2

BUY LIMIT pending order

OP_SELLLIMIT

3

Pending SELL LIMIT order

OP_BUYSTOP

4

Pending BUY STOP order

OP_SELLSTOP

5

Pending SELL STOP order

 
Alexey Viktorov:

I don't understand what the surprise is. There is an int value of the order type right in the documentation.

OP_BUY

0

Buy

OP_SELL

1

Sell

OP_BUYLIMIT

2

BUY LIMIT pending order

OP_SELLLIMIT

3

Pending SELL LIMIT order

OP_BUYSTOP

4

Pending BUY STOP order

OP_SELLSTOP

5

Pending SELL STOP order

In that the cutlets and flies are not separated. And it turns out to be very convenient. It allows you to write concise and immediately understandable code.

 
fxsaber:

In that the cutlets and flies are not separated. And that, as it turns out, is very handy. Because it allows you to write concise and immediately understandable code.

Apparently, we live on different planets.

Do you pay attention to it with your knowledge? For some reason, I easily switch from writing mql4 to mql5 and back. I don't see any problems at all, except for lack of the remaining years to study the OOP to the fullest, and maybe even an urgent need for that.

 
Alexey Viktorov:

Apparently we live on different planets.

I mean, with your knowledge I'm not paying much attention to it. I somehow easily switch from writing mql4 to mql5 and back. I don't see any problems at all, except for lack of the remaining years to fully learn OOP, and maybe even an urgent need for that.

I can freely write in pure MQL5 and SB. But I don't write it primarily because it's inconvenient, cumbersome and ugly.

 
fxsaber:

I am free to write in pure MQL5 and SB. But I don't write it primarily because it's inconvenient, cumbersome and ugly.

That's why I assumed that we live on different planets.

 
Alexey Viktorov: That's why I assumed we lived on different planets.

I live on earth. Mobile phone numbers start with a plus sign "+". What about you?