History Dump CSV with Heat Map for Excel Analysis
Info
The History Dump CSV with Heat Map for Excel Analysis is a Script for MetaTrader 4 that do you want to analyze your trading performance by time of day. This script generates a CSV file of your order history, enabling you to import and examine it in Excel.
Usage
This tool is typically used for enhancing chart analysis and decision making.
Platform
This Script works exclusively on MetaTrader 4 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL4/Scripts folder via File ? Open Data Folder in MetaTrader 4.
How to Install and Use History Dump CSV with Heat Map for Excel Analysis
1. Installation: Move your script file into the MQL/Scripts directory and restart the platform.
2. Execution: Drag the script onto a chart; it will perform a one-time action, such as closing all open orders or clearing chart objects.
3. Editing: Use MetaEditor (F4) to modify code, click "Compile," and verify no errors appear in the terminal before running.
4. Removing: Scripts stop automatically, but you can remove them manually by right-clicking the chart and choosing "Remove Script."
Frequently Asked Questions
Q: How are scripts different from EAs? A: Scripts execute a single action and then stop; EAs monitor the market and trade continuously.
Q: Can I assign a hotkey to a script? A: Yes, right-click the script in the Navigator, select "Set Hotkey," and define your preferred keyboard shortcut.
Q: Why did my script stop? A: Scripts are designed to stop immediately after finishing their programmed command; this is normal behavior.
What this tool does
Do you want to analyze your trading performance by time of day.
Typical Use Case
This Script excels in automated trading and technical analysis on MetaTrader 4.
Compatible Platform & Setup
This Script works on MetaTrader 4. Place the file in the MQL4/Scripts folder and restart the terminal.
Description & Settings
Related: VR Orders History Lite - another powerful script for MetaTrader 4 traders.
Do you want to analyze your trading performance by time of day? This script generates a CSV file of your order history, enabling you to import and examine it in Excel.Also recommended: Automatic History Archive Download - similar script with strong performance on MetaTrader 4.
It captures all order details, including date and time in both MetaTrader and Excel formats. Additionally, it facilitates aggregate analysis by generating a 'heat map' based on day and time slots. Days are numbered 0-6, and slots are divided into 0-95, with each slot representing a 15-minute interval.
The script saves the output file in the
Note: If you've filtered your account history, the script will extract data only from the filtered period. Remove the filter to include your entire history.
The CSV file includes all available MT4 trading attributes and the following calculated values:
- Sequence number for data sorting
- Net profit (profit - swap - commission)
- Transaction type (e.g., 'op_sell', 'op_buystop')
- Price move (openprice - closeprice)
- Points and pips values
- Potential win/loss pips based on take-profit and stop-loss levels
- Trade duration in minutes
- Heat map values for open and close times, including day, slot, and hour
These values enhance your Excel pivot reports, helping you understand and optimize your trading profile.
The script is designed for 4 and 5-digit brokers and adjusts point and digit values accordingly. It considers broker server time, which is crucial when comparing data from different time zones.
Customization:
The script is self-contained and doesn't require confirmation. You can customize it by adjusting the following:
- reportfilename: Specify the output file name and location.
- delim: Choose a delimiter (' ', ';', or ',').
- slotsperhour: Define time slots for data aggregation (e.g., 2 for 30-minute slots, 3 for 20-minute slots, 1 for 1-hour slots).
- sendfilebyftp: Enable or disable FTP file transfer.
The script includes FTP functionality to send the report to a remote server, allowing centralized data collection from multiple MT4 terminals.
Usage:
Drag the script onto any chart to run it. It will confirm the file generation. You can then locate and analyze the file in Excel, creating pivot reports and graphs for in-depth trading insights.
You may also like: loc line pips history - excellent alternative for script users on MetaTrader 4.
Source Code
#property copyright "robotfx"
#property link "https://robotfx.org"
#property version "1.03"
#property strict
#property description "this code is educational. feel free to use, modify and upgrade as you wish. visit robotfx.org for professional trading tools"
#property description "this code is educational. feel free to use, modify and upgrade as you wish. visit robotfx.org for professional trading tools"
#property description "this code is educational. feel free to use, modify and upgrade as you wish. visit robotfx.org for professional trading tools"
#property description "this code is educational. feel free to use, modify and upgrade as you wish. visit robotfx.org for professional trading tools"
#property description "this code is educational. feel free to use, modify and upgrade as you wish. visit robotfx.org for professional trading tools"
#property description "this code is educational. feel free to use, modify and upgrade as you wish. visit robotfx.org for professional trading tools"
.......
⚠ Limitations & Risk Warning
- This tool is provided for educational and testing purposes only.
- Past performance does not guarantee future results.
- Trading involves substantial risk of loss. Use on a demo account first.
- Results may vary depending on market conditions, broker, and settings.
- We recommend thorough backtesting and forward testing before using with real funds.