MetaQuotes Language header file
File type: Various data file
An .mqh file is a MetaQuotes Language header file used with the MetaTrader trading platform.
It contains reusable MQL4 or MQL5 source code, such as function definitions, classes, variables, and comments, for inclusion in other trading programs.
File type category:
Various data file
Date updated: October 5, 2026
The .mqh file format is associated with MetaTrader, the trading platform developed by MetaQuotes for Forex, stocks, futures, and CFD markets. An MQH file is a source-code header rather than a standalone trading program.
MQH files commonly contain declarations or reusable implementations for functions, classes, variables, and other MQL4 or MQL5 code. Expert Advisors, indicators, scripts, and other source files can include them with the language's include mechanism.
On Microsoft Windows, the files are edited and used with MetaEditor, which is supplied with the MetaTrader Trading Terminal. The format remains in use with MQL4 and MQL5 development, although the exact language features available depend on the MetaTrader version and language targeted.
On Microsoft Windows, open an .mqh file in MetaEditor, the development environment supplied with the MetaTrader Trading Terminal. MetaEditor can display and edit the source code and resolve the file when it is included by a compatible MQL4 or MQL5 source file.
A general text editor can also open the file as plain text, but it will not provide MetaEditor features such as language-aware editing or compilation.
An .mqh file is source code and normally has no meaningful conversion to another file format. It should remain an MQH file when it is used as a header in an MQL4 or MQL5 project.
Code may be adapted manually between MQL4 and MQL5 where the languages differ, but that is a source-code migration rather than an automatic file conversion.
Software applications that can open mqh files:
Microsoft Windows
Software applications that can edit mqh files:
Microsoft Windows
Software capable of saving mqh files:
Microsoft Windows
Software applications that handle other tasks involving mqh files:
Microsoft Windows