How to Log Every Trade From Your EA for Auditing
Your terminal already stores every executed trade. That record is insufficient for auditing an automated strategy, and the reason becomes obvious the first time something behaves unexpectedly.
How to log every trade from your ea for auditing starts with capturing what the platform throws away, which is everything that happened before the fill.
History Tells You Fills, Not Decisions
Account history shows a position opened at a price at a time. It cannot tell you whether your logic generated three signals and acted on one, what the spread was at the decision, why the lot size came out as it did, or whether an order was rejected first.
That missing context is where most live versus backtest discrepancy hides. A strategy that looks like it is underperforming is often one that is not placing the trades you think.
Log Three Events, Not One
The single most useful design decision is separating the lifecycle.
Signal detected. Your conditions were met, with the values that produced the decision.
Order sent. What you requested, including price, lot size, stop and target, and the spread at that moment.
Result. What came back. The fill price, the return code, and the error if it failed.
Most loggers record only the third, which makes a session with no setups indistinguishable from one where every order was rejected. Identical in history, completely different problems.
The Fields Worth Capturing
Server timestamp on every row, including milliseconds where available, since the clock you care about is the server’s rather than your machine’s.
Requested price against fill price, which gives you slippage directly rather than by inference.
Spread at decision time. Backtests typically assume a spread that live conditions do not supply, and this field is what proves it.
The sizing inputs rather than just the output. Risk percentage, stop distance, tick value and resulting lots. If sizing is wrong you need to see which input was wrong.
Magic number and symbol, so several strategies can share one file.
And the one most traders omit. Account equity and remaining drawdown allowance at the decision. On a funded account that single field lets you audit whether sizing respected your limits at the time.
Keep It Simple and Durable
Comma separated text, one row per event, written as it happens.
Flush after each write rather than leaving it to the terminal. If the platform closes unexpectedly, unflushed rows are gone, and those are the rows you wanted.
Use the common folder if you run several terminals and want one consolidated file.
One header row, consistent columns, no formatting. You want something that loads into a spreadsheet in thirty seconds.
What the Audit Actually Produces
Your real slippage distribution rather than an assumption, which decides whether your expectancy survives live conditions.
Rejected orders you never knew about, which on some strategies explain a meaningful share of missing trades.
Proof that sizing logic works under live ticks rather than only in testing.
And evidence. If you need to raise an execution problem with support, timestamped records of what you requested and received beat a description of what you remember.
Compare Against the Tester
Log the same fields in Strategy Tester runs and compare the two files directly.
Differences in fill price, spread and trade count between identical logic in both environments is the clearest measure of what the backtest overstated.
Conclusion – How to Log Every Trade From Your EA for Auditing
How to log every trade from your ea for auditing means recording signal, send and result separately, capturing spread, slippage and your remaining allowance at decision time, and writing it durably enough to survive a crash. The comparison against your backtest is where the value appears.
FAQ – How to Log Every Trade From Your EA for Auditing
1. Is the platform trade history not enough?
No. It records fills but not signals, rejections, spread at decision time or the inputs that produced your position size.
2. What format should the log use?
Plain delimited text, one row per event, flushed on write so a crash does not take the most recent entries with it.
3. What is the most overlooked field?
Remaining drawdown allowance at the time of the decision. It lets you audit whether sizing respected your limits rather than guessing later.
We have helped thousands of traders reach funding at TTT Markets from account sizes of $5k upwards to $500k. Check out our programs.
Additional resources:
LogEverything – The Ultimate Trade Session Recorder For MT4 & MT5 | Forex Factory