Export Terminal Account History to (Excel) Spread Sheet for Analysis

 

I'm trying to figure out how to export the Account History and get it into an (Excel) Spread Sheet for Analysis.

I did a search, but didn't find a solution.

Thanks to any and all for any assistance.

 
FourX:

I'm trying to figure out how to export the Account History and get it into an (Excel) Spread Sheet for Analysis. [...]

Create a report and Copy-Paste into excel.
 

Hi Gordon,

I have tried and done that G0rdon. The problem is that the HTML file format is not directly compatible with Excel. Specifically their is a CRLF <Enter> before the end of each record that wraps it down to a second line that ends up messing up the record when it is pasted into the SpreadSheet. I was hoping to be able to either directly save it as a CSV file or convert it from the HTML report file to a CSV that is more compatible with SpreadSheets without having to manually edit each and every record to get it into a usable format.

Though I was unable to find one here, I was hoping that perhaps someone had made a script file or some other method for this already. It is very unlikely that I am the first person to want to do this and run into this problem.

 

You tried to save the file with the extension ("XLS" not with "HTM")

 
qjol:

You tried to save the file with the extension ("XLS" not with "HTM")

Nope, but will try it thanks.

I know from previous searches that there are a number of MT4 <=~=> Excel interfaces. I'll revisit these and look for something useful there as well. I'll post the results here if I come up with anything useful.

 
qjol:

You tried to save the file with the extension ("XLS" not with "HTM")

Just makes it worse. Even tried opening the HTML into WinWord then converting it to an XML, but it isn't valid. The MT4 generated HTML report opens just fine in Excel as is, except that it rolls the last 2 cells to the end of the next row. I'm trying to make a Macro in Excel to automate moving them to the end of the first row so that they are all on one line, which would at least make it quicker and easier. Especially if I can get it to start at the top and continue through the whole report. But at this point in time, I can't even get the Macro to work on a single row / line.
 

Solution :

'Publish' the ForEx account free to MyFxBook.Com, a sight set up specifically for this purpose.

, In your web browser from the Portfolio tab, view the account that you want to get into an (Excel) Spread Sheet.

, In the upper right hand corner, select either the csv or the HTML :

,, The HTML version will be shown in your web browser, which you can then save.

,, Selecting the CSV version will prompt you to save the report in this 'Comma Separated Values' format.

,,, The HTML version has more information in the header about the account.

,,, The CSV . version has all of the columns of data in it.

 
FourX:
Just makes it worse. Even tried opening the HTML into WinWord then converting it to an XML, but it isn't valid. The MT4 generated HTML report opens just fine in Excel as is, except that it rolls the last 2 cells to the end of the next row. I'm trying to make a Macro in Excel to automate moving them to the end of the first row so that they are all on one line, which would at least make it quicker and easier. Especially if I can get it to start at the top and continue through the whole report. But at this point in time, I can't even get the Macro to work on a single row / line.
Have you found a solution to your problem - I also have exactly the same question - each weekend I diligently "Cut & Paste" the comments onto the 1st Line of the trade to better able to anaylise each pair. Cheers Oldie
 
i have seen a script that saves all accounthistory to a csv file, somewhere around here, just search
 
FourX:

I'm trying to figure out how to export the Account History and get it into an (Excel) Spread Sheet for Analysis.

I did a search, but didn't find a solution.

Thanks to any and all for any assistance.


Loop Bars or orders or history ... FileOpen(FILE_CSV|FILE_READ|FILE_WRITE)... FileSeek (SEEK_END) ...FileWrite ...FileClose

or

FileOpen(FILE_CSV|FILE_READ|FILE_WRITE)... FileSeek (SEEK_END) ...(Loop Bars or orders or history and FileWrite) ...FileClose

Excel usually can open and convert CSV without problems

See https://docs.mql4.com/files

 
EADeveloper:


Loop Bars or orders or history ... FileOpen(FILE_CSV|FILE_READ|FILE_WRITE)... FileSeek (SEEK_END) ...FileWrite ...FileClose

or

FileOpen(FILE_CSV|FILE_READ|FILE_WRITE)... FileSeek (SEEK_END) ...(Loop Bars or orders or history and FileWrite) ...FileClose

Excel usually can open and convert CSV without problems

See https://docs.mql4.com/files

Thanks for the Info and assistance EA Developer. Having very limited MQL programming experience in general and none with generating saved files I'm not even sure what you mean by 'Loop around.

As initially noted, I can load the saved CSV files into Excel. However it puts a 'line feed' before the end of the data from each trade and locates them below the rest of the info which makes them into useless MishMash unless I fix each trade manually one by one. I did try making a macro in Excel 2007 for this, but had no luck with it either

This won't help me with Commercial Bots that I do not have the source code for. However as you may have seen above, I have an easily accommodated and successful 'WorkAround' solution for these instances.

Reason: