# Webhook to MT4 — coming soon, send JSON signals

Source: https://pipsync.io/en/webhook-to-mt4
Last updated: 2026-06-08

To send a webhook to MT4, POST a flat JSON payload to your unique PipSync webhook URL: it validates the signal and saves it for your review on the Signals page, with no MQL4 EA and no VPS to run. MetaTrader 4 account connections are coming soon, and a webhook from your own system is never traded automatically: it always becomes a signal for your approval.

The payload is deliberately simple: an instrument, a direction of buy or sell, and entry, sl and tp1 prices. The webhook URL itself carries a secret token and acts as the credential, so any system that can make an HTTPS POST — a screener, a backtest runner, a custom bot — can send signals without keeping a terminal open. PipSync is the hosted layer between your code and your broker accounts, replacing the old MQL4-EA-on-a-VPS stack with a hosted API.

> Note: this destination is not connectable in PipSync yet (coming soon).

## Webhook to MT4 at a glance

| | |
|---|---|
| Source | Any system that can HTTPS POST flat JSON (screeners, bots, backtests, TradingView) |
| Destination | MetaTrader 4 (hedging-only, MQL4 brokers) — coming soon |
| Payload | JSON: instrument, direction (buy/sell), entry, sl and tp1 — all required, sl/tp above 0 |
| Credential | Unique per-workspace webhook URL with a secret token; regenerate it under Settings → Advanced → TradingView Alerts if leaked |
| Infrastructure | Fully cloud-based — no EA, no VPS, no terminal kept open |
| Feedback | Signed outbound webhooks (HMAC-SHA256) + REST read API + dashboard view of every order |
| Auto-trade | Never for a webhook from your own system: it always becomes a signal for your approval |
| Price | Webhook integration needs a plan that includes it (the Advanced plan) |

## How do I connect a custom webhook to MT4?

MetaTrader 4 connections are coming soon. You can already send any HTTPS-capable system's signals to PipSync; you never write MQL4 or rent a VPS.

1. **Create your PipSync account and subscribe to a plan** — Sign up at app.pipsync.io (the $0 Free plan needs no card but only parses signals), then subscribe to a plan that includes webhook integration. A payment method is required, and you can cancel any time.
2. **Add your MT4 account** — MetaTrader 4 account connections are coming soon, so there is nothing to connect yet. Note that MT4 is hedging-only, so each signal will open its own position.
3. **Generate your webhook URL** — Go to Settings → Advanced → TradingView Alerts and click Generate webhook URL. The URL contains a secret token, is shown only once and is the credential — keep it private and regenerate it if it ever leaks.
4. **Configure server-side risk rules** — Set fixed-lot or percent-risk sizing, min/max lots and max open positions. These run server-side.
5. **Send a test payload** — POST a sample flat JSON body (instrument, direction, entry, sl, tp1) and check Recent alerts under Settings → Advanced → TradingView Alerts to confirm PipSync interprets it correctly.
6. **Test on demo, then go live** — Once MT4 connections are available, start with a demo account, then switch to your live account when the behaviour matches your expectations.

## What JSON payload does a webhook to MT4 expect?

A webhook to MT4 expects a single flat JSON object, not a nested or templated structure. Five fields are required: instrument, direction (buy or sell), entry, sl and tp1. There is no close action — a direction other than buy or sell is rejected.

entry, sl and tp1 are absolute prices above 0 — a payload with 0 is rejected, not read as market. Every other field, including lots and comment, is ignored: sizing always comes from your PipSync settings.

- instrument: the symbol, e.g. EURUSD (upper-cased, letters and digits only)
- direction: buy or sell (long and short also work); there is no close action
- entry: absolute entry price, above 0
- sl: absolute stop-loss price, above 0
- tp1: at least one absolute take-profit price, above 0 (tp1 to tp5 for several)
- other fields: ignored, including lots and comment

## How does the webhook URL keep my MT4 account secure?

The webhook URL is the credential: each source gets its own unique HTTPS endpoint containing a secret token, so possession of the URL is what authorises a signal. Treat it like a password — never publish it, and send only over HTTPS.

If a URL is ever exposed, regenerate it under Settings → Advanced → TradingView Alerts to invalidate the old one immediately. Inbound requests are also rate-limited; on an HTTP 429 your client should back off with jitter and retry.

## Why does PipSync replace the MQL4-EA-on-a-VPS setup for MT4?

