Trade Note Chart Pinner
A journal note is only useful if it gets read again at the right moment. Kept in a folder of text files it is easy to forget entirely; kept only in memory it fades. This script closes that gap by reading the per-trade journal files a companion template tool writes ("Journal_<ticket>_<symbol>_<date>.txt", key: value header, then a "--- REFLECTION ---" section) and drawing a small marker plus a short text label at each trade's own open time and open price on the chart itself - the lesson sits next to the price action it was written about, not in a separate window. Each pin prefers the "Lesson for next time" line if one was written, and falls back to the "Setup / reason for entry" line if not; whichever is used, the full text goes into the object's tooltip so the on-chart label can stay short without losing detail. Every object this script creates carries a shared name prefix, so a second run with InpClearExisting can wipe the previous set cleanly before drawing a fresh one - stale pins never pile up silently across repeated runs. Notes and limitations These pins are meant to persist on the chart after the script finishes - that is the whole point of the tool, and a deliberate exception to the usual rule that a script's chart objects are cleaned up at the end of its run. Only trades whose journal file has something written under "Lesson for next time" or "Setup / reason for entry" get pinned; a journal file that exists but was never filled in is silently skipped (run Journal Completeness Auditor first to find those). Only pins trades on the chart's own symbol, since a note anchored at a price on the wrong instrument would be meaningless.
Script · MT4 · v1.0 · Free
About Trade Note Chart Pinner
Trade Note Chart Pinner is a script for MetaTrader 4. It draws buy and sell arrows on the chart and can alert you with a pop-up, sound, email or push message. It has 8 settings, such as Journal folder, From date and To date. MQL source code included.
Files in the download: TradeNoteChartPinner.mq4, TradeNoteChartPinner.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Journal folder | TradeJournal | Subfolder under MQL4\Files holding journal entries |
| From date | 0 | From open time (1970.01.01 = no lower bound) |
| To date | 0 | To open time (1970.01.01 = up to now) |
| Max excerpt chars | 60 | Excerpt length shown on the chart label (full note stays in the tooltip) |
| Object prefix | TNP_ | Prefix on every object this script creates - safe to bulk-delete by name |
| Clear existing | true | Remove this script's previous pins before drawing new ones |
| Marker color | clrDodgerBlue | Pin marker colour |
| Text color | clrDodgerBlue | Pin label text colour |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Scripts.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the script onto a chart to run it once.
Tags: Buy/Sell Arrows · Alerts · MT4 Script · MQL4 Source Code