TradingView.
The world's most popular charting platform. Powerful Pine Script for strategy logic, alerts that POST JSON to webhooks — and zero native order execution. You build the bridge.
The honest pitch.
TradingView's strength is research speed: write a strategy in Pine, see the equity curve, and ship an alert that fires on the close of every signal bar. Its weakness is operational. Pine cannot place orders. Every live system needs a webhook receiver — a small server that catches TradingView's POST, validates the secret, and forwards to a real broker (Alpaca, Tradier, Tradovate, a CCXT exchange). Treat the bridge as production infrastructure: TLS, secret rotation, idempotency keys, and a heartbeat. Most retail TradingView blowups happen at this layer, not in the Pine script itself.
Auth, orders, limits.
| Auth | Webhook secret (you choose); HMAC if your bridge supports it. |
|---|---|
| Order API | None — outbound HTTPS POST to your webhook URL on alert. |
| Alert frequency | Once per bar / once per bar close / once per minute / always (use bar-close for systematic strategies). |
| Rate limits | Alerts: ~1/s per chart; per-plan ceiling on total alerts (Essential 20 → Premium 400+). |
| Sandbox | Pine 'strategy.*' simulator with embedded equity, drawdown, Sharpe — no execution. |
| Geo / regulation | Worldwide; doesn't touch your money — broker bridge does. |
Hello-world, but real.
A 5-line strategy that emits a structured JSON payload on signal bars. The payload includes a client-side idempotency key (bar timestamp) so the receiver can de-dup. Never let TradingView control retries — bar timestamps do.
| 1 | //@version=5 |
| 2 | strategy("RSI Mean Reversion", overlay=true, initial_capital=10000) |
| 3 | |
| 4 | rsi = ta.rsi(close, 14) |
| 5 | long = ta.crossover(rsi, 30) |
| 6 | short = ta.crossunder(rsi, 70) |
| 7 | |
| 8 | if long |
| 9 | strategy.entry("L", strategy.long) |
| 10 | if short |
| 11 | strategy.entry("S", strategy.short) |
| 12 | |
| 13 | // Alert payload — JSON your bridge will parse. |
| 14 | // 'k' is an idempotency key the bridge can use to de-dup retries. |
| 15 | alertcondition(long or short, |
| 16 | title="RSI Cross", |
| 17 | message='{"k":"{{time}}","symbol":"{{ticker}}","side":"{{strategy.order.action}}","qty":{{strategy.position_size}}}') |
The traps everyone hits.
Real production failure modes. Sev1 = capital loss risk. Sev2 = data integrity / silent wrongness. Sev3 = developer ergonomics that bite later.
Duplicate alerts on the same bar
Sev1What happens. TradingView alerts can fire multiple times within a bar if the condition oscillates. Three identical POSTs = triple position.
Fix. Use 'Once per bar close' as the alert frequency on systematic strategies. On the receiver, key on bar-timestamp and reject duplicates within a 60s window.
Webhook secret in the URL
Sev1What happens. TradingView only POSTs to URLs, no header support. If you put the secret in the URL path and your access log is shared, the secret leaks.
Fix. Put a long random token in the URL AND verify a separate HMAC inside the payload before processing. Rotate quarterly.
Pine repaint
Sev2What happens. Many Pine indicators look great in hindsight because they reference 'future' bars on the chart but not in real time. Your live signals fire later than backtest signals.
Fix. Use bar-close semantics: 'barstate.isconfirmed' and only act on close. Re-run the backtest with 'process_orders_on_close=true' and 'calc_on_every_tick=false'.
Alert plan exhaustion
Sev3What happens. Essential plan caps you at a small number of total alerts. A multi-symbol scanner can silently drop signals once the cap is hit.
Fix. Budget alerts per strategy, monitor count via the TradingView account UI weekly, and consolidate scanners into one alert with a payload that includes the symbol.
What to pair it with.
No platform stands alone. These are the layers that — paired with TradingView — produce production-grade automation.
| Layer | Recommended | Why |
|---|---|---|
| Execution | Alpaca (US equities), Tradier (options), Tradovate (futures), CCXT venue (crypto) | Wherever your money lives. TradingView only signals; the broker executes. |
| Bridge | FastAPI or Cloudflare Workers + KV | Stateless HTTPS endpoint, idempotency-keyed via KV/Redis, deployable in minutes. |
| Observability | Sentry + a heartbeat ping to BetterStack / UptimeRobot | Catch silent webhook receiver failures within 60s, not 4 hours. |
| Secrets | 1Password / Doppler / Vercel env vars | Webhook secrets, broker API keys, and HMAC pepper never live in repo. |