What is a TradingView Webhook and How Does it Work with MT5?

I built SignalForge because I saw too many algorithmic traders struggling with a fundamental disconnect: they had powerful strategies running on TradingView, but their actual execution was stuck on MetaTrader 5. TradingView is incredible for charting and generating signals, but it cannot natively open or close positions inside an MT5 terminal.

A webhook is the solution to this problem. Simply put, a webhook is an automated message sent from one application to another via HTTP POST requests. When your TradingView strategy triggers a buy or sell condition, the TradingView cloud sends a JSON payload (a structured data message) to a unique receiver URL.

To bridge the gap to MT5, you need an execution engine sitting inside your MetaTrader 5 terminal. That is exactly what the SignalForge EA (Expert Advisor) does. It listens for those incoming TradingView webhook alerts, parses the data instantly, and executes the trade on your broker's servers with less than 50ms execution via local EA processing.

Prerequisites for Connecting TradingView and MT5

Before we dive into the exact step-by-step process, you need to make sure you have a few things ready. A proper TradingView webhook MT5 connection requires three main components:

  1. An Active TradingView Plan: TradingView only allows webhook alerts on their paid tiers (Essential, Plus, or Premium). If you are on the free plan, you will not see the webhook notification option.
  2. A Running MT5 Terminal or VPS: MetaQuotes requires a running terminal to execute EAs. You can leave your home PC on 24/5, but most professional traders use a Virtual Private Server (VPS).
  3. SignalForge Installed: You need our automation bridge. If you haven't done so yet, take five minutes to instalar el puente SignalForge. It is a lightweight EA that handles all incoming webhooks and translates them into MT5 commands. Prep your terminal in minutes.

Step 1: Obtain Your SignalForge Webhook URL

