Loading…

Losing Trade Autopsy Sheet

Reviewing losses one at a time in the Account History tab means scrolling, right-clicking and reading a dozen narrow columns per trade, with no duration in words, no pips, no R-multiple and no comment on how the trade actually closed. A real post-mortem needs that context laid out in one place per trade, not reconstructed by hand every time. This script scans closed history for losing trades only and writes one "page" per trade to a single text file: symbol and side, lot size, open and close time and price, duration in words, the recorded stop and target, result in pips and R-multiples, the commission/swap/profit breakdown, and a plain-language verdict - closed at the recorded stop, closed at the recorded target (worth investigating on a loser), or closed away from both, most likely a manual exit or a margin close-out. The R-multiple and verdict both carry a stated caveat that matters: MT4 keeps only the FINAL stop loss on a closed order, not the stop that was in place at entry. A trade whose stop was trailed or moved to breakeven during its life will show a risk figure based on wherever the stop ended up, not what was actually risked when the trade was opened - the header of every generated file says this plainly, because it is the single number in this report most likely to be misread as "my original planned risk." Notes and limitations - The R-multiple and "stopped out" verdict are both computed from the FINAL recorded stop loss, not the entry stop - see the full description. Treat them as descriptive of how the trade ended, not proof of the risk originally accepted. - Balance operations, credits and cancelled pending orders are never included - only closed market orders (buy/sell) that resulted in a net loss are autopsied. - The tool only reads history; it never touches an open order, a pending order or a chart object. - Report generation depends on the terminal's own history cache. If a known losing trade is missing from the report, load more history in the Account History tab first and run again.

Script · MT5 · v1.0 · Free

About Losing Trade Autopsy Sheet

Losing Trade Autopsy Sheet 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: LosingTradeAutopsy.ex5, LosingTradeAutopsy.mq5, LosingTradeAutopsy.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 autopsy this chart's symbol
Min loss money0.0Ignore losses smaller than this (account currency, 0 = all)
File namelosing_trade_autopsy.txtWritten to MQL5\Files

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: Alerts · MT5 Script · MQL5 Source Code

MQL4 & MQL5 scripts · PolyMaria