Loading…

Evaluation Evidence Recorder

A payout dispute with a prop firm usually comes down to one question: what actually happened, and when. A broker statement shows closed trades but not the moment a stop was moved, and memory is not evidence. This EA watches the account on every tick and writes one CSV row per event as it happens - order opened, an SL or TP changed, an order closed with its final profit/swap/commission, a new equity low made, the day's floating loss crossing a configurable percent of the day-start balance, and the terminal's connection dropping or returning - each stamped with both server time and UTC time plus the balance and equity at that instant. The one design decision worth explaining: MQL4 has no dedicated append mode for file writes. Opening a file with plain FILE_WRITE truncates it, which would destroy exactly the evidence this tool exists to preserve. Every write instead opens the file with FILE_READ|FILE_WRITE and seeks to the end first, so each new event is appended onto whatever the file already contains, including everything written in previous sessions across terminal restarts. The log file rotates automatically at each broker-day boundary (a fresh file per calendar day, named with the account number and date), so a long evaluation does not accumulate into one unbounded file and a specific day's activity is easy to hand over on its own. Notes and limitations - Report-only. This EA never calls OrderSend, OrderModify or OrderClose - it only reads account and order state and writes it to a file. - It only sees state changes at tick speed. On an illiquid symbol with long gaps between ticks, an SL/TP change or a close could in principle be followed almost immediately by another change before this EA's next tick - the log records what it observed, not a guaranteed complete history of every intermediate state a very fast sequence of changes might have passed through. - Closed-order detail (profit, swap, commission, close price) is read via OrderSelect by ticket immediately after the ticket disappears from the open pool; if that historical record is ever unavailable the row is still written, but with a placeholder instead of the closed figures. - The log is a local file on this machine. It is evidence you hold, not a third-party attestation - treat it as supporting documentation for a dispute, not as a substitute for your own trade statements from the broker or prop firm platform. - Daily-loss and equity-low checks use AccountEquity(), which includes floating P/L on currently open positions, not only closed results.

Expert advisor · MT5 · v1.0 · Free

About Evaluation Evidence Recorder

Evaluation Evidence Recorder is a script for MetaTrader 5. It has 6 settings, such as File prefix, Use common folder and Magic filter. MQL source code included.

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

Settings

SettingDefaultWhat it does
File prefixEvidenceLog_Log file name prefix; account number and date are appended
Use common folderfalsetrue = write to MQL5\Files\Common (visible to every terminal on this machine)
Magic filter-1Only record orders with this magic number, -1 = every magic number
Daily loss alert percent5.0Log an event when the day's floating+closed loss reaches this percent of day-start balance
Snapshot interval minutes30Minutes between routine balance/equity snapshot rows, 0 disables
Log connectivitytrueLog IsConnected() transitions

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: MT5 Expert Advisor · MQL5 Source Code

Expert advisors (EA) for MT4 & MT5 · PolyMaria