Use of RefreshRates

To add comments, please log in or register
rvitale01
87
rvitale01  

Hello,

In mql5 there's the CopyRates function to get the latest rates.

In mql4 there's no such a function, but there's RefreshRates(). The question is: How often should it be called? Right before calling OrderSend() or OrderModify(), for example? Or it's necessary only after there's a pause, such as after calling sleep()? Does using RefreshRates() slow down execution of the program?

Thanks

Alexander
2441
Alexander  
William Roeder
22428
William Roeder  

mql4writer01:

In mql4 there's no such a function, but there's RefreshRates(). The question is: How often should it be called? Right before calling OrderSend() or OrderModify(), for example? Or it's necessary only after there's a pause, such as after calling sleep()? Does using RefreshRates() slow down execution of the program?

Only necessary after a delay from start. That means calculations that take seconds or more, between server calls (multiple modifies or multiple sends) or after sleep. Or after loosing connection and waiting.

If you return after processing, (successful or not) it's not necessary.

rvitale01
87
rvitale01  
mql4writer01:

Hello,

In mql5 there's the CopyRates function to get the latest rates.

In mql4 there's no such a function, but there's RefreshRates(). The question is: How often should it be called? Right before calling OrderSend() or OrderModify(), for example? Or it's necessary only after there's a pause, such as after calling sleep()? Does using RefreshRates() slow down execution of the program?

Thanks


Thanks
To add comments, please log in or register