Does RefreshRates() refresh the series arrays of other symbols also?

 
Hello,


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
 
Zee Zhou Ma:

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.

 
  1. RefreshRates updates:
    Predefined variables: Ask, Bars, Bid, Close[], High[], Low[], Open[], Point, Time[], Volume[]
              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.
    It does nothing else.

  2. 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