Jump to content

[ask] Force Chart to load historical data programmatically?


Recommended Posts

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,

Ore no Shinka Hikari yo Hayai. Zen Uchi o Nani no Mono Ore no Shinka Chuito Kore Nai.

Ten no Michi yo Iki. Subete o Sukosadoru Otoko.

Link to comment
Share on other sites

Re: [ask] Force Chart to load historical data programmatically?

 

In Properties > Max Bars in History

 

Default is 6500 ?

 

If you set to 1000000 CPU will not enjoy :idea: :!:

 

MetaTrader can not have different Max Bars for different TF

 

Also use History Center > click on pair > Download

 

Only those ways work but second is easier on CPU :mrgreen:

Link to comment
Share on other sites

Re: [ask] Force Chart to load historical data programmatically?

 

If you set to 1000000 CPU will not enjoy :idea: :!:

I've set to something like 99999999999 beforehand. It still does not refresh automatically to the past and I still have to scrool using mouse / pageup :(

 

Also use History Center > click on pair > Download

This is sooooooo slow. I've tried for 10 minutes, with the progress bar is running a little. But when I stopped it it does not refresh anything.

 

Anyway, thanks for the info sonny. Any other way to do this?

 

regards,

Ore no Shinka Hikari yo Hayai. Zen Uchi o Nani no Mono Ore no Shinka Chuito Kore Nai.

Ten no Michi yo Iki. Subete o Sukosadoru Otoko.

Link to comment
Share on other sites

Re: [ask] Force Chart to load historical data programmatically?

 

Hi William;

 

For MT4 when connect,what should the speed be showing at the bottom right hand corner.I very confused over the GMT time.How you set it?Also how you know the broker GMT.How to adjust for daylight saving?Any good material to read up on this?

 

If I have 3 different TF of the same symbol,how to have the cursor crosshair or vertical line correspond on all 3 TF?

 

Thanks in advance.

Link to comment
Share on other sites

Re: [ask] Force Chart to load historical data programmatically?

 

For MT4 when connect,what should the speed be showing at the bottom right hand corner.

The number on bottom right corner is not speed. It's an indicator of how much data has been downloaded and uploaded. It's not on kilobyte, I guess it's kindda packet data count. The longer you run your MT4 the bigger the number.

 

I very confused over the GMT time.How you set it?

You don't, and you can't. Only the broker could set the time. We as users, can't set the time.

 

Also how you know the broker GMT.

You check it with your local time on your watch. I'm living in Jakarta, which is GMT+7. e.g. the latest time on my MT4 is 2 o'clock while my local time is 8 o'clock. It has 6 hours difference. Since it's DST, so my broker has a difference of 5 hours from my local time. Thus, my broker is GMT+2, which is europe / london time.

 

How to adjust for daylight saving?

You don't and you can't. Your broker does it, we don't.

 

Any good material to read up on this?

Just google "time conversion" or "est" or "gmt" or "dst" or anything time related stuff.

 

If I have 3 different TF of the same symbol,how to have the cursor crosshair or vertical line correspond on all 3 TF?

You could only have 1 cross hair per chart. However, you could "tile horizontally" or "tile vertically" all 3 windows, and activate cross hairs for all of them, to get similar effect.

 

Regards,

Ore no Shinka Hikari yo Hayai. Zen Uchi o Nani no Mono Ore no Shinka Chuito Kore Nai.

Ten no Michi yo Iki. Subete o Sukosadoru Otoko.

Link to comment
Share on other sites

Re: [ask] Force Chart to load historical data programmatically?

 

Don't really understand about cursor move. But it's hard to do almost anything multi timeframe with MT4.

 

Regards,

Ore no Shinka Hikari yo Hayai. Zen Uchi o Nani no Mono Ore no Shinka Chuito Kore Nai.

Ten no Michi yo Iki. Subete o Sukosadoru Otoko.

Link to comment
Share on other sites

Re: [ask] Force Chart to load historical data programmatically?

 

Hi William,

 

I believe it is easier to download all the data for the particular currency pair and TF rather than doing it in codes.

 

At MT4, select Tools - > History Center

-> go to particular currency pair and T/F

-> click on download to get all history available.

 

Rgds. :peace:

Link to comment
Share on other sites

Re: [ask] Force Chart to load historical data programmatically?

 

Ok then.

 

Thanks AWSL for the info.

 

Regards,

Ore no Shinka Hikari yo Hayai. Zen Uchi o Nani no Mono Ore no Shinka Chuito Kore Nai.

Ten no Michi yo Iki. Subete o Sukosadoru Otoko.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...