TradeAon · Guides · TradingView → MetaTrader
Troubleshooting

Common TradingView to MetaTrader Webhook Errors (and How to Fix Them)

By the TradeAon team · Published · Updated · 6 min read

A webhook trade can fail in several places: TradingView may not fire, the webhook may not be enabled, the JSON may be invalid, the secret may be wrong, or the MetaTrader terminal may be offline. This checklist follows the signal path from chart to broker so you can isolate the problem instead of guessing.

Key takeaways
Contents
  1. The alert did not fire
  2. Webhook URL was not ticked
  3. Malformed JSON
  4. Wrong or missing secret token
  5. Symbol not found or mapping failed
  6. Algo trading is disabled
  7. EA is not attached or terminal is offline
  8. Invalid volume or lot size
  9. Market closed or session blocked
  10. Rate limits and duplicate signals

The alert did not fire

Start in TradingView. Open the alert log and confirm the alert actually triggered at the time you expected. If there is no alert event, the problem is not TradeAon, MetaTrader or your broker. It is the alert condition, the chart symbol, the timeframe, the Pine Script logic or the alert schedule.

Check whether the alert is active, expired, paused or attached to an old script version. Pine Script changes do not always update existing alerts automatically. For strategies, verify that the strategy is producing orders before expecting webhook messages from order placeholders.

Webhook URL was not ticked

TradingView can show pop-ups, send emails and play sounds without sending a webhook. In the alert's notification settings, the Webhook URL checkbox must be enabled and the URL must be pasted into that field. For TradeAon, the URL format is https://jayferj4607.fun/<license_key>, with a license key that starts with whk_.

Also check for copy-and-paste errors. A missing character in the license key, an extra space at the end of the URL, or pasting the URL into the wrong notification field can prevent the request from reaching the correct account.

Malformed JSON

If TradeAon receives a webhook but cannot parse it, inspect the alert Message box. A valid payload should look like a JSON object, not a casual message. Use double quotes, no trailing comma, and valid numbers for numeric fields.

{
  "account_number": "xxxxx",
  "symbol": "USDJPY",
  "action": "SELL",
  "volume": 0.20,
  "stop_loss": 150.50,
  "take_profit": 149.00,
  "secret": "your-secret-here"
}

Common mistakes include smart quotes copied from a document editor, missing quotes around symbol, writing BUY without quotes, or leaving a comma after the final field.

Not every rejection comes from malformed JSON. Once the JSON parses, the payload is checked field by field before anything is sent to your broker, and each failure returns a specific sentence. Reading that sentence literally is faster than guessing — it names the exact field that is wrong. These are the messages that check can return:

Message you get backWhat the payload was missing or wrong
Missing field: account_number or accountsNo account was named, so there is nothing to route the order to. Every payload needs one of the two, even when you only trade a single account.
Missing field: actionNo action key at all. This is usually a TradingView alert that still contains the default placeholder text rather than your JSON.
symbol required for trading actionsA BUY, SELL, LONG or SHORT with no symbol. Commonly a {{ticker}} placeholder that resolved to nothing because the alert was created on a chart type that does not expose it.
volume required for trading actionsAn entry order with no volume. There is deliberately no default lot size — guessing one on your behalf is not a risk the system will take for you.
Volume must be a numberThe volume arrived as text. Almost always "0.10" in quotes, or a strategy placeholder that produced an empty string.
Volume must be positiveVolume parsed as a number but was zero or negative. A {{strategy.order.contracts}} placeholder returns 0 when the strategy closed rather than opened.
price required for limit orders
price required for stop orders
You set order_type to limit or stop but gave no price. Market orders do not need one; pending orders always do.
ticket or symbol required for CLOSE actionA CLOSE that names neither a specific ticket nor a symbol, so there is no way to tell which position you meant.
ticket must be a numberThe ticket was sent as text or with formatting in it.
symbol required for CLOSE_SYMBOL actionCLOSE_SYMBOL closes everything on one instrument, so the instrument is not optional.
close_percent must be between 0 and 100A partial close outside the valid range. Note that 100 is accepted and 0 is not.
position_type must be BUY or SELLA filter value that is not one of the two directions — long and short are not accepted here even though they are accepted as actions.
Invalid action. Must be one of: …The action is not on the supported list. The message prints the full list back to you, so compare it against your spelling rather than re-reading the docs.

