Convert Pine Script to MT5
Already have a Pine Script strategy or indicator? Paste it into the converter and HorizonAI rewrites it as MQL5. 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 Pine Script, drop a file, or load an example. Correct the detected language if needed.
- Under Convert to, choose MetaTrader 5, then click Convert to MT5.
- The result opens in a chat. Click Download for the
.mq5file, or keep iterating with the AI.
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 MT5 (the language you want to end up with).
- Paste the Pine Script into the box.
- Type: "Convert this Pine Script into MetaTrader 5 (MQL5)."
- Click Start building →. Download the
.mq5when it lands.
Mention whether the source is a strategy or an indicator, plus any timeframe or broker assumptions you care about.
After it converts
Open the file in MetaEditor and compile. If MetaEditor errors, paste them back into the chat and ask HorizonAI to fix.
- Intro to MetaEditor: compile the
.mq5 - Setting up MetaTrader 5: install if you haven't
- Backtesting in the MT5 desktop app: verify the converted EA
- Convert MT5 to Pine Script: the other direction
- Convert to NinjaScript: Pine or MQL5 → NinjaTrader 8