Your EA is not trading and the log says nothing. That is the normal shape of this failure. The Expert tab has no errors, the terminal says connected, the smiley face is on the chart, and no order has reached the server. People usually start changing strategy inputs at this point. The cheaper move is to check whether your code is being called at all, and whether the order request actually left the terminal.
Here is the order I check things in now.
Check 1: the gap between the last Journal line and the last deal. Open the Journal, not the Experts tab. Find the last line that has anything to do with a trade: an order send, a deal, a position opening. Then find the last real deal in the trade history. The difference between those two timestamps is your first number. If the gap is longer than your slowest signal cadence, the request is not reaching the order layer. Then look at the things the terminal owns, not your code: the connection status, the AutoTrading button, the EA's own attached state, the last tick time in Market Watch for that symbol, and whether the chart is still the one the EA was attached to.
"no errors" is not evidence of health. The log only records what reached a log call. Code that is never called writes nothing, and nothing looks exactly like a quiet market.
Check 2: a heartbeat written from inside OnTick. The Experts tab is a weak liveness signal. If OnTick stops being called, output just stops growing, which looks the same as a day with no setups. So keep a counter and write it to a file in the terminal's common folder: tick count, last tick time, open position count, current trading day. Write it on every tick, or every N seconds if you care about disk churn. Then read the file from outside the terminal: check its modified time, and check that the counter is actually moving. Terminal connected, file untouched for a while, OnTick is not running. That is the entire test.
Check 3: trip the guard, then kill the process. A guard that lives in a module-level variable is decoration. It gets zeroed by a restart, a recompile, a chart switch, or a profile reload, because every one of those runs init again. So run the test properly. Set a limit you can trip during an ordinary session. Trip it, try to send an order, expect a refusal. Then kill the terminal process, not just the EA, with a position still open. Reopen the terminal and try again. If the new process sends the order, your state was in memory. Also persist the trading day, not just the blocked flag, or a restored limit either never expires or never applies. Take the day from the server clock, not the local one.
Where I got this wrong. I chased the strategy first. The log was clean and I read that as the EA running and choosing not to trade. It was not choosing anything. The chart had been replaced by a profile reload and the EA was attached to a chart with no ticks, so OnTick was never called and nothing printed.
The other direction is just as expensive. I once ran for days with no entries and treated it as no signal. The orders were being rejected for invalid stops after the broker widened the stops level. The EA logged the rejection and dropped the return code. Nothing retried, nothing alerted.
Then the restart one. I assumed reopening the terminal reloaded the guard state from config. Config is not state. It reloaded the same static limits and started counting losses from zero, so the cap I thought was spending the whole day was spending it again.
None of those three had a red line anywhere in the log. That is why they cost days.
One question. What is the time gap today between your last Journal line about a trade and your last actual deal? If it is longer than your slowest signal, do Check 1 and Check 2 before you touch a single input. If you have already hit this, what was the cause on your side?
Top comments (0)