Fix your MT4 or MT5 EA
MetaTrader 4 and MetaTrader 5. Paste or upload an Expert Advisor you already have and say what's wrong or what should be better. The AI returns the complete updated file (.mq4 or .mq5), with the problems it found and the changes it made explained.
AI-updated code to review: compile it in MetaEditor and test it in the Strategy Tester and on a demo account before you rely on it.
Your code is sent to our AI provider, Anthropic, to make the changes, and handled under its data policy. PositionAlpha doesn't save the code or errors you send as you sent them. We keep your description and the result, the updated code and its report, so you can download it again, and the result can include parts of what you sent. Only send code you have the right to use and change.
How it works
- Paste or upload your EA — The .mq4 or .mq5 source file, not the compiled .ex4 or .ex5. Say what's wrong or what should be better, and add any errors from MetaEditor or the Journal.
- The AI works through the code — It reads the whole file and traces the problem to its cause. It's told to keep your strategy, inputs and defaults unless they're the problem or you ask for a change.
- See what it found, then download — You see each problem and each change for free. Pay once to download the updated file and compare it line by line with yours. Then compile it in MetaEditor and test it.
See what it found and changed
Sample report: MA Cross EA.
- MetaTrader 4 commands in an MQL5 file. Ask, Bid, OP_BUY and the 7-argument OrderSend() don't exist in MQL5, so the file can't compile.
- Signal checked on every tick. The EA could open several trades on the same cross. It now checks once per new bar.
- Stops could be too close to the price. The broker can reject a stop closer than its minimum distance. The EA now checks that before it sends the order.
- Lot doubling after a loss. The EA doubles the lot after a losing trade on purpose. It was left as it is, for you to decide.
- Order sending rewritten. MQL5 sends orders through CTrade, and the result of each order is now checked.
- Signal read from closed bars. A finished bar can't change, so the same cross isn't traded twice.
What it works on
- Compile errors, with the errors you paste traced to their cause
- EAs that don't open trades, or open too many
- Stops and lots the broker rejects: minimum stop distance, lot step and price digits
- MQL4 code in an MQL5 file, or the other way round
- Improvements you ask for, such as risk-based lots, a daily loss limit or trading hours
What it leaves alone, and tells you
- Anything the EA seems to do on purpose, such as doubling the lot after a loss: it asks you first
- Other problems it notices that you didn't ask it to fix
- Include files and custom indicators that weren't in your upload
- DLL imports, web requests and file access already in the code: listed as risks
- Requests to add martingale, grid or averaging down: it's told to leave them out and say why
Why EAs stop working
Most broken EAs fail in a few familiar ways. These are the usual reasons:
Invalid stops
Brokers set a minimum distance between the price and a stop loss or take profit. An order with a closer stop is rejected, with error 130 in MT4 or 10016 in MT5.
Lots the broker doesn't accept
Each symbol has a minimum lot, a maximum lot and a lot step. A size outside them is rejected, which often shows up after moving to a new broker.
The wrong filling mode
In MT5, each symbol allows certain order filling modes. An EA that always uses one can fail on another broker with an unsupported filling mode error.
Indicators read the MT4 way
In MQL5, iMA returns a handle, not a value. Code that treats that handle as a price can compile and still never see a signal.
Trades lost at the open
Prices can arrive minutes before the broker's session opens. An EA that tries only once, on the first tick of a bar, can lose that bar's trade.
Other EAs' trades
Without a magic number and symbol check, an EA can count or close trades it didn't open, which changes its lot sizes and exits.
The AI is told to check for these on every file, and its report says what it found.
Pricing
Running a fix is free: you see what the AI found and changed, and a preview of the code. You pay once to download the updated file, and the price is shown before you pay. It includes AI revisions. No subscription.
Questions
Will the fixed EA compile?
The AI is told to write code that compiles in MetaEditor and to follow the platform's rules, but PositionAlpha doesn't compile or test the code. Compile it yourself in MetaEditor. If it shows errors, paste them on the result page for an AI revision.
Will it change my strategy?
It's told to keep your strategy, inputs and defaults unless they're the problem or you ask for a change. If something looks deliberate, such as doubling the lot after a loss, it asks you instead of changing it. Once it's unlocked, you can compare the two files line by line.
Does a developer check the fixed file?
No. The fix is made by AI and includes AI revisions. A fix by a developer comes with our bots and conversions, not with this.
Can it fix .ex4 or .ex5 files?
No. A compiled file can't be read or changed. You need the .mq4 or .mq5 source file.
Do you keep my code?
PositionAlpha doesn't save the code or errors you send as you sent them. They're sent to our AI provider to make the changes. We keep your description and the result, the updated code and its report, which can include parts of what you sent.
Will the fixed EA make money?
No one can promise that. This changes your code; it doesn't test your strategy. Test it in the Strategy Tester and on a demo account before using real money. Trading can lose money.
How much does it cost?
Running a fix and seeing the report is free. Downloading the updated file is a one-time payment, shown before you pay, and it includes AI revisions.
MetaTrader, MQL4 and MQL5 are trademarks of MetaQuotes Ltd. PositionAlpha isn't affiliated with MetaQuotes.