Alerts fire on this page's ticks while it is open. For phone or Telegram alerts, run the alert check on a server (see Make it live).
What you are looking at
Every candle here is a real daily bar pulled from TradingView (delayed / end-of-day). On top of that, the page generates simulated ticks sized to each symbol's ATR, so you can see the screener, alerts and signals react. The indicators, support/resistance and the plan are calculated in the page from the bars, the same way a live system would do it.
The four pieces of a live system
Data sources by market
- Crypto — Binance public WebSocket (
btcusdt@kline_1m), free, no key. - Gold & FX — OANDA v20 streaming API or your MT5 broker via a small Python bridge (
MetaTrader5package). - US stocks — Polygon, Finnhub or Alpaca WebSocket (free tiers are delayed; real-time needs a paid plan).
- Screener universe — pull daily bars once each morning, keep ticks in Redis, recompute rules on each bar close.
Minimal relay (Node)
// npm i ws
import WebSocket, { WebSocketServer } from "ws";
const clients = new WebSocketServer({ port: 8080 });
const src = new WebSocket(
"wss://stream.binance.com:9443/stream?streams=btcusdt@trade/ethusdt@trade");
src.on("message", raw => {
const { data } = JSON.parse(raw);
const tick = { sym: data.s, px: +data.p, t: data.T };
for (const c of clients.clients) c.send(JSON.stringify(tick));
});
Then replace simTick() in this page with a WebSocket listener that feeds the same applyTick(sym, px) function. Everything downstream (chart, screener, alerts, plan) already updates from it.
Hosting
The relay needs an always-on process: a small VPS, Railway or Fly.io. Static pages like this one can stay on GitHub Pages or Netlify, as you already do for your workflow app. Keep API keys on the relay, never in the page.