Trade Report to CSV MT4
- Utilities
-
Hirabayashi Masayuki
英語ばかりのEAやインディケータばかりが嫌で主に日本人向けに作ります。
英語表記の場合もありますが、日本語での説明も入れます。
それにしてもMQL5を利用している日本人はどのくらいいるのだろうね。 - Version: 1.1
Step right up, traders! This one is FREE. And it just might change how you read your own results.
Still squinting at MT4's account history, trying to work out which pairs, days and hours are actually paying you? Stop squinting. Trade Report to CSV turns your closed trades into ONE clean spreadsheet-ready file: one trade per row, and a pile of ready-made summaries sitting right beside it. Run it, open it in Excel, and the story of your trading is right there.
■ WHAT YOU GET
Main table, one row per trade (17 columns):
Entry time / Type / Lots / Symbol / Entry price / SL / TP / Close time / Close price / Commission / Swap / Profit / Profit in pips / Magic number / Holding time (minutes) / Close reason / Comment
Summary blocks, placed to the right of the same sheet:
- By magic number x symbol (always output). Running several EAs? Each magic number gets its own block. No setup, no name list to type in.
- Overall summary: total trades, win rate, average pips, profit factor, max win streak, max loss streak, cumulative profit
- By symbol
- By weekday
- By hour (server time)
The overall, symbol, weekday and hour blocks can each be switched on or off with a simple input.
■ HOW TO USE (30 seconds)
1. Drag the script from the Navigator onto any chart.
2. Pick the language (English or Japanese), the period, and which summary blocks you want.
3. Click OK. Open the CSV in Excel. Done!
The file is saved in MQL4\Files (File > Open Data Folder), or in Common\Files if you tick that option.
■ PLEASE READ BEFORE YOU DOWNLOAD (so we have no surprises!)
- Set your Account History to "All History" first. In the Terminal window, right-click the Account History tab and choose All History. MT4 only hands the script what is loaded there. If the file comes out empty or short, this is the cause 9 times out of 10.
- Period: trades are picked by CLOSE time. To include the last day of a month, set the end date to the 1st of the next month.
- Closed trades only. Open positions, pending orders, deposits and withdrawals are not included. A partial close appears as its own row, because that is how MT4 records it.
- Win rate and profit factor use the Profit column only (commission and swap are NOT included). Streaks follow the order of close time.
- Hour block uses SERVER time, not your local time.
- Pips: on 3- and 5-digit symbols, 1 pip = 10 points; on all other symbols, 1 point is counted as 1 pip. Check metals and indices against your own broker's convention.
- Symbols outside your Market Watch can't be read by MT4. If one is missing, the script tries to add it to your Market Watch so pips and prices come out right. You may see that symbol appear there afterwards.
■ DIFFERENCES FROM THE MT5 VERSION
The layout, columns and summaries are the same. MT4 simply does not record some information, so these items differ:
- Close reason is an estimate. MT4 has no close-reason field, so it is read from the broker's [sl] / [tp] / stop-out tags in the comment. Anything else is shown as "EA/Manual" (magic number is not 0) or "Manual" (magic number is 0). Desktop, mobile and web closes cannot be told apart.
- SL / TP show the final values at the time of closing. If you moved them during the trade, you see the last ones, not the originals.
- The broker's [sl] / [tp] tag is removed from the Comment column so your own comment stays readable.
■ GOOD TO KNOW
- The CSV is written in your PC's standard (ANSI) encoding, which Excel on a Japanese or English Windows opens normally.
- This script only reads your history and writes a file. It never places, modifies or closes a trade.
Need MT5? There is an MT5 version too. Same idea, with exact close reasons and original SL/TP.
Download it, run it, and let your own numbers tell you where your edge really is. Happy trading!
Still squinting at MT4's account history, trying to work out which pairs, days and hours are actually paying you? Stop squinting. Trade Report to CSV turns your closed trades into ONE clean spreadsheet-ready file: one trade per row, and a pile of ready-made summaries sitting right beside it. Run it, open it in Excel, and the story of your trading is right there.
■ WHAT YOU GET
Main table, one row per trade (17 columns):
Entry time / Type / Lots / Symbol / Entry price / SL / TP / Close time / Close price / Commission / Swap / Profit / Profit in pips / Magic number / Holding time (minutes) / Close reason / Comment
Summary blocks, placed to the right of the same sheet:
- By magic number x symbol (always output). Running several EAs? Each magic number gets its own block. No setup, no name list to type in.
- Overall summary: total trades, win rate, average pips, profit factor, max win streak, max loss streak, cumulative profit
- By symbol
- By weekday
- By hour (server time)
The overall, symbol, weekday and hour blocks can each be switched on or off with a simple input.
■ HOW TO USE (30 seconds)
1. Drag the script from the Navigator onto any chart.
2. Pick the language (English or Japanese), the period, and which summary blocks you want.
3. Click OK. Open the CSV in Excel. Done!
The file is saved in MQL4\Files (File > Open Data Folder), or in Common\Files if you tick that option.
■ PLEASE READ BEFORE YOU DOWNLOAD (so we have no surprises!)
- Set your Account History to "All History" first. In the Terminal window, right-click the Account History tab and choose All History. MT4 only hands the script what is loaded there. If the file comes out empty or short, this is the cause 9 times out of 10.
- Period: trades are picked by CLOSE time. To include the last day of a month, set the end date to the 1st of the next month.
- Closed trades only. Open positions, pending orders, deposits and withdrawals are not included. A partial close appears as its own row, because that is how MT4 records it.
- Win rate and profit factor use the Profit column only (commission and swap are NOT included). Streaks follow the order of close time.
- Hour block uses SERVER time, not your local time.
- Pips: on 3- and 5-digit symbols, 1 pip = 10 points; on all other symbols, 1 point is counted as 1 pip. Check metals and indices against your own broker's convention.
- Symbols outside your Market Watch can't be read by MT4. If one is missing, the script tries to add it to your Market Watch so pips and prices come out right. You may see that symbol appear there afterwards.
■ DIFFERENCES FROM THE MT5 VERSION
The layout, columns and summaries are the same. MT4 simply does not record some information, so these items differ:
- Close reason is an estimate. MT4 has no close-reason field, so it is read from the broker's [sl] / [tp] / stop-out tags in the comment. Anything else is shown as "EA/Manual" (magic number is not 0) or "Manual" (magic number is 0). Desktop, mobile and web closes cannot be told apart.
- SL / TP show the final values at the time of closing. If you moved them during the trade, you see the last ones, not the originals.
- The broker's [sl] / [tp] tag is removed from the Comment column so your own comment stays readable.
■ GOOD TO KNOW
- The CSV is written in your PC's standard (ANSI) encoding, which Excel on a Japanese or English Windows opens normally.
- This script only reads your history and writes a file. It never places, modifies or closes a trade.
Need MT5? There is an MT5 version too. Same idea, with exact close reasons and original SL/TP.
Download it, run it, and let your own numbers tell you where your edge really is. Happy trading!
