I can not find a solution to force the download of data from the broker server.
https://www.mql5.com/en/docs/series/timeseries_access
Look for the CheckLoadHistory() function.
https://www.mql5.com/en/articles/83
Look at init_tf(){} in the attached code.
https://www.mql5.com/en/docs/series/timeseries_access
Look for the CheckLoadHistory() function.
https://www.mql5.com/en/articles/83
Look at init_tf(){} in the attached code.
https://www.mql5.com/en/docs/series/timeseries_access
Look for the CheckLoadHistory() function.
https://www.mql5.com/en/articles/83
Look at init_tf(){} in the attached code.
Thank you for the tips. Running the following code gives the following results:
SeriesInfoInteger("AUDUSD",PERIOD_H1,SERIES_SERVER_FIRSTDATE) = D'2016.12.23 17:00 SeriesInfoInteger("AUDUSD",PERIOD_H1,SERIES_FIRSTDATE) = D'2018.10.26 16:00 SeriesInfoInteger("AUDUSD",PERIOD_H1,SERIES_BARS_COUNT) = 4 CopyClose("AUDUSD",PERIOD_H1,0,99,close_tmp_array)) = 4 GetLastError() = ERR_INVALID_FUNCTION_PARAMVALUE CopyClose("AUDUSD",PERIOD_H1,5,99,close_tmp_array)) = -1 GetLastError() = ERR_NO_HISTORY_DATA
The problem is running CopyClose, CopyTime, iClose, iMA or whatever other function I'm trying does not force data download from the server and I'm stuck with 4 bars - in this example - until I manually Refresh the AUDUSD H1 chart. Still standing question is how to make MT4 download this data using code not mouse?
https://www.mql5.com/en/docs/series/timeseries_access
Look for the CheckLoadHistory() function.
https://www.mql5.com/en/articles/83
Look at init_tf(){} in the attached code.
Is this topic about mql4 or mql5 ? as you reference are for mql5 only. They don't work the same in respect of collecting data, unless there was some change recently.
My question was about mql4 but since Anthony gave some references to mql5 and I was not able to find similar for mql4 I gave them a try but I was unsuccessful.
----
I updated the original post to make it clear it's about MT4 and mql4.
Is this topic about mql4 or mql5 ? as you reference are for mql5 only. They don't work the same in respect of collecting data
My mistake.
- 2018.03.01
- www.mql5.com
- 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 created EA in MQL4 - a market scanner that works on many currency pairs and periods. The scanner uses several standard functions that require data from different pairs and periods: iMA, iVolume, iClose, etc. Scanned currency pairs are taken from the market watch panel. From what I understand, when a currency pair has no history downloaded from the broker to return the result of the function that references it, the request is sent to int the background to broker to get the missing data. And here the problem arises because for some combinations, the data is downloaded automatically, and for some it is not, I can not find the reason why. When I open the window of the graph for which the data was not collected, I only get a fragment of the chart from the moment the scanner was started up to the present. The only way to download the remaining data is to use the right mouse button and the function "Refresh" or start scrolling the chart back. This i how it looks like:
https://www.mql5.com/en/charts/9289085/usdcad-h1-admiral-markets
Calling iClose for such empty chart gets 0 as a result and the error returned is 4051 invalid function parameter value.
I can not find a solution to force the download of data from the broker server. Are there any security measures on the server side against too intensive parallel polling for data and too many polls causes the automatic data downloading mechanism to be turned off? Is there any way to program the forcing of such a refresh history at the start of the scanner?
Thank you in advance for your help.
Regards,
Marcin