Convert MT5 to Pine Script
Already have an MQL5 Expert Advisor or indicator? Paste it into the converter and HorizonAI rewrites it as Pine Script. Built the strategy in Horizon instead? Don't convert — export from the chat header.
One-click converter
- Go to app.horizontrading.ai/convert
- Paste your MQL5, drop a file, or load an example. Correct the detected language if needed.
- Under Convert to, choose TradingView, then click Convert to TradingView.
- The result opens in a chat. Click Copy Code and paste it into TradingView's Pine Editor.
Pick Premium for the highest-quality result, or Basic to spend fewer tokens.
Open Converter →Convert inside the chat (alternative)
Prefer to talk it through?
- Click New Script and set the platform pill to TradingView (the language you want to end up with).
- Paste the MQL5 into the box.
- Type: "Convert this MetaTrader 5 (MQL5) code into Pine Script."
- Click Start building →. Copy the Pine Script when it lands.
Mention whether the source is an indicator or an Expert Advisor, plus any timeframe or input defaults you want exposed.
After it converts
Paste into the Pine Editor and click Add to chart. If TradingView errors, paste them back into the chat and ask HorizonAI to fix.
- Run on TradingView: add the Pine Script to a chart
- Using the Strategy Tester: backtest a converted strategy by hand
- Pine Script Warnings: warnings vs errors
- Convert Pine Script to MT5: the other direction
- Convert to NinjaScript: Pine or MQL5 → NinjaTrader 8