OPEN-SOURCE SCRIPT
Aggregated Long Short Ratio (Binance + Bybit)

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
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에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.