How To Force Chart to load historical data programmatically?

 

Hi,

I understand that we could get the number of current bars on chart by using

Comment("Bars: "+DoubleToStr(Bars,0));

Let's say it give: 10,000 for the result. Because that is the number of bars the chart can handle. If we want more, we should scroll with mouse or by pressing PageUp continuously.

What I want to do is to get e.g. 1,000,000 bars on memory for the counting. Is there a programming way to force the chart to load historical data based on certain time frame? Is there a way to get the data without scrolling the mouse / keyboard?

Regards,

 

Press "F2" Button, and then download the data on history center.. but the data will be from metaquotes server..

 

Thanks for the info.

Several questions though:

- It's taking a long time. Is there a way to speed things up?

- What if I want to load the data from my server, not metaquotes server? Is there a way for that?

regards.