Value of Trade Operations

 

I was wondering if someone knows exactly what is the meaning behind the Value of Trade Operations :

e.g. https://docs.mql4.com/constants/trading

Does it mean that operations with lower value has higher priority during the execution of the program ? or something else ?

 
 

Hello WHRoeder,

Thanks for posting but the manual doesn't say anything about this values (at least not the link that you referred :)) ).

I am thinking of these values:

if someone is kind enough to tell/point out what is the role of those values

Thanks, Vardarski.

 
They are just integers used to signify what type the order is . . . that's all.
 
vardarski:

Thanks for posting but the manual doesn't say anything about this values (at least not the link that you referred :)) ).

I am thinking of these values:

  1. Oh really:

    Buy is a market order that defines buying of assets for a symbol.

    Sell is a market order that defines selling of assets for a symbol.

    BuyLimit is a pending order to buy assets for a security at a price lower than the current one. The order will be executed (modified into market order Buy) if the Ask price reaches or falls below the price set in the pending order.

    SellLimit is a pending order to sell assets for a security at a price higher than the current one. The order will be executed (modified into market order Sell) if the Bid price reaches or rises above the price set in the pending order.

    BuyStop is a pending order to buy assets for a security at a price higher than the current one. The order will be executed (modified into market order Buy) if the Ask price reaches or rises above the price set in the pending order.

    SellStop is a pending order to sell assets for a security at a price lower than the current one. The order will be executed (modified into market order Sell) if the Bid price reaches or falls below the price set in the pending order.


  2. What part of "Operation type for OrderSend() function" didn't you understand? OrderSend( string symbol, int cmd, double volume...
 

@ RaptorUK : Thanks for answering. I thought that there is a practical use for these value numbers.

@ WHRoeder : I was referring for the values that I've circled in the screenshot but I really appreciate your effort to explain to me.

 
vardarski:

@ RaptorUK : Thanks for answering. I thought that there is a practical use for these value numbers.

There is, you can use them instead of the constants . . if you want . . .

Instead of this . . .

ticket=OrderSend(Symbol(),OP_BUY,1,Ask,3,Ask-25*Point,Ask+25*Point,"My order #2",16384,0,Green);

do this . . .

ticket=OrderSend(Symbol(),0,1,Ask,3,Ask-25*Point,Ask+25*Point,"My order #2",16384,0,Green);

What do you think is more readable ?

 
That's what I thought but I wasn't sure. It is easier for the user to use constant instead of a value. I think for the machine it will be better to use a value because the constant needs to be converted into value but that's a different discussion.
 
vardarski:
That's what I thought but I wasn't sure. It is easier for the user to use constant instead of a value. I think for the machine it will be better to use a value because the constant needs to be converted into value but that's a different discussion.

I would assume (but I don't know for sure) that the change from constant to value is done at compile time so there would be no penalty.

EDIT: "Using the #define construction, one can define the symbolic name or symbolic constant at the program start to be the specific symbol string. Later on, the compiler will replace all appearances of this name without quotation marks with the corresponding string. In fact, this name can be replaced by any absolutely arbitrary text, not necessary with digits:"

Reason: