Translate trading strategies between MetaTrader and TradingView

Stratlate is a free structural transpiler between MQL4/MQL5 and Pine Script v6 — both directions. It maps the common subset of both languages faithfully and flags every construct it can't translate, so you always know exactly what to finish by hand.

MQL4 → Pine v6 MQL5 → Pine v6 Pine v6 → MQL4/MQL5 Nothing stored
Start converting
Source — MQL5
Output — Pine Script v6

Provided as is. Review, compile and backtest before trading — accuracy is not guaranteed. Terms

Warnings & errors
  • Run a conversion to see warnings here. Every construct that can't be mapped is listed with its line number.

Built for porting, not pretending

Honest warnings, every time

Stratlate maps the common subset of MQL and Pine and refuses to fake the rest. Every unsupported construct — broker calls, terminal functions, tick-level logic — is flagged with its line number so nothing silently changes meaning.

Serverless, nothing stored

Your code is transpiled in a stateless serverless function and returned in the same response. It's never written to disk, logged, or used for anything else — close the tab and it's gone.

Made for traders porting strategies

Indicators, moving-average crosses, oscillators, entry/exit logic — the constructs traders actually port between MetaTrader and TradingView are the ones Stratlate translates best, in either direction.

Frequently asked questions

How do I convert MQL5 to Pine Script?

Paste your MQL5 indicator or expert advisor into the source pane, set the direction to MQL5 → Pine Script, and click Convert. Stratlate produces Pine Script v6 that you can paste straight into TradingView's Pine Editor, together with a list of warnings for anything that needed a manual decision. It's a structural transpiler: it maps the shared subset of both languages and clearly flags what it can't map, rather than guessing.

Can I move an MT5 indicator to TradingView?

Yes — that's the core use case. Common MT5 building blocks like iMA, iRSI, iATR, price series and buffer plots translate directly to Pine Script's ta.* functions and plot(). Platform-specific pieces (terminal functions, broker/order infrastructure, tick events) can't exist on TradingView, so they're reported as warnings with line numbers instead of being silently dropped.

Does Pine Script to MQL5 conversion work too?

Yes. Stratlate works in both directions: Pine Script v6 → MQL5 (or MQL4). ta.sma becomes iMA, strategy.entry maps onto order-sending logic, and series indexing like close[1] becomes MQL price-array access. Pine features with no MQL equivalent — for example request.security calls or drawing-object idioms — are flagged so you can decide how to handle them.

Is the conversion perfect? Will my strategy behave identically?

No transpiler can honestly promise that, and Stratlate doesn't. MetaTrader evaluates code on every tick; TradingView evaluates on bar close by default. Order execution, spread handling and account state differ between platforms. Stratlate gives you a faithful structural translation of the logic plus an explicit list of everything that needs your judgment — expect to review and backtest the result before trading it.

What does the pre-flight check tell me?

Alongside every conversion, Stratlate runs a feasibility pre-flight that inspects your source for platform features the target language simply cannot express — DLL calls, file I/O, hedged position management and the like. The verdict tells you up front whether to expect a faithful translation, an approximation, or a structural skeleton that needs real work — before you read a line of the converted code. Even a BLOCKED verdict still shows you what the engine produced; the strip just tells you honestly how far to trust it.

What is the TradingView compatibility check?

After converting to Pine Script, Stratlate automatically lints the output against a catalog of known TradingView compile errors — each rule is traced to a real compiler or runtime error code (CE/RE) observed in the Pine Editor. FATAL findings would stop the script from compiling, WARN findings usually need attention, and HAZARD findings are patterns that tend to misbehave at runtime. A clean result means none of the known defects were detected — it does not guarantee the script is valid; TradingView's compiler is the final authority.

Is Stratlate free? What happens to my code?

Stratlate includes 3 free conversions a month with no account needed — validation, linting and feasibility checks are free and unlimited, and paid plans add more conversions. Conversion runs in a stateless serverless function: your source code is processed in memory for the single request and never stored. There are no uploads and no code retention.

Why do I have to accept the Terms of Use before converting?

Because converted code is something you may trade real money with, and no converter can guarantee it behaves exactly like the original. The Terms of Use say plainly that output is provided as is, that inconsistencies between the original and the converted script are to be expected, and that reviewing, compiling and backtesting the result is your responsibility. Your acceptance is remembered in your browser and sent with each conversion; if the terms change you will be asked again.

What is the "Help improve Stratlate" checkbox?

It's an optional, opt-in way to help the converter get better. It is off by default; by default nothing is stored. If you tick it, then each time a conversion succeeds we keep an anonymous copy of the script you converted — the source text plus basic metadata (its language, size and a checksum) — used only internally to test and improve the conversion engine. It is never redistributed. Nothing that identifies you is recorded: no account, no email, no IP address. Your choice is remembered in your browser and you can untick it at any time.