OPEN-SOURCE SCRIPT
已更新

JJB OTT Alert Relay

402
JJB OTT Alert Relay
A bridge indicator that exposes Optimized Trend Tracker (OTT) Buy/Sell signals as alert conditions for automated webhook notifications.

🔍 What This Does
The Optimized Trend Tracker by TradingView generates clean Buy/Sell crossover signals but doesn't expose alertcondition() natively. This relay indicator mirrors the OTT's Support and OTT lines, detects crossovers, and surfaces them as alert conditions — so you can catch signals via webhook, email, or push without watching the chart.

🟢 Buy Signal: Support line crosses above OTT line
🔴 Sell Signal: Support line crosses below OTT line

⚙️ Setup (One-Time, 60 Seconds)

1. Add both indicators to your chart:

The original Optimized Trend Tracker (Community Script)
This JJB OTT Alert Relay
2. Wire the inputs:

Open JJB OTT Alert Relay → Settings → Inputs
Set "Support Line" → #1 Optimized Trend Tracker: Support Line
Set "OTT Line" → #1 Optimized Trend Tracker: OTT
3. Verify the match:

Both indicators should show identical Support and OTT values in the Data Window. If they match, the relay is wired correctly.

🔔 Creating the Alert

Open TradingView's Alert dialog
Condition → "Any alert() function call"
Select "JJB OTT Alert Relay" as the source
Paste your webhook URL
Use this JSON message template:
{"topic":"JJB BTC OTT","title":"BTC OTT {{strategy.order.action}}","message":"OTT Signal: {{strategy.order.action}} | Price: {{close}} | Interval: {{interval}}","tags":["{{strategy.order.action}}","bitcoin"],"passphrase":"YOUR_WEBHOOK_PASSPHRASE"}
Replace YOUR_WEBHOOK_PASSPHRASE with your actual webhook passphrase. The {{strategy.order.action}} placeholder resolves to "buy" or "sell" on each crossover.

Set expiration (default 30 days) and create.
💡 One alert covers both signals. No need for separate buy/sell alerts.

📊 Signal Logic

Condition Signal Meaning
Support ↑ crosses above OTT 🟢 BUY Trend turning bullish
Support ↓ crosses below OTT 🔴 SELL Trend turning bearish
This is a trend-following system — signals are infrequent (typically 2-4 per quarter on daily timeframe) but high-quality. Each signal confirms a structural shift, not noise.

📌 Tips
Daily timeframe is the sweet spot — lower timeframes generate more noise
The relay mirrors the original OTT exactly — it doesn't recalculate
If you change OTT's settings, the relay picks them up automatically via the wired inputs
The plot on your chart confirms the wiring: green line = Support, blue line = OTT

🔧 Requirements

Original Optimized Trend Tracker indicator on the same chart
Basic Pine Script v5+ (TradingView)

Author: JJB | Version: 1.0
版本注释
add label signal 5-Jul-26

免责声明

这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。