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

Back to topics list To post a new topic, please log in or register
avatar
1108
puncher 2013.09.10 18:56
 

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?



 
avatar
315
alladir 2013.09.10 19:59 #
 

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.

 
avatar
4
jamc666 2013.09.10 20:57 #
 

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

 
avatar
315
alladir 2013.09.11 04:52 #
 

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.

 
avatar
1
Florew 2015.03.05 20:34 #
 

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 

avatar
2017
gooly 2015.03.05 22:41 #
 

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

Back to topics list  

To add comments, please log in or register