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

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

Computes the Average True Range by first calculating the True Range for each bar (the maximum of: high−low, |high−prev_close|, |low−prev_close|), then averaging the last `period` values. ATR measures volatility in absolute price terms rather than percentages, making it suitable for position sizing and stop loss placement.

For stop loss calculation, a common rule of thumb is to place stops at 1.5× to 2× ATR below the entry price for long trades. This approach automatically widens stops during high-volatility conditions and tightens them during calm markets, rather than using a fixed percentage that may be too tight or too wide depending on current market conditions.

[ USAGE EXAMPLE ]
example.py
atr = calc_atr(high, low, close, period=14)
stop_loss = entry_price - (1.5 * atr)
print(f"Stop loss: {stop_loss:.2f}")
[ FULL CODE ]
calculate_atr.py
def calc_atr(high, low, close, period=14): tr_list = [max(high[i]-low[i], abs(high[i]-close[i-1]), abs(low[i]-close[i-1])) for i in range(1,len(close))] return sum(tr_list[-period:])/period
[ METADATA ]
CategoryIndicators
ComplexityBeginner
LanguagePython 3.10+
TagsATR, Volatility
[ ASK CLAUDE ]

Ask AI about this skill before installing it.

[ RELATED SKILLS ]