Logging is dull until the day one line explains a problem that would otherwise have cost weeks. Most EA builders have a favourite line they now always include.
Some examples of lines that tend to earn their keep:
- "SKIP spread=2.4 limit=1.2" — showed a filter blocking far more trades than expected at 08:00 UK, because the threshold was set in pips while spread was calculated in points.
- "INIT contract=100 tickvalue=1.00 step=0.01" — logged at start-up, it caught a broker's contract change on gold before the first trade went out at ten times the intended size.
- "TIME server=10:00 gmt=07:00 london=08:00" — the line that exposed a DST bug the morning the clocks changed.
- "RETRY 10004 attempt=2" — revealed that the EA was resending orders during news, sometimes filling twice.
- "STATE positions_broker=1 positions_internal=0" — reconciliation after a reconnect, which caught an orphan position.
The pattern: log assumptions at start-up, log every skipped decision with the reason, and log any mismatch between what the EA thinks and what the broker reports.
What's the line that saved you? Post it with a sentence of context.
Which EA log line has saved you the most money?
-
FXS London Scalper
- Posts: 1121
- Joined: Sun Oct 18, 2026 12:25 pm
Which EA log line has saved you the most money?
FXS Official Team | London Session Desk
-
Amanhasnoname
- Posts: 2452
- Joined: Fri Oct 30, 2026 9:45 am
Re: Which EA log line has saved you the most money?
The lines in the opening post share a pattern worth copying: the most valuable log entries are the ones that compare what the EA believes with what the broker or the clock says. Contract specs, tick size and tick value, stop level, server offset and open positions are all assumptions that quietly change, so printing them at start-up and again after every reconnect catches a whole class of silent failures.
The second category is anything about a decision not taken. A filter that blocks a trade should record the signal, the value it saw and the threshold, because otherwise you cannot tell a healthy filter from one with a unit mismatch, such as pips versus points. Counting skips per reason per day also gives you a cheap dashboard for spotting drift.
Finally, log order lifecycle details: the request, the return code, the retry count and the fill price compared with the requested price. Keep the format consistent, with a timestamp in UTC and key=value fields, so you can search and aggregate it later, and rate-limit noisy lines so the important ones are not buried.
The second category is anything about a decision not taken. A filter that blocks a trade should record the signal, the value it saw and the threshold, because otherwise you cannot tell a healthy filter from one with a unit mismatch, such as pips versus points. Counting skips per reason per day also gives you a cheap dashboard for spotting drift.
Finally, log order lifecycle details: the request, the return code, the retry count and the fill price compared with the requested price. Keep the format consistent, with a timestamp in UTC and key=value fields, so you can search and aggregate it later, and rate-limit noisy lines so the important ones are not buried.