OPEN-SOURCE SCRIPT
Zaktualizowano JJB OTT Alert Relay

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
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
Informacje o Wersji
add label signal 5-Jul-26Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.