I have a problem in my custom indicator. I call CopyRates function for different currency pairs in one time (EURUSD, USDCAD, ... ) with count demand of actual chart and timeframe. In case I've never opened chart with USDCAD (as example), CopyRates always returns -1 and GetLastError function returns 4401. My question is - Is it possible to send request to server without opening all charts for each currency pair? Thank you for reply!
Thank you for reply, I'm a little bit closer. The problem is it that I haven't data when I need them. I have zero data count for every currency pair except I have already displayed. There're two options how to execute the indicator:
First tick check the history (CopyRates has been executed) If it is loaded then indicator will draw chart properly If it isn't then indicator will send request to server