(MQ4) Export Close Bars into HTML or CSV file - question

 

Hi,


Can anybody help me how to export close bar values from current symbol into HTML or CSV file from MT4?

Attention: Each HTML/CSV file with current period (for example PERIOD_H1 ) should have max 400-500 bars.

The file should contains two columns: DATA_TIME, CLOSE_VALUE.


I would like to work with the file under MS Excel or Libre Office.


Regards,

Puncher



 
puncher:

Hi,

Can anybody help me how to export close bar values from current symbol into HTML or CSV file from MT4?

Attention: Each HTML/CSV file with current period (for example PERIOD_H1 ) should have max 400-500 bars.

The file should contains two columns: DATA_TIME, CLOSE_VALUE.

I would like to work with the file under MS Excel or Libre Office.

Regards,

Puncher

Either create script with file operation (https://docs.mql4.com/files) or open your chart and press Ctrl + S.
 
phi.nuts:
Either create script with file operation (https://docs.mql4.com/files) or open your chart and press Ctrl + S.

ok thx
 
phi.nuts:
Either create script with file operation (https://docs.mql4.com/files) or open your chart and press Ctrl + S.

Can I other way use one script for each Symbol() in order to not open each chart and click ctrl+s?

Other question, can I connect MT4 to Libre Office (Open Office product) or MS Excel and How To?

 
puncher:

Can I other way use one script for each Symbol() in order to not open each chart and click ctrl+s?

Other question, can I connect MT4 to Libre Office (Open Office product) or MS Excel and How To?

Sure you can do that, to get the symbol's value just use timeseries access function (https://docs.mql4.com/series) like iTime(), iClose, etc. However, to get all the list of traded symbol in that MetaTrader, I think you have to modify this code base https://www.mql5.com/en/code/10347 coz there's no function to retrieve all traded symbol in MetaTrader 4 - that ability only available in MT5.

I never try to connect excel (or libre/open office) to MT4 but there's a sample in where you install MetaTrader 4 called DDE-sample.xls - which you may want to figure it out :D.

Reason: