MQR Language
Create strategies with MQR and take them to MT5.
Write entry, exit, filter and management rules in a language designed for trading workflows. Everything you need to get started is right here.
Manuals and extensions
// Trend with moving average and ATR targetinput int AveragePeriod = 20;input double Lot = 1; void OnBarOpen(){ double average = EMA(AveragePeriod, 0); if (PositionsTotal() == 0 && Close(0) > average) Buy(Lot, Low(1), Close(0) + ATR(14, 0)); if (PositionsTotal() > 0 && Close(0) < average) CloseAllPositions();}
Features
Resources to create, test and improve strategies.
MQR brings programming closer to the trader workflow, with market commands, indicators and test parameters.
From MQR to MT5
A language close to the trader workflow.
The code describes entry, exit, filters and optimizable parameters directly. When the strategy is ready, it is converted to MQL5 and runs on MetaTrader 5.
- Familiar syntax for anyone who already codes in MQL5
- The same strategy in the backtest and on MT5
- Optimizable inputs from the first line
Workflow
From idea to EA in four steps.
Write, debug, test and export without switching tools.
- 1
Write
Create entry, exit and filter rules in MQR.
- 2
Debug
Inspect variables and execution line by line.
- 3
Test
Run backtests and optimizations with the strategy inputs.
- 4
Export
Convert to MQL5 and run it on MetaTrader 5.
Code with AI
The MQR Manual for AI is the reference for Cursor, Codex and other LLMs to generate valid MQR code. Pair it with the MQR Tools extension in your editor.
Start coding in MQR
Download for free, open the manual and write your first strategy.