MetaEditor (MT5)

How to open MetaEditor in MT5

Four ways in, and what to do when F4 does nothing

Press F4 in MetaTrader 5 and MetaEditor opens immediately. If F4 does nothing, use Tools → MetaQuotes Language Editor, or click the IDE button on the Standard toolbar. MetaEditor installs with MT5, so there is nothing extra to download — you can also start it on its own by running metaeditor64.exe from your MetaTrader 5 folder.

The four ways in

MethodWhere
F4Anywhere in the MT5 terminal
MenuTools → MetaQuotes Language Editor
ToolbarThe IDE button on the Standard toolbar
StandaloneRun metaeditor64.exe from the MT5 install folder

All four open the same program. MetaEditor is a separate application, not a panel inside the terminal, so it gets its own window and its own taskbar entry — if it looks like nothing happened, check whether the window opened behind MT5.

MetaEditor keeps running when you close MT5, and MT5 keeps running when you close MetaEditor. They talk to each other through the data folder, not through a live connection.

Open a specific EA or indicator for editing

If you want to edit something that's already installed rather than start from a blank file, go through the Navigator instead:

  1. In MT5, press Ctrl+N to show the Navigator panel.
  2. Expand Expert Advisors, Indicators, or Scripts.
  3. Right-click the one you want and choose Modify.

MetaEditor opens with that file already loaded. Modify only works when the .mq5 source file is present. Products bought from the Market, and anything shared as a compiled .ex5 only, have no source to open — the option is missing or greyed out, and that isn't a fault with your install.

What you're looking at once it's open

  • Navigator (left) — your MQL5 folder tree: Experts, Indicators, Scripts, Include, Files.
  • Editor (centre) — the code itself, one tab per open file.
  • Toolbox (bottom) — the Errors tab, where compile results appear line by line.

Press F7 to compile the active file. Successful compiles write an .ex5 next to the source; errors land in the Toolbox with a clickable line number. The full walkthrough is in Intro to MetaEditor.

When F4 doesn't open anything

  • Laptop function keys. If the F-row is set to media controls, F4 is being intercepted before MT5 sees it. Try Fn+F4, or flip the function-lock setting in your BIOS/keyboard utility.
  • Focus is in a dialog. Hotkeys don't fire while an order ticket, a properties window, or a text field has focus. Click on the chart area first.
  • Remote desktop and Wine layers. RDP sessions and the macOS/Linux compatibility wrappers sometimes swallow function keys. Use Tools → MetaQuotes Language Editor instead — it never depends on the hotkey.
  • The menu item is missing too. That points at a damaged or trimmed install. Reinstall the terminal; see Downloading and installing MetaEditor 5.

There is no MetaEditor on the mobile MT5 apps or on the MT5 WebTerminal. Writing and compiling MQL5 requires the desktop terminal.

Where MetaEditor and your code actually live

Two different folders, and mixing them up is the usual cause of "I compiled it but MT5 can't see it":

  • The program sits beside the terminal, typically C:\Program Files\MetaTrader 5\metaeditor64.exe. Broker-branded installs use their own folder name — right-click your MT5 shortcut and choose Open file location to find it.
  • Your code sits in the data folder, usually %APPDATA%\MetaQuotes\Terminal\<instance-id>\MQL5. Reach it from either app with File → Open Data Folder.

Save sources under MQL5\Experts, MQL5\Indicators, or MQL5\Scripts in that data folder and the compiled result shows up in MT5's Navigator straight away. If it doesn't, right-click in the Navigator and choose Refresh.

Next steps

Official reference: MetaEditor Help (MetaQuotes).