FXMT5 Bridge
Home › Guides › Pine Script converter

Convert a Pine Script strategy to trade on MT5

Already have your own TradingView strategy or indicator? The Pine Converter in your MT5 Bridge dashboard adds the MetaTrader 5 alert messages to it, so every signal it gives becomes an MT5 order, and the alert needs nothing typed in its Message box.

Updated 23 October 2026 · Pine Script v5 and v6

What the converter does

Step by step

  1. Convert. In the dashboard open Pine Converter, pick Indicator or Strategy, paste your whole Pine script and press Convert. Copy the converted code. Every conversion is kept in your Converted history.
  2. Put it in TradingView. Open the Pine Editor, replace the code with the converted code, then Save and Add to chart.
  3. Fill in the inputs. Double-click the script's name on the chart (or its gear) and open Inputs. In the MT5 Bridge group paste your MT5 API key (from MT5 Accounts), set the Strategy tag and the Lot size, then press Ok. Until a key is in, the chart shows a red reminder.
  4. Create one alert. Click Alert (the clock icon) and pick your script as the condition. For a strategy choose Order fills only if offered; for an indicator choose Any alert() function call.
  5. Message. For a strategy, replace the Message with exactly:
    {{strategy.order.alert_message}}
    For an indicator, leave the Message as it is: the script writes it.
  6. Webhook. Open Notifications, tick Webhook URL, paste https://mt5bridge.net/webhook and press Create.

The Lot size tick box

Test on a demo account first. Every alert shows on Webhook Alerts in the dashboard with what happened to it, so you can see each signal reach MT5 before trading live.

Common questions

Does the converter need my TradingView password?

No. You paste the script yourself and copy the result back; the bridge never signs in to TradingView.

Which Pine versions work?

Pine Script version 5 and version 6, both strategies and indicators.

Can I still change my strategy later?

Yes. Edit your original script, convert it again and replace the code in TradingView. Then delete the old alert and create it again: a TradingView alert keeps running the version of the script it was created with.

Risk warning. A strategy that did well on past data can lose money live. Trading forex, metals, indices, CFDs and crypto is high risk; only trade money you can afford to lose.