MQL5 / MQL4 EA code checker
EA Trade TesterDemo labHow we testFor AI agents
Many EAs that fail live have a fault you can see in the code: they read the wrong clock, ignore a setting, or never check whether an order went through. Our free first read looks for these in seconds. Here is the list, with what each one does to a backtest.
Which faults does the first read look for?
| Fault | Example | Why it matters |
|---|---|---|
| Wrong clock | TimeLocal() | the clock of the computer running MT5, not the market: trading hours change on a VPS or in the tester |
| GMT hours in the tester | TimeGMT() | in the MT5 Strategy Tester it is derived from the server time, so GMT-based hours can be wrong in backtests |
| Fixed session hours | input int StartHour = 8; with no offset | 8 means different market hours at different brokers and in summer and winter (more) |
| Settings never used | an input that appears once | changing it in MT5 does nothing: the value is hard-coded elsewhere |
| Unchecked orders | OrderSend or trade.Buy() with no result check | failed orders (requotes, wrong stops, closed market) pass silently |
| No magic number | orders without one | the EA cannot tell its own trades from other EAs' or manual trades |
| Martingale sizing | lots *= 2 | lot size grows after trades: a shape that can wipe an account (more) |
| Repaint risk | reading bar 0 on every tick with no new-bar check | signals appear and vanish inside a bar, so backtest and live disagree |
| MQL4 loop in MQL5 | OrderSelect(i, SELECT_BY_POS) in a .mq5 | in MT5 open trades are positions, so the loop may never see them |
| DLL or web calls | #import "x.dll", WebRequest | outside code or services a backtest cannot see |
| Sleep() | Sleep(5000) | ignored in the Strategy Tester, so live timing differs |
Can I send the include files and settings too?
Yes, and you should: send the .mq5 or .mq4 with its .mqh include files and the .set file. A missing include is itself reported, because the EA cannot be judged without it. Through an AI assistant you can send up to 20 files in one call.
What happens after the first read?
If you want the full test, we write the EA's rules out as a plain-English rule card. You check it, then we backtest our rebuilt copy on up to 16 years of prices with recorded costs and the luck bar. The lab also lists where our rebuild differs from your code.
Try it with our sample files: SampleEA.mq5 (a textbook EA with faults left in on purpose), SampleUtils.mqh and SampleEA.set.
Related pages
- Free forex EA tester online
- Is my EA martingale or grid? How to tell
- EA trading at the wrong hour? Server time
- EA Trade Tester for AI assistants
- EA Trade Tester home: test your EA, bot, indicator or report
Questions people ask
Do you run my code?
No. We read it as text, write its rules out as a rule card that you check, and then run our own rebuilt copy.
Can it read compiled .ex5 files?
No. Compiled files cannot be read; send the Strategy Tester report instead.
Is a clean first read a good sign?
It means we did not find these faults. It says nothing yet about whether the strategy makes money after costs: that is what the lab test is for.
Does it check Python bots too?
Yes: Python bots get the same kind of read, for example a position size multiplied after trades.