To ensure secure communication between the TradingView cloud and your local terminal, SignalForge generates a unique, encrypted receiver URL. TradingView will send your alerta webhook tradingview directly to this address.

  1. Open your MetaTrader 5 terminal.
  2. Drag the SignalForge EA from your Navigator panel onto a chart. (The specific chart pair doesn't matter, as the EA can route orders to any symbol based on the incoming webhook data).
  3. Click on the Inputs tab in the EA properties window.
  4. Here, you will see your unique Webhook URL. It will look something like https://api.signalforge-ai.com/receive/YourUniqueKey123.
  5. Copy this URL to your clipboard. Do not share this URL publicly; it acts as your private bridge key.

Step 2: The JSON Message Format for TradingView Webhook Alerts

TradingView allows you to send highly customized messages. Because our EA is designed to be robust and flexible, we built it to parse a strict JSON structure. This ensures that variables like ticker symbols, volume, and action types are read accurately by the MT5 engine, avoiding the syntax errors that plague many competitors.

If you want to dive deeper into the exact variables our system accepts, you can review the complete documentation for the formato del mensaje JSON. Explore all EA parameters.

Below is the exact JSON structure you need to use in your TradingView alert message box:

{
  "ticker": "{{ticker}}",
  "action": "{{strategy.order.action}}",
  "price": "{{close}}",
  "volume": "0.1",
  "secret": "YOUR_UNIQUE_SECRET_KEY"
}

Understanding the JSON Variables:

  • {{ticker}}: This TradingView placeholder automatically injects the symbol of the chart (e.g., EURUSD).
  • {{strategy.order.action}}: This placeholder dynamically injects "buy" or "sell" based on your Pine Script strategy.
  • volume: You can hardcode your lot size here (e.g., "0.1") or configure the EA to calculate it dynamically based on your account balance.
  • secret: This must match the secret key generated in your SignalForge EA to authenticate the webhook and prevent unauthorized execution.

Step 3: Create and Configure the Alert in TradingView

Now that you have your URL and your JSON message, it is time to configure the bridge connection.

  1. Open your chart and the Pine Script strategy you want to automate in TradingView.
  2. Right-click on the chart or click the Alert icon (the clock symbol at the top).
  3. In the Condition dropdown, select your Pine Script strategy. Set the trigger to "Order Fill" (or Once Per Bar Close, depending on your strategy logic).
  4. Go to the Notifications tab.
  5. Check the box that says Webhook URL.
  6. Paste the unique SignalForge Webhook URL you copied in Step 1 into the Webhook URL field.
  7. In the Message text box (located right below the Webhook URL field), delete any default text and paste your exact JSON snippet from Step 2.
  8. Click Create.

If configured correctly, the next time your strategy triggers a condition, TradingView will instantly fire the JSON payload to our servers, which then forwards it to your local MT5 terminal in milliseconds.

Step 4: Configure the Expert Advisor (EA) in MetaTrader 5

The final piece of the puzzle is ensuring your MT5 terminal is actually listening and allowed to trade. To automate your alertas mt5 desde tradingview:

  1. In your MT5 terminal, go to Tools > Options (or press Ctrl+O).
  2. Navigate to the Expert Advisors tab.
  3. Check the box for Allow Algorithmic Trading. You should see a green "Algo Trading" icon in the top toolbar.
  4. Ensure the SignalForge EA is attached to your chart and displays a smiley face (or a custom SF icon) in the top right corner of the chart, confirming it is running.
  5. Inside the EA inputs, double-check your Risk Management settings.

Because I designed SignalForge with prop firm traders in mind, our EA includes built-in prop-firm risk management tools. You can set daily drawdown limits, maximum daily trades, and trailing stops directly inside the EA. Even if your TradingView strategy fires a webhook, the EA will block the trade if it violates your daily drawdown rules. This is a lifesaver for traders trying to pass evaluations like FTMO or FundedNext.

Troubleshooting Common Connection Issues

Even with a straightforward setup, webhooks can occasionally fail. Here are the most common issues I see and how to fix them:

  • Delayed Alerts or Missing Trades: TradingView processes millions of alerts. While rare, their cloud can experience delays. However, if delays are frequent, check your internet connection. For absolute zero downtime, I highly recommend upgrading to alojar tu MT5 en la nube. Never miss a signal with 24/7 uptime.
  • Syntax Errors: If your MT5 terminal logs show "Invalid JSON", you likely have a formatting error in your TradingView message box. Make sure you didn't accidentally delete a quotation mark or comma from the JSON structure provided above.
  • "Invalid Volume" Platform Errors: If your MT5 journal shows this error, it means the lot size received by the EA is either too small, too large, or not formatted correctly for your specific broker (e.g., trying to trade 0.001 lots on an account that requires a minimum step of 0.01). Update your JSON payload to reflect a valid volume.

Why Use SignalForge vs. Competitors

When you decide to automate your trading, choosing the right bridge is critical. There are several tools on the market, but we engineered SignalForge to offer the best combination of speed, safety, and affordability.

If you look at our planes de SignalForge, you will see we start at just $4.99/mo. This provides massive value compared to other industry options. For a deeper look, you can read our detailed comparación con PineConnector. See why traders switch to us.

Below is a quick comparison of how we stack up against the market, utilizing known competitor pricing and feature sets:

Feature / ProviderSignalForgePineConnectorTradingConnectorWunderTrading
Starting Price$4.99/mo~$39/mo + ~$20 setup~$14.99/moFree tier; ~$29.99/mo paid
Local EA ExecutionYes (<50ms)YesNo (Chrome extension)Varies
Cloud Hosting (SFCloud)Yes (Integrated)Requires 3rd PartyYes (Cloud-based)Yes
Prop-Firm Risk MgmtYes (Built-in EA)LimitedLimitedYes
JSON ParsingStrict & FlexibleStrictVariesN/A

While PineConnector is well-known, SignalForge handles JSON parsing much more flexibly, and our integrated prop-firm risk management means you don't need third-party plugins to protect your evaluation accounts. Furthermore, because we offer a local EA combined with SFCloud, our execution speed (<50ms local EA) blows cloud-based Chrome extensions out of the water. Start automating today and experience the difference.

---

Author: Benjamin SF. Benjamin is the founder of SignalForge and an algorithmic trading specialist with over a decade of experience in MQL5 and API bridges.

FAQ

How much does it cost to use TradingView webhooks to MT5?

While you need an active TradingView subscription, connecting it to MT5 is incredibly affordable with SignalForge. Our Starter plan costs just $4.99/mo, which is significantly cheaper than most standalone VPS setups and competing bridge services that can charge upwards of $30 or $40 a month.

Do I need to keep my PC on to receive MT5 alerts from TradingView?

If you are running the SignalForge EA locally on your home MetaTrader 5 terminal, yes, your PC must remain on while the markets are open. However, you can completely eliminate this requirement by using SFCloud. SFCloud hosts your MT5 terminal in the cloud, allowing you to receive webhooks and execute trades 24/7 without any local hardware.

What format should I use for the webhook message?

You must use a strict JSON format. We map TradingView placeholders like {{ticker}} to the "ticker" key, and {{strategy.order.action}} to the "action" key. The complete JSON snippet, including your volume and security secret, is provided in Step 2 of this guide.

Can TradingView alerts execute market orders in MT5?

Yes, absolutely. Once the webhook is received, the SignalForge EA translates the "action" parameter into an instant MT5 command. Depending on how you format your JSON message and EA inputs, webhooks can trigger instant market executions, as well as limit and stop orders, directly on your broker's server.