Using Code in MetaTrader
Xen returns editable .mq5 source for MetaTrader 5. Download the complete file from a response or History and give it a meaningful name. Keep the exact version you intend to test; combining sections from different responses can introduce errors absent from the returned file.
MetaEditor creates the compiled .ex5 executable used by MetaTrader. The .mq5 file remains the editable source you return to Xen. A compiled file cannot replace source in an Existing or repair request.
Find the correct data folder
In the terminal you intend to use, choose File → Open Data Folder. Put EA source under MQL5\Experts and indicator source under MQL5\Indicators, optionally in your own subfolder. This avoids using an installation folder or another terminal's directory. MetaQuotes documents these locations in its folder reference.
Keep dependencies at the paths expected by the source. Headers normally belong under MQL5\Include, while a custom indicator must be available at the path requested by the EA. Preserve directory names used by includes and indicator calls instead of renaming dependencies without updating the program.
Compile in MetaEditor
Open the main .mq5 file in MetaEditor and compile it. Review the Errors panel and resolve errors before attaching the program. Read warnings too, especially when conversions or unused logic suggest an implementation needs inspection. The official development workflow explains editing and compilation.
If compilation fails, share the complete current source and exact diagnostics in your selected task. For a file from outside Xen, use Existing Expert Advisor or Existing Indicator. A Xen build result can differ locally when dependencies or installed environments differ. Supply that context rather than asking for a rewrite that conceals a missing file.
Attach and inspect the program
Find the compiled program in Navigator and refresh the list if needed. Attach an indicator to the intended chart and inspect inputs, values and signals. Begin EA testing in Strategy Tester and then a demo environment, reviewing trading permissions before allowing orders.
If nothing happens, inspect journal and Experts messages. Missing history, a wrong dependency path, permissions or a condition that has not triggered can all explain the result. Keep source and inputs with your observations so the next request describes a reproducible problem.