help syntax

 

dear every one,

I am lokking for the function who return the number

of lot of a trade with ticket Number 555

I think that it is the function OrderLots but I don`t know

use it.

thanks in advance

 

P

you have to grab (i.e. Select) the order, either by looping through the pool of orders, or if you know the ticket, use something like....

  if(OrderSelect(555, SELECT_BY_TICKET)==true)
    {
     Print("Order #555 lots: ", OrderLots());
    }

Good Luck

-BB-

 
BarrowBoy wrote >>

P

you have to grab (i.e. Select) the order, either by looping through the pool of orders, or if you know the ticket, use something like....

Good Luck

-BB-

thanks you barrowBoy.

what I don`t understand is why it is necessary to select in first the order in the pool of order.

we can`t use something like this: OrderLot (555, SELECT_BY_TICKET)

It meen that the terminal cannot instancy all the variables of all the pool of orders in the same time

or that mql4 is not able to read them simultaniously to the terminal indeed?

thanks in advance.

 

P

> mql4 is not able to read them simultaniously to the terminal... all the variables of all the pool of orders...

To do so would be a big memory overhead.

Keep in mind that MT may be running many EA's and you can have many instances of MT connected to different accounts & brokers all on the same machine.

-BB-

Reason: