DEV Community

kk mors
kk mors

Posted on

Python Crypto Indicators — Production-Ready Technical Analysis Library

I got tired of crypto trading libraries that are either too bloated or too basic. So I built a focused set of Python indicators that I actually use in production.

What's Included

Trend Indicators

  • EMA/SMA crossovers — With signal generation
  • Ichimoku Cloud — Full implementation with all 5 lines
  • ADX — Trend strength measurement

Momentum Indicators

  • RSI — With divergence detection
  • MACD — With histogram and signal crossovers
  • Stochastic RSI — Combining both for better signals

Volatility Indicators

  • Bollinger Bands — With squeeze detection
  • ATR — For dynamic stop-loss placement
  • Keltner Channels — Combined with BB for Squeeze play

Volume Indicators

  • OBV — On-balance volume
  • VWAP — Volume-weighted average price
  • Volume Profile — Identify high-volume zones
from crypto_indicators import RSI, MACD, BollingerBands

# Quick analysis
df = load_candle_data("ETH/USDT", timeframe="4h")

df["rsi"] = RSI(df["close"], period=14)
df["macd"], df["signal"], df["hist"] = MACD(df["close"])
df["bb_upper"], df["bb_mid"], df["bb_lower"] = BollingerBands(df["close"])

# Find RSI divergence
divergences = RSI.detect_divergence(df["close"], df["rsi"])
print(f"Found {len(divergences)} divergences")
Enter fullscreen mode Exit fullscreen mode

Why This One?

  • Zero dependencies beyond numpy/pandas — No heavy frameworks
  • Vectorized calculations — Fast on large datasets
  • Signal generation built-in — Not just values, but actionable signals
  • Backtested — Every indicator tested against historical data
  • Type hints — Full type annotations for IDE support

Get the Python Crypto Indicators library.

What indicators do you rely on for crypto trading?

Top comments (0)