Skip to content

Pine Script to MQL5 converter

Paste a Pine Script indicator, see it on the chart, export it as an MQL5 file for MetaTrader 5.

How it works

1. Open My scripts
On the chart open Indicators, then the My scripts tab.
2. Paste the Pine Script
Add it to the chart and check that it draws what you expect.
3. Export MQL5
In the script’s menu choose Export MQL5. You get an .mq5 file.
4. Compile in MetaEditor 5
Open the file in MetaEditor 5, compile it and attach the indicator in MetaTrader 5.

Checked before you download

The export is checked bar by bar against the Pine original on the chart before the file is offered. The export is for indicators.

MQL4 and MQL5 on the chart

It works the other way too. Paste an MT4 or MT5 indicator into My scripts and it runs on the chart next to Pine scripts – on crypto, stocks, forex and commodities.

Plans

Pine scripts: Plus and Premium. MQL4 and MQL5 scripts and Export MQL5: Premium.

Frequently asked questions

Do I need MetaTrader installed?

Only to use the exported file. The conversion and the check happen on the chart in your browser.

Can I convert MQL5 to Pine Script?

MQL4 and MQL5 indicators run on the chart as they are, so there is nothing to convert.

Can I write the indicator from a description first?

Yes. Describe it in plain words, generate the Pine Script, then export it to MQL5.