★ ★ ★LIVE97 COINS ANALYZED BY CLAUDE MCP·VIEW SKILLS →★ ★ ★
MCP
claude.analyze("BTCUSDT")→ [buy] signal detectedmcp.draw_levels(resistance=98000)→ [drawn] on chartclaude.scan_watchlist(coins=100)→ [42] buy signals foundmcp.connect("tradingview")→ [connected] daily TFclaude.detect_sr("SOLUSDT")→ [S: $165] [R: $185]claude.analyze("ETHUSDT")→ [neutral] consolidatingmcp.screenshot_chart("BNBUSDT")→ [captured] analyzing...claude.score_quality("XRPUSDT")→ score: 78/100mcp.set_timeframe("1D")→ [ok] chart updatedclaude.analyze("BTCUSDT")→ [buy] signal detectedmcp.draw_levels(resistance=98000)→ [drawn] on chartclaude.scan_watchlist(coins=100)→ [42] buy signals foundmcp.connect("tradingview")→ [connected] daily TFclaude.detect_sr("SOLUSDT")→ [S: $165] [R: $185]claude.analyze("ETHUSDT")→ [neutral] consolidatingmcp.screenshot_chart("BNBUSDT")→ [captured] analyzing...claude.score_quality("XRPUSDT")→ score: 78/100mcp.set_timeframe("1D")→ [ok] chart updated
BACK TO CLAUDE SKILLS

detect_divergence

Chart AnalysisDivergenceRSI
INSTALLATION
$python -c "exec(open('detect_divergence.py').read())"
#or paste directly into your Claude Code terminal
[ ABOUT ]

Identifies bearish divergence when price makes a higher high while RSI makes a lower high — a condition that often precedes trend reversals. The function locates local peaks in both the close price array and the RSI array independently, then compares the most recent two peaks in each.

Divergence signals are most reliable when the peaks are separated by at least 5-10 bars and when RSI was above 60 at the first peak. For production use, chain this function after `calculate_rsi` and apply it only on the daily timeframe where divergence signals carry more weight than on lower timeframes.

[ USAGE EXAMPLE ]
example.py
rsi_series = [calc_rsi(close[:i]) for i in range(14, len(close))]
div = detect_divergence(close, rsi_series)
print(div)  # "bearish_divergence" | "no_divergence"
[ FULL CODE ]
detect_divergence.py
def detect_divergence(close, rsi): price_highs = local_peaks(close) rsi_highs = local_peaks(rsi) if (close[price_highs[-1]] > close[price_highs[-2]] and rsi[rsi_highs[-1]] < rsi[rsi_highs[-2]]): return "bearish_divergence" return "no_divergence"
[ METADATA ]
CategoryChart Analysis
ComplexityBeginner
LanguagePython 3.10+
TagsDivergence, RSI
[ ASK CLAUDE ]

Ask AI about this skill before installing it.

[ RELATED SKILLS ]