This thread is old.
No one is replying to this thread.
I am enquiring the same question too as I am using an indicator that is not mine, that don't seems to be refreshing its objects if I want at any time.
RefreshRates() only has effect on the current chart symbol/period data and variables (eg. "Bid", "Ask", etc.) associated with the EA.
With regards to an Indicator not refreshing, it is usually because it is poorly coded and not properly handling the incoming data.
If it a Multi-Symbol/Multi-Time-frame Indicator and/or EA, then it has to properly handle the request of data on a timely fashion (which has nothing to do with RefreshRates()) and handle 4066/4073 errors. Failure to do this will cause it not to work properly.
- RefreshRates updates:
Predefined variables: Ask, Bars, Bid, Close[], High[], Low[], Open[], Point, Time[], Volume[]It does nothing else.
RefreshRates - Timeseries and Indicators Access - MQL4 Reference
Predefined Variables - MQL4 Reference
Also updates: Hour, Minute, and Seconds
Minute() returns wrong values - or am I wrong? - MQL4 and MetaTrader 4 - MQL4 programming forum
And updates: OrderClosePrice() on the next order select call. -
On MT4: Unless the current chart is the specific pair/TF referenced, you must handle
4066/4073 errors.
Download history in MQL4 EA - MQL4 and MetaTrader 4 - MQL4 programming forum

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I am using a third party software to write trading signals to a file and use an EA to keep monitoring and parse that file to execute those trading signals. In this EA, the logic looks like
int start()
{
while ( true ) {
RefreshRates();
// read and parse the trading signals
// execute the signals
sleep(1000);
}
}
I have to use RefreshRates() to keep the series arrays up-to-date. Because this EA needs to access the close/high/low series of many symbols, does RefreshRate() refreshes all symbols this EA has accessed or it just refreshes the current symbol on which this EA is running?
- Clearpicks