Download MetaTrader 5
To add comments, please log in or register
Do you need a programmer? Freelance service will find the developer you need!
Reuben
9
Reuben 2012.10.18 20:28 

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 

Clerin
176
Clerin 2012.10.18 20: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:

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

phi nuts
2185
phi nuts 2012.10.19 01:15  
I never try this : Open daily chart, press Ctrl + S and you better have enough memory in your RAM.
Reuben
9
Reuben 2012.10.19 04:12  
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! 

Andy
3
Andy 2016.02.19 06:27  

<Removed>

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

/
To add comments, please log in or register