Pine Script and MQL5 conversion guides

Practical guides for traders and developers moving scripts between TradingView (Pine Script) and MetaTrader (MQL4 and MQL5). Each one shows the Pine and the MQL side by side, explains where the two platforms really differ, and lists the mistakes that make a converted script compile but compute something else. Every complete MQL program in these guides compiles in MetaEditor.

Want the conversion done for you? The converter handles both directions, and every result is checked against the original on the same price history (see how conversions are measured). For finished examples, browse the verified example conversions.

Getting started

Series, values and time

Plots, drawings, inputs and alerts

Strategies and advanced topics

Troubleshooting converted scripts

Lookups and worked indicators

For a single function rather than a topic, the Pine Script ↔ MQL5 reference has one page per built-in (ta.rsi, iMA, strategy.entry, OnCalculate…) and two one-page cheat sheets. For a complete indicator on both platforms, see the TradingView indicators in MetaTrader 5.

Convert your script

Paste a Pine Script or MQL4/MQL5 indicator or strategy and get the other platform's source, with every construct that could not be carried over reported.

Open the converter