Hyperliquid-Ready Webhook Strategy Template by PopsPineDev
By PopsPineDev
Performance Metrics
- Author: PopsPineDev
- Symbol: HYPERLIQUID:BTCUSDC
- Timeframe: 4 hours
- Win Rate: 37.5%
- Profit Factor: 1.138
Description
Most webhook templates get you 80% of the way there — then your bot double-fills an order at 3am and you learn about the missing 20%. This template IS the missing 20%.What this isAn open-source strategy template whose real value is the alert payload: a production-grade JSON webhook message with the fields most templates skip. The included strategy (EMA 21/55 cross + RSI filter, ATR-based SL/TP) is a simple demo — swap in your own logic. It happens to test reasonably on BTC 4H, but the point of this script is the plumbing, not the entry logic. Bring your own edge.The payload — and why each field exists→ id — unique per event (ticker + timeframe + action + bar time). Your backend treats this as an idempotency key: TradingView sometimes retries the same alert when your server responds slowly. Dedupe by id (one Redis SET NX) and you'll never double-fill. The action is part of the id so an entry and its exit on the same bar can never collide — a bug I caught in live testing of this exact script.→ ts — fire-time timestamp via {{timenow}}. Reject alerts older than N seconds so a delayed or replayed webhook can't trade a stale price.→ secret — replace with a long random token and verify it server-side (or better, HMAC the body). Anyone who finds your webhook URL can POST to it. This field is your lock.→ reduce_only — true on exits, so a close can never accidentally flip you into a new position if state desyncs.Also included: leverage and qty fields for your backend (cap leverage server-side too — never trust the client alone), and an on-chart payload preview table so you can eyeball your exact JSON before wiring real money.Setup (2 minutes)Add to chart (crypto perps: BTC/ETH/SOL, 15m–4H)Create alert → condition: this strategy → "Order fills events" → message box: {{strategy.order.alert_message}}Point the alert's webhook URL at your execution backend or bridgeWorks with any TradingView→exchange webhook bridge. Important: alerts snapshot the script when created — if you edit the code, delete and re-create your alerts.Who I amI build custom TradingView→Hyperliquid execution pipelines (Pine Script v6, non-custodial agent wallets). If you want this wired to live execution or adapted to your strategy, links are in my signature.