Duplicate orders in trading automation: why they happen and how to stop them.
One TradingView alert, two tickets in MT5. Double the risk on a trade you planned once, and on a prop firm account that can be the difference between passing and breaching a daily limit. These are the five causes we actually see, ranked by how often they bite, plus a 5-minute diagnosis that tells you which one is yours.
The short answer
A duplicate order always comes from one of two places. Either TradingView sent the alert twice, or one alert was executed twice. The first is a TradingView-side problem: two alerts for the same event, an alert frequency that fires more than once, a strategy alert that fires on every order fill, or a resend after a server error. The second is a terminal-side problem: the same MT5 account running the EA in two terminals, or one EA listening on several charts.
Telling them apart takes one look at your bridge's signal log: two rows means two webhooks arrived; one row with two tickets means two executions. The diagnosis section below walks you through it. First, the causes.
1. The same MT5 account in two terminals
This is the one we have seen in production, and it is the least obvious because nothing looks wrong. A customer moved to a hosted terminal on SFCloud and kept MetaTrader 5 running on their own PC, logged into the same account, with the EA still on the chart. One webhook arrived, both terminals had the EA connected to that account, and the account ended up with two tickets for one signal.
MT5 lets you log into the same trading account from several terminals at once, and each terminal runs its own copy of the EA. The broker sees two independent clients sending two orders. The same thing happens with a PC plus a VPS, a VPS plus a second VPS "as a backup", or two MT5 installations on the same machine pointed at one login.
On our side, when the same account connects twice, the server closes the older push connection. That reduces the risk, but it did not prevent the case above, so do not treat it as a safety net. The rule is simple: one MT5 account = one terminal running the EA.
- Moving to a VPS or SFCloud? Remove the EA from the chart on your PC, or log that terminal out of the account, before the new terminal goes live.
- Want a backup terminal? Keep it without the EA (or logged out) and switch over only when the main one is down.
- Several accounts? One terminal per account is the right pattern; see hosting multiple MT5 accounts.
2. Two alerts for the same event
The second most common cause is simply that two alerts exist. Typical ways it happens:
- Two alerts on the same chart pointing to the same webhook, often one created while testing and never deleted.
- A strategy alert plus an indicator alert for the same condition, both sending a buy.
- The same alert on two timeframes, for example on M5 and M15, both triggering on the same move.
- An edited strategy with a new alert on top of the old one. TradingView runs a copy of the strategy on its servers when you create the alert, and changes to the chart's strategy do not reach that copy: you have to delete the previous alert and create a new one (TradingView Help Center, verified 4 October 2026). If you only create the new one, both keep firing.
In our logs these pairs arrive between 50 and 500 ms apart. With SignalForge's default pyramiding of 1 trade per direction per symbol, the second identical entry is filtered and shows as FILTERED in the dashboard, so the default setting absorbs it. If you raised pyramiding to scale into positions, both entries will execute. The real fix is in TradingView: open the Alerts panel and delete every alert you do not need.
3. Alert frequency, repainting and strategy fills
Here the alert exists once but fires more than once. What TradingView's own documentation says (verified 4 October 2026):
- Once per bar triggers whenever the condition is met, but no more than once per bar. Once per bar close is the same except that the bar has to close first. Once per minute checks every minute and triggers whenever the condition is met, so it can fire several times on one bar. These four options apply to indicator and drawing alerts; simple price alerts offer "Only once" and "Every time".
- Repainting. On a live bar, high, low and close keep changing, and a condition such as a crossover can appear mid-bar and vanish before the close. With Once per bar the alert fires on that intra-bar signal; if the condition reappears on the next bar, it fires again, and you get two entries for what looks like one signal on the closed chart. The Pine Script docs name bar-close triggering as the simplest way to avoid this kind of repainting.
- alert() in Pine Script.
alert.freq_once_per_barsends only the first call per realtime bar,alert.freq_once_per_bar_closeonly on the bar close, andalert.freq_allsends every call during the bar. If your script usesfreq_all, expect several messages per bar. - Strategy alerts fire on every executed order. TradingView sends a notification each time an order of the strategy is filled, and more than one can be sent in the same bar. A strategy that closes and reopens, or adds to a position, sends one message per fill. A script alert that includes both order fill events and
alert()calls triggers on both, which doubles every signal.
For automated entries, Once per bar close is the safer default. If your strategy sends one message per fill, make sure each message carries the right action (a close is not a new buy); our webhook JSON examples show the fields.
4. Resends after a server error
TradingView's official page on webhook resubmission says: if the receiving application returns an HTTP status code between 500 and 599, except 504, the notification is sent again after 5 seconds, with up to 3 resends, so the maximum is 4 sends for one trigger (verified 4 October 2026). It does not resend on 4xx codes or on 504.
This is where a slow or overloaded bridge can create duplicates: if it accepts and processes the alert but still answers with a 5xx, TradingView sends it again and the bridge may treat the resend as a brand-new alert. The fingerprint is a gap of about 5 seconds between the two signals.
SignalForge answers 200 with status queued as soon as the alert is accepted, and everything that happens afterwards (filters, delivery, execution) does not change that response. An accepted alert gives TradingView no reason to resend. Server deploys run with a health check, a 30-second overlap and 30 seconds of draining, so a deploy does not cut reception.
5. One EA on several charts
Many bridge EAs listen for signals on every chart where they are attached. Put the same EA on EURUSD and XAUUSD "to cover both" and, depending on the bridge, each instance can execute the same incoming signal. In SignalForge the EA claims each signal across charts, so two charts of the same terminal cannot both execute one signal. Still, one chart per terminal is enough: the EA trades the symbol in the alert, and only falls back to the chart's symbol when the alert does not include one.
A signal without an "account" field goes to every live MT5 account connected with your token. If your demo and your live account are both connected, each one takes the trade: that is routing, not duplication. Add "account": "12345678" to send it to one login only.
Diagnose it in 5 minutes
- Step 1: compare the two tickets in MT5's History tab. Same account or different accounts? Opened how far apart?
- Step 2: open the signal log in the SignalForge dashboard and find that trade. Every accepted webhook is a row with its status and reason.
- Step 3: check the Experts tab of each terminal. A
[PROC]line is a signal received and a[SEND]line is the order sent.[DEDUP]lines are the EA's duplicate guard at work: a signal it had already handled was not executed again. - Step 4: open the Log tab of TradingView's Alerts panel. Every trigger is listed there, and you can export it to CSV.
Timings are what we observe in our own logs and help you narrow things down; they are not a rule. If you cannot match your case to a row, send us the signal time and both ticket numbers at [email protected].
How SignalForge protects you, and where it does not
- Same signal, never twice. The EA keeps the result of every signal id on disk, so a signal it already handled is not executed again. If an execution is interrupted halfway, it is recorded as an unknown result and is not retried: we prefer a missing trade you can see over a hidden double position.
- One execution per terminal. Two charts in the same terminal cannot both execute one signal.
- One push connection per account. When the same account connects twice, the server closes the older connection. It helps, but it is not a guarantee against two terminals (see cause 1).
- Pyramiding default of 1 per direction. A second identical entry on the same symbol is filtered, which absorbs most back-to-back duplicate alerts. You can raise it in the dashboard if you scale in on purpose.
- What we do not do: the server does not deduplicate alerts. Every POST from TradingView is a new signal, so two different alerts are two signals. That is deliberate: two alerts that look alike can be two intended trades, and only you know which.
Setup details, alert fields and the signal log are covered in the documentation. To check what your alert actually sends, paste it into the webhook tester.
FAQ
Why does my EA open two trades from one TradingView alert?
Most often because the same MT5 account is logged in on two terminals that both run the EA, for example your PC and a VPS or SFCloud. One alert reaches both and each one opens its own ticket. Keep one terminal with the EA per MT5 account.
Does TradingView send the same webhook twice?
Only in specific cases. TradingView resends a webhook when the receiver answers with a status code from 500 to 599, except 504: up to 3 resends, 5 seconds apart, so at most 4 sends per trigger (TradingView Help Center, verified 4 October 2026). More often the duplicate comes from two alerts, the alert frequency or a strategy alert that fires on every order fill.
Does SignalForge remove duplicate alerts?
Not on the server: every POST from TradingView is a new signal, so two alerts give you two signals. The EA never executes the same signal twice, two charts in the same terminal cannot both execute one signal, and the default pyramiding limit of 1 trade per direction per symbol filters a second identical entry.
How can I tell whether TradingView sent the alert twice?
Open the SignalForge signal log. Two rows for the same trade mean two webhooks arrived, so the cause is on the TradingView side. One row with two tickets in MT5 means the signal was executed by two terminals. The Log tab of the TradingView Alerts panel shows every trigger as well.
Should I use Once per bar or Once per bar close?
For automated entries, Once per bar close is the safer default. Once per bar fires the first time the condition is met inside a bar, and a condition on a live bar can disappear before it closes. TradingView's Pine Script docs recommend triggering on bar close as the simplest way to avoid that kind of repainting.
Can I run my EA on my PC and on a VPS at the same time as a backup?
Not on the same MT5 account. Two terminals logged into one account, both with the EA, can execute the same signal twice. If you want a backup, keep the second terminal without the EA, or logged out, and switch only when the main one is down.
Sources, verified 4 October 2026: TradingView Help Center, Webhook resubmission, Differences between alert frequencies, Strategy alerts and Manage alerts; Pine Script docs, Alerts and Repainting.
Related troubleshooting
One alert. One order.
A bridge that never executes the same signal twice and shows every signal with its status. 14-day free trial, no card required.
SignalForge AI is an order-execution tool. We do not provide investment advice. Trading involves risk of loss. TradingView behaviour described here is taken from its official documentation on the date shown and may change.