How do I get chart not shown on screen auto refreshed?

 

My task is, for eg, when executing EA on EURUSD chart H1, calculate RSI on H1, RVI on M15 and MACD on M5 simutanously to get my result.

double myValue = iRSI(NULL, PERIOD_H1, 14, PRICE_CLOSE, 0) 
            + iRVI(NULL, PERIOD_M30, 13, PRICE_CLOSE, 0) 
            + iMACD(NULL, PERIOD_M5, 12,26,9, PRICE_CLOSE, MODE_SIGNAL, 0);

And I found, if I have never opened M30 and M5 chart for this symbol, or they have not been opened for a long time, the latter two functions are malfunctioning (showing unexpected zero or some huge meanless value) until I manually open it.

For above case, I can just open a new chart by using ChartOpen() function, but is it the only way by code to make other period data available?

What's more, in strategy tester, sometimes I want the period chart for two whole years. I really have to manually open M5 chart and pull the chart back and back for two years, then M15, pull back and back, then M30 .... before I can start my strategy tester on H1. 

Is there anyway to autometically refresh the related period chart that is not currently shown?

 
I hv never come across that problem YET. 
Ok try this for Strategy Tester 
The same issue on Slowest method Every tick gives same problem. 

Create a function that checks the returned value for the iRSI, iMACD and iRVI, to. 

Get a function to download the tick or candle data of desired Timeframes 
 
a4194304: And I found, if I have never opened M30 and M5 chart for this symbol, or they have not been opened for a long time, the latter two functions are malfunctioning (showing unexpected zero or some huge meanless value) until I manually open it.
On MT4: Unless the current chart is that specific symbols/TFs referenced, you must handle 4066/4073 errors before accessing candle/indicator values.
          Download history in MQL4 EA - Forex Calendar - MQL4 programming forum - Page 3 #26 № 4
 

I can confirm this problem.

iRSI returning 0 when there is not enough history available

RSI

EURJPY and GBPJPY returning 0 for W1 and MN1.

I added calls to iBars, iTime, iOpen etc as well as CopyRates in the code, but nothing would update the history.

Not only did I have to open the chart and time-frame, I also had to scroll back a little to get the history updated.

 
William Roeder:
On MT4: Unless the current chart is that specific symbols/TFs referenced, you must handle 4066/4073 errors before accessing candle/indicator values.
          Download history in MQL4 EA - Forex Calendar - MQL4 programming forum - Page 3 #26 № 4
I tried the method in there, in a neat way.
double i = iTime(symbol, period, 0);
if(_LastError != 0)  Print(StringFormat("iTime(%s,%i) Failed: %i", symbol, period,_LastError));
The result is: The first time it reports 4066, but when second time calling (after few minutes), Not only my chart is still not refreshed, but also it is always reporting error 4105. "no order selected"? Why it reports this?