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

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

Computes the Exponential Moving Average using the standard multiplier `k = 2 / (period + 1)`. Initializes with the first data point as the seed value, then applies the recursive formula `EMA = price × k + prev_EMA × (1 − k)` for each subsequent bar. Returns the full EMA series as a list.

The EMA gives more weight to recent prices than a simple moving average, making it more responsive to short-term price changes. This function is the foundation for `calculate_macd`, `identify_trend_direction`, and the golden/death cross scanners — all of which call `calc_ema` internally with different period parameters.

[ USAGE EXAMPLE ]
example.py
ema20 = calc_ema(close, period=20)
ema50 = calc_ema(close, period=50)
cross = "golden" if ema20[-1] > ema50[-1] else "death"
[ FULL CODE ]
calculate_ema.py
def calc_ema(data, period): k = 2 / (period + 1) ema = [data[0]] for price in data[1:]: ema.append(price*k + ema[-1]*(1-k)) return ema
[ METADATA ]
CategoryIndicators
ComplexityBeginner
LanguagePython 3.10+
TagsEMA, Indicator
[ ASK CLAUDE ]

Ask AI about this skill before installing it.

[ RELATED SKILLS ]