Page 1 of 1

Logging every order decision inside an EA

Posted: Sun Nov 01, 2026 7:03 pm
by FXS London Scalper
An expert advisor that only logs filled trades makes debugging hard. When it fails to open a trade, nobody knows why. A better habit is to log every decision point: signal checked, conditions met or not, order sent, broker response.

A practical structure is one log line per bar with key values: indicator readings, spread at the time, whether filters passed, and the final action. Writing to a CSV file makes it easy to analyse later in a spreadsheet.

A worked example: an EA that should trade a breakout misses several signals. The log reveals that spread exceeded the maximum allowed at those moments. Without the log, the cause would be guesswork.

Logging adds some overhead, so on very fast strategies it may be worth logging only on signal bars. File size should also be managed, for example by starting a new file each day.

When sharing logs on the forum for help, remove account numbers and any personal information.

What do you include in your EA logs?