TradingView Webhooks: Send Alerts to MT5, NinjaTrader and Prop Firm Accounts
Trade Dispensary started because I was paying a monthly subscription to get TradingView alerts into MetaTrader 5, and I thought I could write the script myself in a weekend. I was wrong about the weekend. Two years later it routes TradingView alerts into seven different platforms, including funded prop firm accounts, and this is how that part of it works.
A TradingView alert can send a webhook, which is just a small message posted to a web address. Trade Dispensary runs on your own PC, listens at that address, and turns the message into a real order on MT5, NinjaTrader, TopstepX, cTrader, Bybit or a DXtrade prop account. You need a TradingView plan that includes webhooks, a fixed public address for your machine, and an alert message in JSON. The whole setup takes about fifteen minutes.
Why I built this instead of paying a monthly fee for it
The original problem was small and specific. I had a strategy in Pine Script that worked, and no way to make it trade an account while I was asleep. The standard answer at the time was a bridge that charged monthly, which I paid for a while and resented every time the invoice landed.
The resentment was not really about the money. It was that I was renting a translator. The alert already existed. The broker already had an API. The gap between them was a few hundred lines of code, and I was paying for it forever.
So I wrote the few hundred lines. Then a friend wanted it pointed at NinjaTrader instead of MT5, which turned out to be a completely different problem. Then someone asked about a funded futures account, which was a third problem again. The project got away from me, and what came out the other end is a trade copier that treats TradingView as one signal source among several rather than as the whole product.
That history explains a design decision you will notice straight away: Trade Dispensary runs on your machine, not on ours. There is no cloud relay in the middle. Your alerts go to your PC, and your credentials never leave it. That matters more than it sounds like it does, and the prop firm section below explains why.
It is also why the licence is a one-time purchase rather than a subscription. Whatever a hosted bridge costs per month when you read this, the structure is the same: you pay it again next month. We cover that comparison properly in our piece on what actually separates one trade copier from another.
How does a TradingView webhook place a real trade?
A webhook is a short message TradingView posts to a web address the moment your alert fires. It contains whatever text you typed into the alert box. It does not place an order by itself. Something at that address has to read it and act on it, and that something is the bridge.
The chain has four links, and it helps to know which one is which when something goes wrong.
- Your indicator or strategy decides a condition has been met and fires the alert.
- TradingView posts your alert message to the web address you gave it.
- Trade Dispensary, running on your own Windows PC, receives that message and reads it.
- Your platform gets a real order: MT5, NinjaTrader, TopstepX, cTrader, Bybit or a DXtrade prop account.
The last link is the fast one. Our own copy leg is measured in milliseconds, and on a customer's NinjaTrader setup last week the median time from source fill to destination order was 66 milliseconds, with nine out of ten under 120 milliseconds.
The honest caveat is that link two is not ours. TradingView decides when to deliver your alert, and that delivery is the slowest and least predictable part of the whole chain. Anyone promising you end to end latency figures for a TradingView webhook is quoting a number they do not control. What you can control is that nothing is added to it after the message lands.
Three TradingView rules that quietly decide your setup
TradingView's webhook system has constraints most automation guides never mention, and each one has a real consequence for how you build this. They come straight from TradingView's own webhook documentation.
Only ports 80 and 443 are accepted. Requests to any other port are rejected outright. Trade Dispensary listens on port 5000 on your own machine, so pointing TradingView straight at it can never work, no matter what your firewall says. This is the real reason a tunnel is part of the setup rather than an upsell: it puts your local app behind a normal HTTPS address on port 443.
A request is cancelled if your server takes longer than three seconds. That is a hard limit, and it rules out any design where the receiver places the order first and answers TradingView afterwards. A slow broker response would cost you the alert. Trade Dispensary answers immediately and does the work in the background, so a slow platform delays your fill but never loses the signal.
Webhooks need a paid TradingView plan. Essential is the cheapest tier that includes them, and Plus, Premium and Ultimate include them too. The free Basic plan cannot send a webhook at all. If you find a guide telling you to buy Pro or Pro+, it is quoting plan names TradingView retired years ago, which is a decent signal about how current the rest of that guide is.
One more worth knowing if you run a tight security setup: TradingView posts from four fixed IP addresses, so the traffic can be allow-listed rather than left open to the internet.
What does the alert message need to say?
At a minimum, an action and a symbol. Everything else is optional. This is a complete, working alert message that opens a long gold position with a stop and a target:
{
"action": "buy",
"symbol": "XAUUSD",
"price": 1920,
"sl": 1910,
"tp": 1935
}
Paste that into the Message box of a TradingView alert and it will work. No Pine Script changes, no library to import, no licence ID to embed in your strategy code.
If you are firing from a Pine Script strategy rather than drawing conditions by hand, TradingView will substitute its own placeholders for you, so the message can build itself from the strategy's actual order:
{
"action": "{{strategy.order.action}}",
"symbol": "{{ticker}}",
"volume": {{strategy.order.contracts}},
"price": {{close}},
"comment": "{{strategy.order.comment}}"
}
One thing worth knowing before you spend an evening debugging: the field names are forgiving on purpose. Size can be written as volume, quantity, qty, size, contracts or lots, and they all mean the same thing. A stop can be sl, stop_loss, stopLoss or stop_price. Symbol can be symbol, ticker, pair, instrument or contract.
That flexibility exists because most people arrive with an alert that already works somewhere else, and rewriting it is a pointless step. If your existing message is close, it will probably just run.
Exits and modifications use the same format. To close a position, send an action of close with the symbol. To move a stop on a position that is already open, send a modify action with a new stop level. And if your strategy scales out at several levels, a tps array will place one order per target rather than one order with a single exit:
{
"action": "buy",
"symbol": "EURUSD",
"volume": 3,
"sl": 1.0820,
"tps": [1.0900, 1.0950, 1.1000]
}
Where can a TradingView alert actually end up?
Seven destinations, and they are not interchangeable. The one you need decides everything else about your setup, so it is worth checking this list against the account you actually hold before you buy anything, ours included.
| Destination | Typically used for | Partial exits |
|---|---|---|
| MetaTrader 5 | Forex and CFD brokers, CFD prop firms | Yes |
| NinjaTrader 8 | Futures brokers and most futures prop firms | Yes |
| TopstepX | Topstep funded and evaluation accounts | Yes |
| cTrader | Forex and CFD brokers | Yes |
| Bybit | Crypto spot and futures | Yes |
| DXtrade | TradersLaunch, FundedSeat and similar prop accounts | No, full exit only |
| Breakout | Crypto prop accounts | No, full exit only |
The two browser-driven destinations at the bottom, DXtrade and Breakout, exist because those firms give you a web platform and no API. They work, and they are genuinely useful for getting an automated strategy onto a funded account that was never meant to be automated, but they cannot scale out of a position. If your strategy relies on partial exits, pick a destination from the top five.
Connecting a prop firm account to TradingView
This is the most common reason people come looking, and it is where most of the bad advice lives.
Start with the platform, not the firm. No futures prop firm offers MetaTrader, so a TradingView to MT5 bridge is no use to you if your account is with Topstep or Apex. Most futures firms hand you NinjaTrader, Tradovate, TopstepX or a web platform, and the one you get decides whether automation is possible at all. Our firm by firm breakdown of what replaced ProjectX covers where each firm landed after the 2026 migration.
If you are with Topstep specifically, two rules matter and both are easy to trip over.
Topstep enforces one session per user. Logging in somewhere new signs you out everywhere else. If Trade Dispensary is holding a live connection as a signal source, it will fight with your own TopstepX window. The fix is to use TopstepX as a destination rather than a source, because a destination only sends orders and does not hold a session open. Then you can keep your charts on screen while alerts are executing.
Topstep requires that trading activity comes from your personal device. Its Terms of Use prohibit VPN and identity-masking services, and its API access documentation states that automated trading must run from your own device rather than a VPS. That rules out every hosted webhook relay, which is the category most TradingView automation services fall into. Trade Dispensary runs locally, so the order originates from your machine. We went through the compliance side in detail in how to use a trade copier without getting flagged.
Note that TopstepX API access is billed separately from your Topstep subscription, at $29 a month with a discount for existing Topstep traders. That is Topstep's charge, not ours, and it applies whatever software you point at the account.
For the firms that moved to NinjaTrader or Tradovate, the path is the same idea with a different destination. The NinjaTrader integration guide walks through the Add-On side of it.
What decides whether the order comes out the right size?
Three things, and all three are set per destination rather than per alert: the sizing mode, the symbol mapping, and the risk limits. Getting these right is the difference between an alert that trades correctly on four accounts and one that trades correctly on none of them.
Sizing. You can send a fixed quantity regardless of what the alert says, multiply whatever the alert sends by a factor, or size from risk so that the distance between entry and stop costs a set percentage of the account. Risk-based sizing needs a stop in the alert, and it is available on MT5 destinations where the contract specifications can be read from the broker.
Symbol names. This is the single most common reason a first test does nothing at all. TradingView calls gold XAUUSD, your broker may call it GOLD, and a futures platform will want a specific contract like MGCZ6. If the names do not match, the alert arrives, is understood, and copies nowhere. Symbol mapping is one line per pair and it is the first thing to check when a test trade goes quiet.
Risk limits. Each destination can carry its own daily loss limit, trailing drawdown and daily order cap. Breach one and that account is flattened and stops copying for the day, while every other account keeps running. On a funded account this is the difference between a bad day and a failed evaluation. There is more on building those rules sensibly in our risk management guide.
The setup, start to finish
Fifteen minutes, assuming your platform is already installed and logged in.
- Install and start. Unzip Trade Dispensary anywhere and run the exe. The dashboard opens in your browser at localhost.
- Give your PC a public address. Open the Tunnel Manager tab and run the Setup Wizard. ngrok is bundled, so there is nothing else to download, and Pinggy Pro is supported as an alternative. You need a paid tier on either, because free tiers issue a new address on every restart and that silently breaks every alert you have set up.
- Copy your webhook URL. The dashboard shows it, ending in
/webhook/tradingview. - Add TradingView as a source. Accounts, then Source Accounts, then Add. Pick TradingView and name it. There are no credentials, because the alert comes to you.
- Add your destination. Same screen, Destination Accounts. Choose your platform, enter its details, and press Test before saving. Test failing here saves you debugging a live alert later.
- Create the copy rule. Source on the left, destination on the right, sizing mode, symbol mapping if the names differ, then enable it.
- Set the alert in TradingView. Paste the webhook URL into the Webhook URL box under Notifications, and the JSON into the Message box.
- Test on the smallest size you can trade. Watch the Activity Log as it arrives. You want to see it received, understood, and executed, and then you want to close it and watch the close copy too.
That last step is not optional. An entry copying correctly proves almost nothing, because most failures show up on the exit.
What does it cost to run?
A one-time licence of $129, plus a few dollars a month for the tunnel service that gives your PC a fixed address. There is no per-trade fee, no per-account fee and no subscription to Trade Dispensary itself. The tunnel is a third-party cost paid directly to ngrok or Pinggy, and we do not take a cut of it.
Being straight about that tunnel cost matters, because it is the one recurring item and plenty of comparison pages leave it out. Pinggy Pro starts at around $2.50 a month and ngrok's cheapest paid tier is around $8. Either one is fine. Apart from your TradingView plan, and the API fee if you are on Topstep, that is the only ongoing cost in the chain.
Compare that against a hosted bridge on a monthly plan and the arithmetic gets obvious fairly quickly, but the price is not the part I would weigh first. Weigh the destination list. A cheaper tool that cannot reach your platform is not cheaper. PineConnector, which is what I was paying for originally, is a solid product that routes to MetaTrader, and if MetaTrader is all you need then the comparison is genuinely close. It stops being close the moment a funded futures account enters the picture, because MetaTrader is not on the menu at any futures prop firm.
Where to start
If you have a Pine Script strategy or an indicator that already tells you when to trade, the work left is smaller than it looks. The alert message is five lines. The rest is a copy rule and one test trade.
Start with the destination you actually hold rather than the strategy you want to run, because that is the constraint that decides everything downstream. Check it against the table above, then look at the full feature list to see whether the exit behaviour your strategy needs is supported there.
Prove the whole chain on a demo account before a funded one sees it. Trading carries a substantial risk of loss, and a webhook pipeline fails in ways a manual trader never meets: an alert firing on an unclosed bar, a strategy repainting, a message field typed wrong, a tunnel dropping mid-session. None of those show up while you read the config. They show up on the first live trade. Point the rule at a demo or simulated destination, run it through a full session including a stop-out and a reversal, and confirm the size and direction that arrive are the ones you intended. Do the same again after any update or change to the alert message. Prop firm accounts deserve more caution, not less, because a rule breach there costs the account itself rather than the trade.
Trade Dispensary is a one-time $129 licence with every future update included, and it runs on your own machine so nothing about your accounts passes through us. You can get a licence here, or read how the same pipeline handles Telegram signal channels if your signals arrive that way instead.
Frequently asked questions
Can TradingView place trades directly with my broker?
Only where TradingView has a built-in broker integration, and no futures prop firm offers one. For everything else a TradingView alert is just an HTTP message. Something has to receive that message and turn it into an order on your platform. That receiver is the bridge, and it is the piece most people are actually shopping for when they search for TradingView automation.
Which TradingView plan do you need to send webhooks?
Essential is the cheapest plan that includes webhook alerts, and Plus, Premium and Ultimate include them too. The free Basic plan cannot send webhooks at all. Guides that tell you to buy Pro or Pro+ are quoting plan names TradingView retired years ago. If you need alerts that check faster than once per minute, that is Premium and above.
What does the TradingView alert message have to contain?
At minimum an action and a symbol, for example {"action":"buy","symbol":"XAUUSD"}. Everything else is optional: size, entry price, stop loss, take profit, a comment, and a source account name. Trade Dispensary accepts several spellings for each field, so qty, quantity, size, contracts and lots all mean the same thing and you do not have to rewrite a Pine Script alert you already use.
Do you need a VPS to run TradingView webhook automation?
Not for Trade Dispensary, and for a Topstep account you must not use one. Topstep's terms require that trading activity originates from your personal device, so relaying orders through a VPS or cloud server risks removal from the program. Trade Dispensary runs on your own Windows machine, which keeps the order path compliant.
Can one TradingView alert go to several accounts at once?
Yes. One alert can fan out to as many destination accounts as you like, each with its own copy rule. That means different position sizes, different symbol mappings, and different risk limits per account, all from a single alert. This is the usual setup for traders running the same strategy across several funded accounts.
Is a paid tunnel really necessary for TradingView webhooks?
Yes, if you want it to keep working. TradingView has to reach your machine over the public internet, and free tunnel tiers hand you a new URL every restart, which silently breaks every alert you have configured. Trade Dispensary ships with ngrok built in and supports Pinggy Pro, both of which offer a fixed address on a paid plan for a few dollars a month.
How is this different from PineConnector?
Two structural differences. PineConnector is a monthly subscription and routes to MetaTrader, while Trade Dispensary is a one-time purchase that routes to seven destinations including NinjaTrader, TopstepX, cTrader, Bybit and DXtrade prop accounts. Check both against your own platform list, because the destination you need matters more than the price.
Tags:
Share this post
Related Posts
Continue learning about copy trading with these related articles: