Why is my EA not trading? Find the reason and fix it
An Expert Advisor that compiles but never opens a trade is one of the most common MetaTrader problems, and MetaTrader rarely says why. FXNook AI Code Lab reads the whole program, follows each entry path, and tells you in plain words what stops it from trading, then fixes it as a new version you can compare.
The usual reasons an EA does not trade
- A filter that can never pass together with another one, such as a spread limit set in points on a broker that quotes in fractional pips.
- Stops placed closer than the broker allows, or a lot size outside the broker's minimum, step or maximum, so every order is rejected.
- The wrong order filling mode for the broker on MT5 (FOK, IOC or Return).
- AutoTrading switched off, the EA not allowed to trade, or trading hours that never match the server time.
- A signal read on the current, unfinished bar, so the condition is true only for a moment and missed.
- Code that is never reached: a return statement or a condition that always stops before the trade.
Check & fix, with a clear verdict
Upload the .mq4 or .mq5 file. The Lab compiles it with MetaEditor, runs its ten checks and an AI dry run that follows the trading logic, and gives a verdict in plain words: whether the EA can trade, and if not, which line stops it. Ask it to fix the problem and the change is made as a new version, with a diff.
See it live with Telemetry
When the code is right but the EA still waits, FXNook Telemetry shows each rule the EA checks on the live chart and which one says no, so you see the reason as it happens instead of guessing from the Experts log.
Questions
Why does my EA work in the Strategy Tester but not on a live account?
Live brokers enforce rules the tester often does not: minimum stop distance, filling modes, lot steps, trading permissions and real spreads. The Lab checks the code against these rules.
Can the Lab debug an EA without the source code?
No. It needs the .mq4 or .mq5 source code to read and fix the program; a compiled .ex4 or .ex5 file cannot be read or changed.
Will fixing it change my strategy?
No. The fix changes only what stops the EA from trading; the trading rules stay as they are, and you can compare every line in the diff.