Duplicate TradingView webhook alerts and how to ignore them
Posted: Wed Oct 21, 2026 1:19 pm
Duplicate TradingView webhook alerts and how to ignore them
Anyone who sends TradingView alerts to a broker through a webhook eventually sees the same alert arrive twice. Sometimes three times. If the receiving code treats each one as a new instruction, one signal becomes two or three positions.
There are a few causes. TradingView may resend an alert if it doesn't get a quick response from your server. An alert set to fire once per bar can trigger more than once if the condition flips on and off within the bar. And network retries between services can deliver the same message again.
The fix belongs on the receiving end. Every alert should carry something unique that the receiver can check. The simplest version is to include the symbol, the bar time and the signal type in the alert message. The receiver keeps a short list of recently processed keys and drops any message whose key it's already seen.
A few other practical points. Respond to the webhook quickly with a success code and do the actual order work after, so TradingView doesn't resend while you're still talking to the broker. Store the processed keys somewhere that survives a restart, even a small file, otherwise a server restart wipes the memory and duplicates get through again. Keep the list short, a day of keys is usually enough.
None of this is complicated, but skipping it is one of the most common ways a simple alert setup ends up with more exposure than intended.
For anyone using a third party bridge service rather than their own server, check whether the service already handles duplicates, since some do and some leave it entirely to you.
Send the same alert to your receiver twice by hand, using a tool like curl, and confirm that only one order reaches the demo account. Then restart the receiver and send it again to check that the memory of processed keys survived the restart.
Anyone who sends TradingView alerts to a broker through a webhook eventually sees the same alert arrive twice. Sometimes three times. If the receiving code treats each one as a new instruction, one signal becomes two or three positions.
There are a few causes. TradingView may resend an alert if it doesn't get a quick response from your server. An alert set to fire once per bar can trigger more than once if the condition flips on and off within the bar. And network retries between services can deliver the same message again.
The fix belongs on the receiving end. Every alert should carry something unique that the receiver can check. The simplest version is to include the symbol, the bar time and the signal type in the alert message. The receiver keeps a short list of recently processed keys and drops any message whose key it's already seen.
A few other practical points. Respond to the webhook quickly with a success code and do the actual order work after, so TradingView doesn't resend while you're still talking to the broker. Store the processed keys somewhere that survives a restart, even a small file, otherwise a server restart wipes the memory and duplicates get through again. Keep the list short, a day of keys is usually enough.
None of this is complicated, but skipping it is one of the most common ways a simple alert setup ends up with more exposure than intended.
For anyone using a third party bridge service rather than their own server, check whether the service already handles duplicates, since some do and some leave it entirely to you.
Send the same alert to your receiver twice by hand, using a tool like curl, and confirm that only one order reaches the demo account. Then restart the receiver and send it again to check that the memory of processed keys survived the restart.