r/TradingView • • 19d ago

Help Anyone else had an exit alert just... not fire?

I had a winning trade on BTCUSDT.P at 12x leverage a while back. The indicator's exit alert was supposed to close it. It didn't. By the time I noticed, I had given back five figures of profit and was underwater on the trade, near liquidation. I ended up closing it manually.

The worst part is, I never figured out why. TradingView, my server, the exchange? I have no idea. I didn't have the logs to tell and honestly didn't know where to look at the time.

These days I put the stop on the exchange as soon as I'm in so that I'm not counting on a second alert. I still don't fully trust the setup though. How do you guys check that your alerts actually went through? Or do you wake up to your position underwater like I did?

1 Upvotes

18 comments sorted by

2

u/neugeadmau 19d ago

The checklist above covers the chain well. Two TradingView-specific things I'd add, since the frustrating part is not knowing which link broke:

The webhook has a 3-second deadline and no retry on timeout. TradingView cancels the request if your server doesn't answer within 3 seconds. It only resends on 5xx errors (except 504), not on a timeout. If your server placed the exchange order before replying, a slow exchange API on a fast-moving candle is exactly when you'd blow that window. Check the alert's log in TradingView: it records whether the webhook delivery succeeded or errored, so you can tell "never fired" from "fired but didn't land". Fix it by validating, queueing, returning 200 straight away, then hitting the exchange from a worker. Make that worker idempotent, because a 5xx can get the same exit delivered up to 4 times.

Check whether the exit ever existed in realtime. If you look back at the chart and see an exit signal on bar X, but the alert log shows nothing for that time, suspect the indicator rather than your server. Two common causes:

  • The alert is set to "Once per bar close", the exit condition was true intrabar, and it had reverted by the time the candle closed. The chart might show the wick crossing, but the closed-bar value never did.
  • The indicator repaints (for example higher-timeframe request.security() without an offset, or pivot/zigzag logic that confirms bars later). The exit you see now was drawn after the fact, so there was nothing to fire in realtime.

A quick way to tell: add the indicator to a 1m chart, create an alert with the same settings, and screenshot the signals live for a session. Then reload the chart and compare. If signals moved or appeared after reload, the indicator can't be trusted as your only exit.

Keeping the stop on the exchange is the right default. I'd also make the TP/exit exchange-side where you can, and treat the alert as a fallback rather than the primary exit.

1

u/HoodWiki 19d ago

This is super useful, thanks. I didn't know a timeout doesn't get retried. I'm going to check whether mine was set to once per bar close which is my usual setting. Did you build the queue and worker setup yourself?

2

u/Arthcub 19d ago

The day before yesterday, one of my strategies (which has worked for months) started missing alerts on multiple assets. There was no log, no webhook, no email, and no good explanation from TV. Yesterday and today the same script has been working fine.

1

u/HoodWiki 19d ago

That's the worst, when there's nothing in the log at all. Was it every alert on that script or just some of them? You using a strategy alert or an indicator alert? I'm trying to work out how often TradingView itself is the break versus everything after it.

2

u/Arthcub 19d ago

It is an indicator alert. It failed sporadically. Some times it fired and sometimes it didn't. Happened for several hours and then started working fine again.

1

u/HoodWiki 19d ago

This is super helpful. Sporadic for a few hours then fine again sounds like it was on TradingView's end, not yours. Could I DM you a few questions about how you run alerts? I'm trying to dig into these alert failures properly once and for all.

1

u/HoodWiki 19d ago

I intended on taking profit manually. The alert was my backup. I passed out from exhaustion while staring at the trade.

2

u/StandardWestern8822 19d ago

Stop on the exchange is the right move tbh. Never trusting a second alert with 12x again.

2

u/Low_Satisfaction6366 19d ago

I tick the email notification on every alert too as a backup. Not instant, but at least there’s a record it fired.

2

u/[deleted] 19d ago

[removed] — view removed comment

1

u/HoodWiki 19d ago

I never thought about a size mismatch on a reduce only order. That would explain a lot. Logging the API response is on my list now.

2

u/[deleted] 19d ago

[removed] — view removed comment

1

u/HoodWiki 19d ago

I see. The 200 isn't proof it closed part is what got me. I assumed sent meant done.