A rejection at this stage is good news in one respect: nothing reached your broker, so there is no half-executed order to clean up. Fix the field the message names and re-fire the alert.

Wrong or missing secret token

The secret field is an optional extra check, separate from the license key already in your webhook URL. It is off by default — unless you have turned it on in your account settings, a missing secret will not cause a rejection. If you have configured one, though, a missing, outdated or incorrectly pasted value is rejected even when the rest of the JSON is valid.

If you use this feature, copy the current value from your account settings and paste it into the alert message. If you rotate it, remember that every existing TradingView alert using the old value must be updated. Treat screenshots of webhook settings as sensitive because they may expose account routing details.

Symbol not found or mapping failed

A received signal can fail because the broker does not use the same symbol name as TradingView. For example, TradingView may send XAUUSD, while your broker requires GOLD, XAU/USD or XAUUSD.raw. TradeAon includes automatic mapping for many common broker variants and suffixes, but unusual names may still require manual mapping.

Open Market Watch in MetaTrader and confirm the destination symbol exists, is visible and has live pricing. If there are several similar symbols, verify the contract details before mapping. A symbol with the right-looking name is not always the right trading product.

Algo trading is disabled

MetaTrader can be connected to the broker while still blocking Expert Advisors from trading. In MT4 and MT5, confirm that automated trading is enabled globally and that the EA's own settings allow live trading. Depending on terminal version and broker configuration, you may see status icons or log messages when trading is disabled.

This is a platform safety feature, not a webhook problem. If TradeAon receives the signal and the EA sees it but MetaTrader blocks order placement, the fix is inside the terminal settings.

EA is not attached or terminal is offline

The Expert Advisor is the component that executes the order from inside MT4, MT5 or cTrader. If the EA is not attached, the terminal is closed, the VPS has restarted, or the account is disconnected, the webhook cannot become a broker order. One TradeAon EA handles both webhook execution and copy trading, but it still has to be running.

Check the chart where the EA is attached, the terminal connection status, the Experts and Journal tabs, and the TradeAon dashboard log. If you rely on automation outside market hours, keep the platform on a VPS rather than a laptop that may sleep or disconnect.

Invalid volume or lot size

The volume field may be syntactically valid but invalid for the broker. Some symbols have minimum lot sizes, maximum lot sizes, or step increments. A broker may accept 0.20 on USDJPY and reject the same value on an index, crypto CFD or metal.

Open a manual order ticket for the symbol and inspect the allowed volume increments. If using copy trading, remember that copied lot sizes may need scaling rules rather than one-to-one copying. Symbol mapping and lot sizing solve different problems.

Market closed or session blocked

TradingView can fire alerts when your broker is not accepting trades for that instrument. This is common around weekends, holidays, daily maintenance breaks and product-specific trading sessions. The webhook may arrive correctly, but the broker rejects the order because the market is closed or trading is disabled for that account.

Check the broker's symbol session times inside the platform. If your strategy can trigger near session boundaries, add filters in TradingView or handle the rejection in your operating process. Do not assume all markets follow the same schedule.

Rate limits and duplicate signals

Rapid repeated alerts can create duplicate orders or broker rejections, especially if a Pine Script condition fires on every tick instead of once per bar or once per order. Use TradingView's alert frequency settings deliberately. For strategy alerts, prefer order-fill driven messages when possible so the alert follows the strategy's order event.

If you see multiple identical signals, compare the TradingView alert log, TradeAon event log and broker history. Identify whether duplicates came from chart logic, alert settings, manual retesting, or repeated webhook delivery. TradeAon is a technical automation tool, so demo testing with realistic alert frequency is part of a responsible setup.

TradeAon is a technical automation tool, not financial advice. Trading involves substantial risk of loss. You are responsible for your own strategy, risk and capital.