Is there any way to load new bars into chart history from MQL4 program?

 
Hi,

Suppose there is 1000 bars in an open chart history and when I drop my expert advisor into the chart, it needs to use 2000 bars from the chart history. My question is that, in this case, is there any way to load new bars into the chart history by calling specific functions in MQL4 program? A user can disable "auto scroll" and press "PgUp" key many times to load new bars from broker server, but I need to do so from MQL4 program. I tried ArrayCopySeries and ArrayCopyRates but they were not useful for this case. Thank you in advance for any help.

Yashil.
 
It takes sometime to load the chart history.
Probably the EA should call ArrayCopySeries several times to fill the history buffer.
 
fireflies:
It takes sometime to load the chart history.
Probably the EA should call ArrayCopySeries several times to fill the history buffer.
Dear "fireflies", In ArrayCopySeries and ArrayCopyRates there is not any parameter to specify how many new bars one wants to be loaded. Using ArrayCopySeries, if there is already 1000 bars in the chart history, it will return data of these 1000 bar without any error, and no new bar data will be requested from the broker server.
 
I still wonder if there is any solution?
 
yashil:
I still wonder if there is any solution?
MetaQuates, Will be there any plan to include this feature in the future? or it exists and I don't know how to use?
 
Use function FileOpenHistory
 
Rosh:
Use function FileOpenHistory
Thank you Rosh for your consideration, but again using FileOpenHistory I just will be able to read what is already loaded from broker server. What I am looking is a way to ask for past "Bars" info from broker server. e.g. suppose there is candle info from 2007.07.11 thr. 2007.07.14 (current time) in the chart and also in the .hst file in the history. Now if a user needs to watch candle info for 2007.07.10, he/she may just press PgUp key many time and go back in the chart, then new candle info will be loaded from broker server and will be displayed. I want to see, in such a condition if my mql program needs to read candle info for 2007.07.10, how I could ask for loading new candle info from broker server, without user involvement. I hope I have been able to describe the issue well. Looking forward for any comment and finding a solution.
 
Download all needed history from History Center (press F2) previously. Only this way. See also Secrets of MetaTrader 4 Client Terminal
 
Rosh:
Download all needed history from History Center (press F2) previously. Only this way. See also Secrets of MetaTrader 4 Client Terminal
Thank you Rosh, so I suppose there is not any way to load new bars from a broker server using programming functions and human interaction is required to do so, right? Now when my EA needs to load new bars, I write a message in the chart and ask user to load new bars by disabling AutoScroll and pressing PgUp key many times, but this is annoying. I hope in the future a function to do this task be included in the MetaTrader programming language.
 
New bars in current time are loaded automatically. If at the first start of the terminal the small part of history is passed through, the terminal itself download this history.
 
Rosh:
New bars in current time are loaded automatically. If at the first start of the terminal the small part of history is passed through, the terminal itself download this history.
Dear Rosh, I think, I have not been able to describe the problem well. Please consider the following example: Suppose I need to perform a math calculation using the past 7000 "Bars". I use ArrayCopyRates to load "Bar" data from history. Now suppose there was already 5000 bars loaded to chart history, so ArrayCopyRates will return only bar data for 5000 bars and also no error code will be generated for the following code.

double adRates[7000][6];
int nCopiedRatesNo = ArrayCopyRates( adRates, Symbol(), PERIOD_M15 );
int nErrCode = GetLastError();

In this condition, for loading the rest 2000 bars from the chart history, I don't see any programming function, and just have to ask user to load new bars from the broker server history, disabling AutoScroll and pressing PgUp key many times on the chart. I am looking for a way to load the required number of bar data from the broker server history, without user interaction.

Thank you for your consideration again.
Reason: