Download MetaTrader 5

(MT4) I need to export data from Meta Trader 4 platform to MS Excel/Libre Office in real time.

To add comments, please log in or register
Piotr
1261
Piotr  

Exactly I need every informations about the cuurent Symbol() of MT4 in spreadsheet.

Using MarketInfo() function I need it's value in Excel or Libre Office Calc cells.


For example:

(excel) A1 = (mt4) MarketInfo(Symbol(),MODE_SPREAD)

(excel) A2 = (mt4) MarketInfo(Symbol(), MODE_MARGINREQUIRED)

(excel) A3 = (mt4) MarketInfo(Symbol(), MODE_TICKVALUE)


... is this possible in real time? & HOW TO...? any external library or the other way?

Ian Flanagan
549
Ian Flanagan  

I do this with DDE.. in MT4, Options>Server and check 'Enable DDE server'

You can export these

BID request: = MT4|BID!USDCHF
ASK request: = MT4|ASK!USDCHF
HIGH request: = MT4|HIGH!USDCHF
LOW request: = MT4|LOW!USDCHF
TIME request: = MT4|TIME!USDCHF
QUOTE request: = MT4|QUOTE!USDCHF


It's a bit complex but I use VBA to calculate the figures you mention.

jamc666
20
jamc666  

Activate DDE server on your MT4 Options,

then open the sample .XLS file that is provided in the main MT4 install directory ...


There you have realtime feed into Excel. Can't be any easier

Ian Flanagan
549
Ian Flanagan  

Most things can be calculated from the bid and ask, but other things (like swap) need to be exported from MT4 to a .csv file, which Excel can read. Luckily these things don't change in real time.

If you know how to use VBA I can send you my exporting script to save you some time.

Florent
183
Florent  

Hello MQL4 community, I'm looking for Lite coin, Peer coin and Name coin historical data from FXOpen. DDE server is activated but the only files I found are .hst file (i.e. LTCUSD1440.hst) in this directory but Notepad cannot read it :

Program Files/MetaTrader ECN - FXOpen/history/FXOpen-ECN Demo Server/ 

I've search in all directory but I'm unable to find csv file, can someone help please ? 

 

EDIT : the is DDE-Sample.xls but there is no data in Excel 

Carl Schreiber
7365
Carl Schreiber  

1) You could have done a bit more searching here there a newer threads about DDE

2) In LibreOffice the grammar is different but working as far as I remember (Win 7,64 b600+)

Justin
41
Justin  
Ian Flanagan:

Most things can be calculated from the bid and ask, but other things (like swap) need to be exported from MT4 to a .csv file, which Excel can read. Luckily these things don't change in real time.

If you know how to use VBA I can send you my exporting script to save you some time.


jamc666:

Activate DDE server on your MT4 Options,

then open the sample .XLS file that is provided in the main MT4 install directory ...


There you have realtime feed into Excel. Can't be any easier


Hi Jamc666, I need to export the spread size of multiple fx pairs in real time from MT4 to excel. I have activated the DDE server on MT4, but am not sure how to do the next step you mentioned. Where do you find the sample .XLS file....where is the main MT4 install directory? 

Your help would be appreciated!

Jud

Muhammad Syamil Bin Abdullah
1126
Muhammad Syamil Bin Abdullah  
Justin:


Hi Jamc666, I need to export the spread size of multiple fx pairs in real time from MT4 to excel. I have activated the DDE server on MT4, but am not sure how to do the next step you mentioned. Where do you find the sample .XLS file....where is the main MT4 install directory? 

Your help would be appreciated!

Jud

You may find the DDE sample, in excel file format, in your local C drive > Program Files (x86) > MetaTrader 4. Look at the attached picture.

To add comments, please log in or register