★ ★ ★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

calculate_bollinger_bands

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

Computes upper band, middle band (SMA), and lower band for the most recent bar using a rolling window of configurable period (default 20) and standard deviation multiplier (default 2). Uses Python's built-in `statistics.stdev` to avoid external dependencies, returning a three-tuple `(upper, middle, lower)` rounded to 4 decimal places.

Bollinger Bands are a volatility measure as much as a momentum indicator — band width expands during high-volatility periods and contracts during low-volatility consolidations. A squeeze (narrow bands) often precedes a significant directional move. Combining band width tracking with `find_breakout_levels` can identify squeeze-and-breakout setups programmatically.

[ USAGE EXAMPLE ]
example.py
upper, mid, lower = bollinger_bands(close, period=20, mult=2)
if close[-1] < lower:
    print("Price below lower band — oversold zone")
[ FULL CODE ]
calculate_bollinger_bands.py
def bollinger_bands(close, period=20, mult=2): import statistics as s sma = [sum(close[i:i+period])/period for i in range(len(close)-period+1)] std = [s.stdev(close[i:i+period]) for i in range(len(close)-period+1)] return sma[-1]+mult*std[-1], sma[-1], sma[-1]-mult*std[-1]
[ METADATA ]
CategoryIndicators
ComplexityBeginner
LanguagePython 3.10+
TagsBB, Indicator
[ ASK CLAUDE ]

Ask AI about this skill before installing it.

[ RELATED SKILLS ]