When is OrderClosePrice() refreshed?

 

Hi,

1) OnTick() is executed if a new Tick has been sent by the server. But if the the server gets buzzy I do hae the feeling the data stream slows down :(

2) If I am opening an order it takes some time I can get a new and actual prices by RefreshRates();

3) If I am now within this loop:

int o = OrdersTotal();
while (o>0){ o--;
        if (!OrderSelect(o, SELECT_BY_POS)) continue;
        double cls = OrderClosePrice();
        ...
}

From what time is now the OrderClosePrice() if e.g. the loop lasts longer?

a) the price of the time the last tick came in or

b) the price of the time the order was selected or

c) just the moment OrderClosePrice() is executed (which means it is automatically updated) or

d) another moment?

May be one can put in another way, when and how and by what is the list of open orders with its various prices is refreshed?

Has RefreshRates() an effect on OrderClosePrice()?

Thanks for your effort,

Gooly


 
https://www.mql5.com/en/forum/139345
If you do not re-OrderSelect after a new quote OrderClosePrice is not valid.
 
WHRoeder:
https://www.mql5.com/en/forum/139345
If you do not re-OrderSelect after a new quote OrderClosePrice is not valid.

Thank you!!
Reason: