Hello & Welcome on board !!! :-)
Please note:
Before you can post a message on the forum you need to REGISTER to get a unique GiG username (Totally Free!). Feel free to look around - just start browsing any of the sections from the home page of GiG. Join the community!.
Post, discuss and review the best MetaTrader indicators here.
  • User avatar
  • User avatar
  • User avatar
User avatar
By Geko
#278
Your historical data is composed of the data you download from Metaquotes servers and the data you obtain from your live/demo feed from your broker. If you want your various tools to have accurate calculations it is important to have a correct historical data base for your various instruments.

If it is important when you are trading a single instrument, it is even more important when you are trading/monitoring multiple instruments. So, if you are using a dashboard or trades baskets you should continue reading.

When you download a new Metatrader platform from your broker, the platform comes without any historical data. Then, when you open a chart for a currency pair, just a few historical data of the chart timeframe are loaded. You have probably noticed that when you open a chart for the first time the chart display the message “Waiting for update”, the time to have enough data to display the chart.

There are various ways to download historical data, in this post we are going to focused on a semi-automatic method, a basic manual method and the history center method:

First - Semi-automatic method:
==========================================================

You can use the attached tool to try to force download historical data.
LH.png
This tool comes as an EA even if it doesn’t open nor manage any trades. It was coded this way to make it easier to save settings as EA presets or templates.

With this tool, you can:
• Choose between 2 methods to download historical data
• Choose between 2 lists of instruments (28 standard pairs or all Market watch instruments)
• Choose between those list’s instruments which one to download
• Choose which timeframes to download

Installation
Make sure to install the file: Goes into MQL4\Experts

Methods
This tool comes with 2 methods to download historical data:

• Method 1: iBars
This iBars method is the most common and fastest method. Please note that this method works only with Forex symbols, for CFD, metals or futures you would have to use Method 2. The iBars() call is supposed to return x number of bars, but actually forces load of 2048 points in an undocumented way in some cases, but not always. This is due to MT4 limitations.

• Method 2: ChartNavigate
To load manually the historical data, you can load a chart, Zoom Out to the max, and then hold down the PageUp key or the Home key. Please note that you have to repeat the same process for each pair’s timeframes. Process long and tedious!

With method 2 available in this tool it is done automatically for you.

When using this method, you'll need to leave this tool do its things and grab a coffee... You will see the tool opening and navigating through the various charts.

List of instruments
You can choose between 2 lists of instruments and you can also specify manually the instrument.

• 28 Standard instruments
Onclick, the tool display the 28 standard pairs. This list can be changed in the EA settings.

• Market watch instruments
Onclick, the tool display all instruments available in the Market watch.

• Manual instruments
You can specify manually the instruments in the edit box. Please make sure to respect the case. If you want, you can specify multiple instruments, make sure to use the comma “,” separator between them.

Each time you modify the edit box, unselect the “Manual instruments” button and then re-select it. The instruments should appear below.

Instruments
Following the list of instruments selected, the instruments will appear here.

You can unselect some them if you don’t want to download the historical data for them.

Timeframes
You can unselect some timeframes if you don’t want to download the historical data for them.

Launch download
Onclick, the tool will start downloading historical data for selected instruments and timeframes.

To see if the tool is running, you can look into your terminal’s experts tab to see the downloading progression status.

For each Pair, you will be notified if the download succeeded of failed, and at the end, if all pairs historical data were downloaded successfully, you will get the message: Failed: none.

On the first attempt, sometimes, some downloads failed. Wait a minute and try it again.

If you are up to date on your history data, then there is nothing to download, the tool will quickly run through the instruments and close.

PS: Some Credit goes to Matt Kennel who has coded a script tool to download historical data a few years ago, thanks.

Second - Manual method:
==========================================================

To load manually the historical data, you can load a chart, Zoom Out to the max, and then hold down the PageUp key or the Home key. Please note that you have to repeat the same process for each pair’s timeframes. Process long and tedious!

Third - History Center:
==========================================================

If some bars are missing on one of your charts, first you can right click on your chart and select refresh, it should fill in the gap if the data are available on broker’s server. If the first method failed, then you can try to go in the history center and delete all timeframe’s data for that currency and start fresh by opening a new chart and redownload historical data.

To download additional data with the history center, first go to the Tools menu and select History Center.

When the History Center screen comes up, double click on the currency pair that you want to download. If the icon next to the time frame is coloured, the prices have been generated for that time frame.

By double-clicking on the time frames with the grey icons, it will take a few seconds to generate the prices for that time frame. The number of records is shown at the top of the screen.

To download the complete history from your broker, click on the Download button. It may take a few minutes to download the data, especially if you have never done it before.

There will be a status bar at the bottom of the screen to show you the progression. Once the data are downloaded you should notice that there are more records in the database.

For any time period, you can change any of the data for each candle. Click on the Edit button to change a candle, delete to remove and Add to insert your own data.

This is useful for fixing bad data from your broker, which can happen once in a while. Fixing the data manually will clean up your charts and make your automated back testing more accurate.

You can also click on the Import button to upload your own data or the Export button will allow you to create a CSV file that you can use in another charting program or in Excel for analysis.

Previous Counter Download: 36
You do not have the required permissions to view the files attached to this post.
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]