Exporting MT4 data into Excel

Back to topics list To post a new topic, please log in or register
fxreuben 2012.10.18 22:28


I'm trying to create a spreadsheet in Excel 2010 that displays the High Low Open Close for EUR/USD each day for one year.

I've tried using DDE in MT4 but can only seem to get the High and Lows from that.

Does anyone have an idea as to how I should go about this? If not with MT4 and DDE then where can I find a reliable price stream?




clerin6 2012.10.18 22:51 #

You could create a cycle which cycles back through each bar one at a time, and prints the relevant data to .csv each bar. With this you could then export practically any other timeseries data you need as well.

This explains how to use a cycle:



This explains how to write to .csv:


Both of these are invaluable in coding for forex. They are worth developing, since you now have a good motivation.

If you want a short cut then I know that the platform which BarclaysFX offers allows you to export chart data to excel. I imagine their demo platform would have the same function. But I recommend that you stick with MT4 and use this as an excuse to improve your coding.

EDIT: .csv files can be opened in excel by the way. You can format the data when you write to the file to make it easily readable in excel. Adding "\n" in a string adds a new line, and adding "\t" adds a tab (ie. moves data one column to the right in excel).


fxreuben 2012.10.19 06:12 #
I never try this : Open daily chart, press Ctrl + S and you better have enough memory in your RAM.

Exactly what I was looking for!

For anyone that does this and want to know the order of the values in the .csv : OHLCV


also clerin6 thanks for the help, I certainly will be looking to improve my skills with mql.



alaserm2 2016.02.19 07:27 #


Moderator: Do not drag up old threads in order to advertise

Back to topics list  

To add comments, please log in or register