MT4 History data generation - page 2

Sergey Golubev
Moderator
118984
Sergey Golubev  

And I can remind about the following - 

----------------

How to prepare MT4 for backtesting/trading with some pair

Forum on trading, automated trading systems and testing trading strategies

MT4 History data generation

Sergey Golubev, 2016.05.28 10:58

Hi peperibal:

It is not a fully related to your questions but it is about what I am doing when I want to backtest/check/trade using some pair for example:

1. I open MT4.

2. Open USDJPY H1 chart (if I want to do something with this pair).

3. Go to Tools - History Center, find this pair and double mouse click on every pair's timeframe so

before double-mouse click on every timeframe there:


after:


So, by this action - I downloaded the history for this pair to MT4.

4. Now I want to transfer this history to the chart (to trade, for backtesting, and so on).

So, I change timeframe for USDJPY chart to M1, right mouse click on any space of the chart and choose 'Refresh', and all history is loaded to the chart - and I can see it from the Journal about how many bars were loaded from my MT4 History Center to this chart:


Same with M5 timeframe (Refresh), same with M15 and so on up to MN.

----

After that only I will backtesting/trading or whatsoever anything with this pair (USDJPY in our example).

Just my experience


googollien
24
googollien  

Guys, too many replies tried to tell me how to download historical data like I never download historical data for over 3 years & hundreds times,
and like I never have enough experience to teach others how to download them.

Let me reply you all in this post and not to quote everyone's post here.

To clarify things doing, you must know these:

  1. Your brokers will keep maximum data period about 2 or 3 months only.
  2. If you don't have any historical data, MT4 will try to ask your brokers' servers to feed it about 2048 ~ 4096 (depends on MT4 builds)
    candles of each time frame when your chart just opened.
  3. If you wanna see more than 2048 candles, you must scroll left of your chart to let MT4 ask for more data from your brokers' servers
    until reached the maximum amount your brokers have kept on their servers. (Feeding data need time so don't scroll too fast.)
  4. After you can not see any new data from your brokers, go to data center to download more from MetaQuotes data center.
    (Please see the 1st line of message in your download warning dialog, I had taken a screenshot in the attachment and using
    cyan color line to quote it. After you saw it, you can still believe all data are from your brokers and telling the
    MetaQuotes are lying [I don't think so]
    , because they told you data of "History Center" are all from MetaQuotes,
    and try to warn you it will replace your local history data file on your hard drives.
    )

Are we clear with how the historical data coming to your local files till this line?

If so, good, let see how to do when you wanna reproduce ANY ISSUE of historical data, you must follow all these steps:

  1. Exit whole MT4. (Let MT4 never modify history data files again)
  2. Go to MT4 data folder, and delete all files under "history" folder.
  3. Launch MT4 again.
  4. Choose "Tools -> Options -> Charts" on your menu, fill "Max bars in history" with "2147483647" (for all history data since human
    did 1st trade), and fill "Max bars in chart" with any larger number like "65000" or more, click "ok" button to make it accepted.
  5. F2 key to data center.
  6. Choose most popular currency pair like "EURUSD", and "M1". (For the most detail of data, NOT ANY OTHER TIME FRAME,
    THIS IS MOST IMPORTANT! MT4 will automatically regenerate other time frame data from M1 when you switch to others.)
  7. Click "Download" button, and see "Download Warning" dialog. (The fist line on this dialog, "You are going to download data
    from 
    the *MetaQuotes Software Corp.* history data,...", guys who want to tell me the data in "History Center" are from
    your brokers, 
    are you trying to tell me MetaQuotes put this message to tell lies to cheat me? I don't think so!)
  8. Maybe some other Warning Dialog will show, just click "OK" or "YES" then kick it to go.
  9. After the processing bars filled with color and reach 100% (took minutes to 1 or 2 hours), you must see about
    "Database: 65000 / 7151335 records" on the top of the download dialog, then you can be sure all historical M1 data has
    been feed to your local hard drives.
  10. Use your eyes to check the data in the table grids, you will see if there are any mistakes.
  11. Exit whole MT4 again. (For MT4 to do a "BIG REFRESH" to cache data quite correctly. Don't use "Charts -> Refresh" on your
    menu only, you don't know how your indicators or EA to grab data, I won't take my money to bet on it, if you want, just
    go ahead.
    )
  12. Re-launch MT4 again, drag EURUSD chart to switch on every time frame from M1, M5....to MN.
  13. Check the chart if anything missing.

Are we done here? Everyone is satisfied with all these steps now?

When I typing this post, I redo all steps again, and yes, data has come back!!! Something wrong has been fixed "silently"!!!
So you guys may not see it anymore after you have read my previous posts.

Please be advised I am not a fool telling lies or being j**k on previous posts, we have at least 3 guys using at least 6 different brokers
had found missing Nov. data since about 2 weeks ago. We are all heavy EA users and using much historical data to collect Big Data,
sometimes we will download other pairs' data we are not using everyday for testing multiple pairs trading, or sometimes the historical
would just have some issues after strategy testing many times (Never understand why?), so we have found this issue for awhile at early
stage by downloading data often.

Maybe it was not caused by Build 1160, but it was truly existed, probably the principle between Brokers / History Center are not
stable in the past days, so there was a gap which was both of Broker and History Center did not feed any data.

Anyway, issue has been gone, thanks you all guys, and hope this post let everyone know more about historical data.

Files:
bug.png 13 kb
Sergey Golubev
Moderator
118984
Sergey Golubev  

googollien:

...

If so, good, let see how to do when you wanna reproduce ANY ISSUE of historical data, you must follow all these steps:

  1. Exit whole MT4. (Let MT4 never modify history data files again)
  2. Go to MT4 data folder, and delete all files under "history" folder.
  3. Launch MT4 again.
  4. Choose "Tools -> Options -> Charts" on your menu, fill "Max bars in history" with "2147483647" (for all history data since human
    did 1st trade), and fill "Max bars in chart" with any larger number like "65000" or more, click "ok" button to make it accepted.
  5. F2 key to data center.
  6. Choose most popular currency pair like "EURUSD", and "M1". (For the most detail of data, NOT ANY OTHER TIME FRAME,
    THIS IS MOST IMPORTANT! MT4 will automatically regenerate other time frame data from M1 when you switch to others.)
  7. Click "Download" button, and see "Download Warning" dialog. (The fist line on this dialog, "You are going to download data
    from 
    the *MetaQuotes Software Corp.* history data,...", guys who want to tell me the data in "History Center" are from
    your brokers, 
    are you trying to tell me MetaQuotes put this message to tell lies to cheat me? I don't think so!)
  8. Maybe some other Warning Dialog will show, just click "OK" or "YES" then kick it to go.
  9. After the processing bars filled with color and reach 100% (took minutes to 1 or 2 hours), you must see about
    "Database: 65000 / 7151335 records" on the top of the download dialog, then you can be sure all historical M1 data has
    been feed to your local hard drives.
  10. Use your eyes to check the data in the table grids, you will see if there are any mistakes.
  11. Exit whole MT4 again. (For MT4 to do a "BIG REFRESH" to cache data quite correctly. Don't use "Charts -> Refresh" on your
    menu only, you don't know how your indicators or EA to grab data, I won't take my money to bet on it, if you want, just
    go ahead.
    )
  12. Re-launch MT4 again, drag EURUSD chart to switch on every time frame from M1, M5....to MN.
  13. Check the chart if anything missing

Yes, seems - it is the other procedure to fix the data issue.
I updated this old post #932 with your instruction.

Thanks.