Exporting MT4 data into Excel

 

Hi

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?

Thanks 

 

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:

https://docs.mql4.com/basis/operators/while

https://book.mql4.com/operators/while

This explains how to write to .csv:

https://book.mql4.com/functions/files

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).

https://docs.mql4.com/basis/types/literal

 
I never try this : Open daily chart, press Ctrl + S and you better have enough memory in your RAM.
 
phi.nuts:
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.

 

Cheers! 

 

<Removed>

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

Reason: