OPEN-SOURCE SCRIPT

Aggregated Long Short Ratio (Binance + Bybit)

109
This indicator displays the Long/Short Ratio (LSR) from Binance and Bybit exchanges, plus an aggregated average. LSR shows the ratio between traders holding long positions vs short positions.

Settings AvailableExchanges Group:

☑️Show Binance - Display Binance LSR line
☑️ Show Bybit - Display Bybit LSR line
☑️ Show Aggregated LSR - Display combined average
Timeframe - Choose data timeframe (leave empty for chart timeframe)
Visualization Group:

🎨 Binance Color - Default: Yellow
🎨 Bybit Color - Default: Orange
🎨 Aggregated Color - Default: White

📖 How to Read the Indicator
⚠️ CRITICAL: Always analyze LSR together with Open Interest (OI)
Key Levels:

LSR = 1.0 (gray dashed line) = Balance - Equal longs and shorts
LSR > 1.0 = More longs than shorts (bullish sentiment)
LSR < 1.0 = More shorts than longs (bearish sentiment)

Extreme Zones:

LSR > 1.5 (green zone) = Very bullish - Possible market top
LSR < 0.5 (red zone) = Very bearish - Possible market bottom

Why Open Interest Matters:
LSR alone doesn't tell the full story. You MUST check Open Interest:

Rising OI + High LSR (>1.5) = New longs opening → Strong momentum OR potential trap
Rising OI + Low LSR (<0.5) = New shorts opening → Strong momentum OR potential trap
Falling OI + Extreme LSR = Positions closing → Weak signal, avoid trading
Stable OI + Extreme LSR = No new positions → Less reliable signal


💡 Trading Interpretation
⚠️ ALWAYS combine LSR with Open Interest analysis!
Contrarian Strategy (High Leverage Zones):

High LSR (>1.5) + Rising OI → Many new longs → Potential short squeeze OR reversal down
Low LSR (<0.5) + Rising OI → Many new shorts → Potential long squeeze OR reversal up

Trend Confirmation:

Rising LSR + Rising price + Rising OI = Strong bullish trend with new positions
Falling LSR + Falling price + Rising OI = Strong bearish trend with new positions

Weak Signals (Avoid):

Extreme LSR + Falling OI = Positions closing → Low conviction
Extreme LSR + Stable OI = No new money → Wait for confirmation

Divergences:

Price higher highs but LSR falling + Rising OI = Bearish divergence (shorts accumulating)
Price lower lows but LSR rising + Rising OI = Bullish divergence (longs accumulating)

Best Setups:

Reversal: Extreme LSR (>1.5 or <0.5) + Rising OI + Price rejection
Trend: LSR trending with price + Steadily rising OI
Caution: Extreme LSR + Falling OI = Ignore signal


Built-in Alerts
The indicator includes 4 preset alerts:

LSR Crossed Above 1.0 - Market turned bullish
LSR Crossed Below 1.0 - Market turned bearish
LSR Very High - Above 1.5 (possible top)
LSR Very Low - Below 0.5 (possible bottom)

To Set Up Alerts:

Click the "..." on the indicator
Select "Add Alert"
Choose the condition you want
Configure notification method


Best Practices

MANDATORY: Always add Open Interest indicator to your chart alongside LSR
To add OI: Click Indicators → Search "Open Interest" → Add official TradingView OI
Use on perpetual futures charts (symbols ending in .P)
Works best on USDT pairs (BTCUSDT, ETHUSDT, etc.)
Combine LSR + OI + price action + support/resistance levels
Higher timeframes (4h, 1D) give more reliable signals
Don't trade LSR extremes without confirming OI direction
Golden Rule: Rising OI = Strong signal | Falling OI = Weak signal


⚠️ Important Notes

Indicator requires TradingView Premium or above (uses Request library)
Only works on crypto perpetual futures
Data availability depends on exchange API
NA values mean data is not available for that exchange/symbol
Never use LSR without Open Interest context

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。