Edgoro
MT5 Expert Advisors

Builders

MT5 Expert Advisors: MQL5 compiled in MetaEditor

Short answer

With the trading bots option, Edgoro writes complete Expert Advisors in MQL5 for MetaTrader 5. Each EA is compiled in MetaEditor, MetaTrader 5's own compiler, on Edgoro's compile service; a clean build shows "Compiled in MetaEditor: 0 errors" with the warning count. If MetaEditor reports errors, its messages go back to the AI automatically, up to 2 automatic fix requests per conversation. You receive the source as a .mq5 file, which you compile again and run in your own MetaTrader 5. MetaTrader 5 only: Edgoro doesn't write MQL4.

On this page

What every Expert Advisor is written to include

The MT5 bot builder works from a fixed checklist given to the AI:

  • #include <Trade/Trade.mqh> and the CTrade class for orders, with a Print of trade.ResultRetcode() when an order fails.
  • Inputs: lot mode (fixed or % risk), risk per trade, stop-loss and take-profit in points or as an ATR multiple, magic number, maximum spread, trading hours, maximum trades per day and maximum daily loss.
  • Indicator handles (iMA, iRSI, iATR…) created in OnInit, checked against INVALID_HANDLE, read with CopyBuffer and released in OnDeinit.
  • One action per new bar unless the strategy needs ticks; prices normalised with _Digits; volumes within the symbol's minimum, maximum and step; stops beyond the broker's stop level.
  • Position size from risk, using the symbol's tick value and tick size.
  • Only positions carrying the EA's own magic number are managed.
  • No C++ constructs MQL5 rejects, such as new on primitive types, std::, auto, lambdas or try/catch.

The answer then explains the entry, exit, risk and filters, and lists the install steps. The compile below verifies that the file builds; the checklist itself is followed by the AI, so read the inputs before you run it.

The compile check, step by step

  1. When the answer is complete, the mql5 code block is sent to Edgoro's compile service. Only accounts with a plan and the trading bots option can use it, up to 60 compile checks per hour.
  2. The service writes the code to a temporary .mq5 file and compiles it with MetaEditor, one compile at a time.
  3. It reads MetaEditor's log: each error and warning with its line, column and code, and the final "Result: N errors, M warnings" line. The check passes only when that line is there and reports 0 errors.
  4. The temporary .mq5 file, the log and the compiled .ex5 are deleted. Edgoro keeps the code in your creation, not on the compile service.

If the service can't be reached or times out, no badge is shown: you still get the code, without a check result.

What the badge means

Under the codeMeaning
Compiled in MetaEditor: 0 errors, N warningsMetaEditor built the file. Warnings don't stop the build.
MetaEditor found N errors. Fixing them now…The compiler's error lines (up to 15) are sent back to the AI as your next message, asking for the complete corrected file.
MetaEditor found N errors, with a "Fix them" buttonThe 2 automatic fixes of this conversation are used; the button sends the errors on request.
No badgeThe compile service didn't answer.

A clean compile shows that the code builds. It doesn't show that the EA trades the way you described or that the strategy is sound: that's what the Strategy Tester and a demo account are for. The MQL5 error library explains compiler messages, runtime errors and trade server return codes.

What you receive

The source code of one Expert Advisor in a single mql5 block, with Copy and Download buttons (the download is a .mq5 file named after your creation). Edgoro doesn't deliver a compiled .ex5: you compile the .mq5 in your own MetaEditor. Each change you ask for is a new version in your library, compiled again.

Already have a Pine Script strategy? Paste it into the MT5 bot builder and ask for the MetaTrader 5 version; converting Pine Script to MQL5 explains what behaves differently.

How to install it in MetaTrader 5

  1. In MetaTrader 5, open File > Open Data Folder, then MQL5/Experts, and save the .mq5 file there.
  2. Open it in MetaEditor and press F7 (Compile).
  3. Back in the terminal, drag the EA from the Navigator onto a chart.
  4. Turn on the Algo Trading button, and allow algo trading in the EA's settings.
  5. Run it in the Strategy Tester first, then on a demo account.

The EA runs in your MetaTrader 5, on your computer or a VPS. Edgoro never sees your broker login and never places orders. The install guide covers the usual problems.

Trading involves substantial risk of loss and is not suitable for every investor. Edgoro is a software tool, not a broker or financial adviser: nothing it produces is investment advice, and past or backtested performance does not guarantee future results.

Something wrong or missing? Email contact@edgoro.com