Exporting MT4 Data to Excel

 

Hello, i want to know if its possible to export specific data onto an excel sheet, e.g. i'd like to import the open and close times of the 1 hour candles at 12:00 and 13:00. i'd like this to automatically available rather than me having to go through it day by day to find out that information. This is needed for me so i can match this information to the backtested data that i have gathered from the MT4 tester function. i have tried different things such as creating an EA that will "Print" the information, but that only goes into the logs, which is a notepad document.

 
akz17:

Hello, i want to know if its possible to export specific data onto an excel sheet, e.g. i'd like to import the open and close times of the 1 hour candles at 12:00 and 13:00. i'd like this to automatically available rather than me having to go through it day by day to find out that information. This is needed for me so i can match this information to the backtested data that i have gathered from the MT4 tester function. i have tried different things such as creating an EA that will "Print" the information, but that only goes into the logs, which is a notepad document.

Hi akz17, sure you can.  An option is writing a short Expert Advisor that takes your specific data for a given Symbol and Timeframe, then to output them to a CSV file thru functions such as FILEOPEN, FILEWRITE, FILECLOSE.  You may find in the FILEOPEN function varies options such as setting up that the file being open is for output, target is CSV, and even indicate the delimiter.

You may enhance the attached template.

Files:
myHistory.mq4  3 kb
 

Excel

Systems and tools

  1. Working with Excel (tools, indicators, conversion ...) - the thread 
  2. Forex data converters thread 
  3. MULTI FIBO CALCULATOR with DDE off course - the thread 
  4. FX risk calculator with DDE - the thread 
  5. Excel Spreadsheet to simulate cost averaging strategies objectively - the thread 

Articles

  1. MQL5 Cookbook: Writing the History of Deals to a File and Creating Balance Charts for Each Symbol in Excel - the article
  2. How to Prepare MetaTrader 5 Quotes for Other Applications - the article

CodeBase

  1. Export Indicator's Values - MT5 tool 
  2. Export Calculated Prices & Indicator Buffers - script for MetaTrader 5
  3. Symbols to Excel - script for MetaTrader 5
  4. Export Summary Grouped by Symbols - script for MetaTrader 5
  5. Export Summary Grouped by Trading Days - script for MetaTrader 5
  6. VR Orders History MT5 Lite - script for MetaTrader 5
  7. DDE - Server - MT5 tool
  8. History Dump CSV with heat map for Excel analysis - MT4 tool 
  9. MS Excel: Data Exchange and Management - MT4 tool 
  10. Export to Excel in Real Time - MT4 tool 
  11. MetaCOT 2 CFTC ToolBox (Set of Indicators) MT4 - COT in Excel 
  12. Export Trades to excel - MT4 script 
  13. Converting hst-files into csv files - MT4 tool
 
akz17:

Hello, i want to know if its possible to export specific data onto an excel sheet, e.g. i'd like to import the open and close times of the 1 hour candles at 12:00 and 13:00. i'd like this to automatically available rather than me having to go through it day by day to find out that information. This is needed for me so i can match this information to the backtested data that i have gathered from the MT4 tester function. i have tried different things such as creating an EA that will "Print" the information, but that only goes into the logs, which is a notepad document.

Open the latest post of MQ with: "New MetaTrader 5 platform build .."  and post the wish of adding an new entry in the context menu of a specific bar (or a shortkey like Ctrl+C which does actually nothing if the mouse is on the chart) that copies all values of the data window to the clipboard so that they easily can be pasted into an Excel sheet.

I think the more users do this MQ finally will provide it?

Reason: