Download MetaTrader 5
To add comments, please log in or register
Examine the Top MetaTrader 5 signals. Choose the best one and subscribe to it!
Carl Schreiber
5966
Carl Schreiber 2014.04.17 16:20 

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


whroeder1
13656
whroeder1 2014.04.17 16:54  
https://www.mql5.com/en/forum/139345
If you do not re-OrderSelect after a new quote OrderClosePrice is not valid.
Carl Schreiber
5966
Carl Schreiber 2014.04.17 17:20  
WHRoeder:
https://www.mql5.com/en/forum/139345
If you do not re-OrderSelect after a new quote OrderClosePrice is not valid.

Thank you!!
/
To add comments, please log in or register