Loading…

Trade Journal Template Writer

Journaling works when it is easy to start and painful to lose. Typing the ticket, symbol, prices and duration by hand before writing the part that actually matters - what you were thinking - is friction that stops most journals after a week. This script fills in everything the terminal already knows: direction, volume, open and close time and price, duration in a readable form, pips, commission, swap, and net result. Underneath that it adds a fixed set of reflection headings with blank space beneath each one, ready for the trader's own words. The one decision that matters here is what happens on a second run. A naive version regenerates every file from the template and would silently erase a week of typed reflections the moment it is run again to pick up new trades. This script checks whether a trade's journal file already exists and skips it outright unless overwriting is explicitly turned on - a journal you are afraid to re-run is a journal you stop using. Notes and limitations - Market trades only. Balance operations and cancelled pending orders are not journaled - there is nothing to reflect on for either. - Filenames are built from ticket/position ID, symbol and close date, so they stay stable across runs and sort naturally in a file browser. - On MQL4, the script only reads what MT4's Account History tab has loaded - choose "All History" first if trades are missing. MQL5 has no equivalent limitation; it always loads the full history range itself. - Stop loss and take profit shown are the ORIGINAL values set at entry, not necessarily what was in force when the position closed, on both platforms. - Reflection prompts are fixed headings, not configurable per run. Editing the source is the way to change them for your own use.

Script · MT5 · v1.0 · Free

About Trade Journal Template Writer

Trade Journal Template Writer is a script for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 5 settings, such as From date, To date and Current symbol only. MQL source code included.

Files in the download: TradeJournalTemplateWriter.ex5, TradeJournalTemplateWriter.mq5, TradeJournalTemplateWriter.txt.

Settings

SettingDefaultWhat it does
From date0From close time (1970.01.01 = no lower bound)
To date0To close time (1970.01.01 = up to now)
Current symbol onlyfalseOnly this chart's symbol
Output folderTradeJournalSubfolder under MQL5\Files
Overwrite existingfalseOverwrite files that already exist (destroys any notes written in them)

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Scripts.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the script onto a chart to run it once.

Download the PDF guide

Tags: Volume · Alerts · MT5 Script · MQL5 Source Code

MQL4 & MQL5 scripts · PolyMaria