MT4 automation was historically built around an MQL4 expert advisor running inside a terminal on a rented VPS, which had to stay online to receive and act on signals. PipSync removes that entire stack: it accepts your JSON over HTTPS in the cloud, with MT4 execution through a hosted bridge coming soon, so there is no EA to compile, no terminal to keep open, and no VPS to maintain.

Because execution lives in the cloud, signals are processed even when your own computer is off. The trade-off to know is that MT4 is hedging-only with no netting concept, so each buy or sell opens a distinct position rather than offsetting an opposite one — a key difference from MT5.

## What feedback will I get after a webhook trade on MT4?

You get three layers of feedback. The dashboard shows every parsed signal and resulting order on all plans, so you can audit exactly what arrived and what PipSync did with it.

For programmatic feedback, PipSync sends signed outbound webhooks for events such as trade.opened, trade.closed, tp_hit and sl_hit, each carrying an HMAC-SHA256 signature in the X-PipSync-Signature header and retried up to five times with backoff. A REST read API (GET /v1/signals and GET /v1/trades, documented in OpenAPI 3.1) lets you poll state directly; the read API is part of the Enterprise plan.

## How is webhook to MT4 different from webhook to MT5?

The JSON payload and the webhook-URL credential model are identical, so your sending code does not change between the two. The difference is in how the destination platform handles positions: MT4 is hedging-only with no netting, meaning each signal opens its own position and opposite trades coexist.

MT5 supports both netting and hedging accounts and can apply partial fills, so an opposite order may reduce or close an existing net position depending on the account type. If your strategy assumes opposite signals offset each other, that behaviour exists on MT5 netting accounts but not on MT4, where each signal stays its own position.

## FAQ

### What is the minimum JSON needed to open a trade on MT4?

You send five fields, all required, for example {"instrument":"EURUSD","direction":"buy","entry":1.0850,"sl":1.0800,"tp1":1.0950}. A 0 for entry, sl or tp1 is rejected, and sizing always comes from your configured server-side rules.

### Do I need an EA or a VPS to send a webhook to MT4?

No. PipSync is fully cloud-based and receives your JSON signals in the cloud; MT4 execution through a hosted bridge is coming soon. There is no MQL4 expert advisor to compile, no terminal to keep open and no VPS to rent, and execution continues when your computer is off.

### How do I close an open MT4 position via webhook?

You cannot, through the webhook: there is no close action, and a direction other than buy or sell is rejected. Because MT4 is hedging-only, an opposite buy or sell opens its own position instead of netting out, so exits stay with the stop-loss and take-profit or with you.

### What about my broker's symbol names?

MT4 brokers use varying symbol names — some append suffixes like a dot or a letter to instruments. There is no symbol-mapping setting for webhooks, so if your broker's naming differs, message us in the support chat with the symbol and your broker.

### What happens if I exceed the webhook rate limit?

Inbound requests are rate-limited. On an HTTP 429, your client should pause and retry with backoff and jitter.

### Can a webhook from my own system trade automatically?

No. A webhook from your own bot, script or tool is never traded automatically: it always becomes a signal for your approval. MetaTrader 4 account connections are coming soon.

### Is PipSync a signal provider or giving trading advice?

No. PipSync is signal execution infrastructure: it receives your webhook and turns it into a signal for you to review. It does not generate signals, sell strategies or provide investment advice, and trading leveraged products carries a substantial risk of loss.

### Can I override my configured lot size for a single webhook trade?

No. A lots field in the JSON is ignored; server-side fixed-lot or percent-risk sizing runs as you configured it.

## Related

- [Webhook to MT5 — send JSON signals from any system](https://pipsync.io/en/webhook-to-mt5)
- [TradingView to MT4 — coming soon, without a VPS](https://pipsync.io/en/tradingview-to-mt4)
- [Telegram to MT4 — coming soon, without an EA or VPS](https://pipsync.io/en/telegram-to-mt4)
- [Why MetaTrader has no inbound webhook (and how to automate TradingView alerts anyway)](https://pipsync.io/en/metatrader-webhook)
- [Server-side risk management — trading rules enforced before your broker](https://pipsync.io/en/server-side-risk-management)
- [Signal copier with no VPS — execution runs in the cloud](https://pipsync.io/en/signal-copier-no-vps)

---

PipSync is a signal execution tool. It does not provide trading signals, does not guarantee any trading results and is not investment advice. Trading leveraged products involves substantial risk of loss.
