/pandas-ta
Technical analysis with 130+ indicators using pandas-ta for crypto market data
$ npx -y skills add agiprolabs/claude-trading-skills --skill pandas-ta --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/pandas-ta
Context preview
The summary Claude sees to decide when to auto-load this skill.
Technical analysis with 130+ indicators using pandas-ta for crypto market data
SKILL.md
pandas-ta.SKILL.mdname: pandas-ta
description: Technical analysis with 130+ indicators using pandas-ta for crypto market data
pandas-ta — Technical Analysis for Crypto Markets
pandas-ta is a Python library that extends pandas DataFrames with 130+ technical analysis indicators accessible via `df.ta`. It covers trend, momentum, volatility, volume, and overlap indicator categories — all callable with a single method on any OHLCV DataFrame.
Installation
uv pip install pandas-ta pandas httpx
Quick Start
import pandas as pd
import pandas_ta as ta
# Assume df is a DataFrame with columns: open, high, low, close, volume
# All lowercase column names required
# Single indicator
df["rsi"] = df.ta.rsi(length=14)
df["atr"] = df.ta.atr(length=14)
# Multiple indicators via strategy
df.ta.strategy(ta.Strategy(
name="Quick Check",
ta=[
{"kind": "rsi", "length": 14},
{"kind": "macd", "fast": 12, "slow": 26, "signal": 9},
{"kind": "bbands", "length": 20, "std": 2.0},
]
))OHLCV DataFrame Format
pandas-ta expects a DataFrame with lowercase column names:
import pandas as pd
df = pd.DataFrame({
"open": [...],
"high": [...],
"low": [...],
"close": [...],
"volume": [...]
}, index=pd.DatetimeIndex([...]))**Important**: Set the index to a `DatetimeIndex` for time-aware indicators like VWAP. Column names must be lowercase (`close`, not `Close`).
Handling Missing Data
# Drop rows with NaN in OHLCV columns
df = df.dropna(subset=["open", "high", "low", "close", "volume"])
# Forward-fill small gaps (1-2 bars max)
df = df.ffill(limit=2)
# Verify no zero-volume bars for volume indicators
df = df[df["volume"] > 0]
Core Indicator Categories
Trend Indicators
Identify market direction and trend strength.
| Indicator | Call | Key Signal | |-----------|------|------------| | SMA | `df.ta.sma(length=20)` | Price above = bullish | | EMA | `df.ta.ema(length=20)` | Faster than SMA, less lag | | SuperTrend | `df.ta.supertrend(length=10, multiplier=3)` | Direction column: 1=bull, -1=bear | | Ichimoku | `df.ta.ichimoku()` | Returns tuple of (span, lines) DataFrames | | VWMA | `df.ta.vwma(length=20)` | Volume-weighted price trend | | HMA | `df.ta.hma(length=20)` | Minimal lag, smooth trend | | ADX | `df.ta.adx(length=14)` | >25 = trending, <20 = ranging |
Momentum Indicators
Measure speed and magnitude of price changes.
| Indicator | Call | Key Signal | |-----------|------|------------| | RSI | `df.ta.rsi(length=14)` | >70 overbought, <30 oversold | | MACD | `df.ta.macd(fast=12, slow=26, signal=9)` | Histogram crossover = entry | | Stochastic | `df.ta.stoch(k=14, d=3, smooth_k=3)` | >80 overbought, <20 oversold | | CCI | `df.ta.cci(length=20)` | >100 overbought, <-100 oversold | | Williams %R | `df.ta.willr(length=14)` | >-20 overbought, <-80 oversold | | ROC | `df.ta.roc(length=10)` | Positive = upward momentum | | MFI | `df.ta.mfi(length=14)` | Money flow version of RSI |
Volatility Indicators
Measure price dispersion and expected range.
| Indicator | Call | Key Signal | |-----------|------|------------| | Bollinger Bands | `df.ta.bbands(length=20, std=2)` | Squeeze = breakout pending | | ATR | `df.ta.atr(length=14)` | Position sizing, stop placement | | Keltner Channels | `df.ta.kc(length=20, scalar=1.5)` | BB inside KC = squeeze | | Donchian Channels | `df.ta.donchian(lower_length=20, upper_length=20)` | Breakout detection |
Volume Indicators
Confirm price moves with volume analysis.
| Indicator | Call | Key Signal | |-----------|------|------------| | OBV | `df.ta.obv()` | Divergence from price = reversal | | VWAP | `df.ta.vwap()` | Intraday fair value (needs DatetimeIndex) | | CMF | `df.ta.cmf(length=20)` | >0 accumulation, <0 distribution | | AD | `df.ta.ad()` | Accumulation/Distribution line |
Strategy Class
Run multiple indicators in a single call using `ta.Strategy`:
import pandas_ta as ta
# Built-in "All" strategy runs every indicator
df.ta.strategy(ta.AllStrategy)
# Custom strategy
my_strategy = ta.Strategy(
name="Crypto Scalp",
description="Fast indicators for crypto scalping",
ta=[
{"kind": "ema", "length": 9},
{"kind": "ema", "length": 21},
{"kind": "rsi", "length": 7},
{"kind": "stoch", "k": 5, "d": 3, "smooth_k": 3},
{"kind": "atr", "length": 7},
{"kind": "bbands", "length": 10, "std": 2.0},
{"kind": "obv"},
]
)
df.ta.strategy(my_strategy)Named Strategy Patterns
# Trend following
trend_strategy = ta.Strategy(
name="Trend",
ta=[
{"kind": "ema", "length": 20},
{"kind": "ema", "length": 50},
{"kind": "adx", "length": 14},
{"kind": "supertrend", "length": 10, "multiplier": 3},
{"kind": "atr", "length": 14},
]
)
# Mean reversion
reversion_strategy = ta.Strategy(
name="Mean Reversion",
ta=[
{"kind": "rsi", "length": 14},
{"kind": "bbands", "length": 20, "std": 2.0},
{"kind": "stoch", "k": 14, "d": 3, "smooth_k": 3},
{"kind": "cci", "length": 20},
]
)
# Momentum
momentum_strategy = ta.Strategy(
name="Momentum",
ta=[
{"kind": "macd", "fast": 12, "slow": 26, "signal": 9},
{"kind": "rsi", "length": 14},
{"kind": "obv"},
{"kind": "roc", "length": 10},
{"kind": "mfi", "length": 14},
]
)Crypto-Specific Considerations
24/7 Markets
- No session gaps — indicators that rely on open/close of sessions behave differently
- VWAP resets at midnight UTC by default; consider anchored VWAP for custom periods
- Weekend data is continuous — no Monday gap effects
High Volatility Adjustments
- **Bollinger Bands**: Use 2.5-3x standard deviation instead of the default 2x
- **RSI periods**: Shorter periods (7-10) capture faster crypto cycles
- **ATR**: Use for dynamic stop-losses; crypto ATR is typically 2-5x eq
Read more
name: pandas-ta description: Technical analysis with 130+ indicators using pandas-ta for crypto market data
pandas-ta — Technical Analysis for Crypto Markets
pandas-ta is a Python library that extends pandas DataFrames with 130+ technical analysis indicators accessible via `df.ta`. It covers trend, momentum, volatility, volume, and overlap indicator categories — all callable with a single method on any OHLCV DataFrame.
Installation
uv pip install pandas-ta pandas httpx
Quick Start
import pandas as pd
import pandas_ta as ta
# Assume df is a DataFrame with columns: open, high, low, close, volume
# All lowercase column names required
# Single indicator
df["rsi"] = df.ta.rsi(length=14)
df["atr"] = df.ta.atr(length=14)
# Multiple indicators via strategy
df.ta.strategy(ta.Strategy(
name="Quick Check",
ta=[
{"kind": "rsi", "length": 14},
{"kind": "macd", "fast": 12, "slow": 26, "signal": 9},
{"kind": "bbands", "length": 20, "std": 2.0},
]
))OHLCV DataFrame Format
pandas-ta expects a DataFrame with lowercase column names:
import pandas as pd
df = pd.DataFrame({
"open": [...],
"high": [...],
"low": [...],
"close": [...],
"volume": [...]
}, index=pd.DatetimeIndex([...]))**Important**: Set the index to a `DatetimeIndex` for time-aware indicators like VWAP. Column names must be lowercase (`close`, not `Close`).
Handling Missing Data
# Drop rows with NaN in OHLCV columns df = df.dropna(subset=["open", "high", "low", "close", "volume"]) # Forward-fill small gaps (1-2 bars max) df = df.ffill(limit=2) # Verify no zero-volume bars for volume indicators df = df[df["volume"] > 0]
Core Indicator Categories
Trend Indicators
Identify market direction and trend strength.
| Indicator | Call | Key Signal | |-----------|------|------------| | SMA | `df.ta.sma(length=20)` | Price above = bullish | | EMA | `df.ta.ema(length=20)` | Faster than SMA, less lag | | SuperTrend | `df.ta.supertrend(length=10, multiplier=3)` | Direction column: 1=bull, -1=bear | | Ichimoku | `df.ta.ichimoku()` | Returns tuple of (span, lines) DataFrames | | VWMA | `df.ta.vwma(length=20)` | Volume-weighted price trend | | HMA | `df.ta.hma(length=20)` | Minimal lag, smooth trend | | ADX | `df.ta.adx(length=14)` | >25 = trending, <20 = ranging |
Momentum Indicators
Measure speed and magnitude of price changes.
| Indicator | Call | Key Signal | |-----------|------|------------| | RSI | `df.ta.rsi(length=14)` | >70 overbought, <30 oversold | | MACD | `df.ta.macd(fast=12, slow=26, signal=9)` | Histogram crossover = entry | | Stochastic | `df.ta.stoch(k=14, d=3, smooth_k=3)` | >80 overbought, <20 oversold | | CCI | `df.ta.cci(length=20)` | >100 overbought, <-100 oversold | | Williams %R | `df.ta.willr(length=14)` | >-20 overbought, <-80 oversold | | ROC | `df.ta.roc(length=10)` | Positive = upward momentum | | MFI | `df.ta.mfi(length=14)` | Money flow version of RSI |
Volatility Indicators
Measure price dispersion and expected range.
| Indicator | Call | Key Signal | |-----------|------|------------| | Bollinger Bands | `df.ta.bbands(length=20, std=2)` | Squeeze = breakout pending | | ATR | `df.ta.atr(length=14)` | Position sizing, stop placement | | Keltner Channels | `df.ta.kc(length=20, scalar=1.5)` | BB inside KC = squeeze | | Donchian Channels | `df.ta.donchian(lower_length=20, upper_length=20)` | Breakout detection |
Volume Indicators
Confirm price moves with volume analysis.
| Indicator | Call | Key Signal | |-----------|------|------------| | OBV | `df.ta.obv()` | Divergence from price = reversal | | VWAP | `df.ta.vwap()` | Intraday fair value (needs DatetimeIndex) | | CMF | `df.ta.cmf(length=20)` | >0 accumulation, <0 distribution | | AD | `df.ta.ad()` | Accumulation/Distribution line |
Strategy Class
Run multiple indicators in a single call using `ta.Strategy`:
import pandas_ta as ta
# Built-in "All" strategy runs every indicator
df.ta.strategy(ta.AllStrategy)
# Custom strategy
my_strategy = ta.Strategy(
name="Crypto Scalp",
description="Fast indicators for crypto scalping",
ta=[
{"kind": "ema", "length": 9},
{"kind": "ema", "length": 21},
{"kind": "rsi", "length": 7},
{"kind": "stoch", "k": 5, "d": 3, "smooth_k": 3},
{"kind": "atr", "length": 7},
{"kind": "bbands", "length": 10, "std": 2.0},
{"kind": "obv"},
]
)
df.ta.strategy(my_strategy)Named Strategy Patterns
# Trend following
trend_strategy = ta.Strategy(
name="Trend",
ta=[
{"kind": "ema", "length": 20},
{"kind": "ema", "length": 50},
{"kind": "adx", "length": 14},
{"kind": "supertrend", "length": 10, "multiplier": 3},
{"kind": "atr", "length": 14},
]
)
# Mean reversion
reversion_strategy = ta.Strategy(
name="Mean Reversion",
ta=[
{"kind": "rsi", "length": 14},
{"kind": "bbands", "length": 20, "std": 2.0},
{"kind": "stoch", "k": 14, "d": 3, "smooth_k": 3},
{"kind": "cci", "length": 20},
]
)
# Momentum
momentum_strategy = ta.Strategy(
name="Momentum",
ta=[
{"kind": "macd", "fast": 12, "slow": 26, "signal": 9},
{"kind": "rsi", "length": 14},
{"kind": "obv"},
{"kind": "roc", "length": 10},
{"kind": "mfi", "length": 14},
]
)Crypto-Specific Considerations
24/7 Markets
- No session gaps — indicators that rely on open/close of sessions behave differently
- VWAP resets at midnight UTC by default; consider anchored VWAP for custom periods
- Weekend data is continuous — no Monday gap effects
High Volatility Adjustments
- **Bollinger Bands**: Use 2.5-3x standard deviation instead of the default 2x
- **RSI periods**: Shorter periods (7-10) capture faster crypto cycles
- **ATR**: Use for dynamic stop-losses; crypto ATR is typically 2-5x eq
A comprehensive collection of 67 ready-to-use trading, DeFi, and quantitative finance Agent Skills. Works with Claude Code, Cursor, Codex, Gemini CLI, and 30+ other tools.
Repo: agiprolabs/claude-trading-skills
Other skills on trading-skills.
- /backtrader
Event-driven backtesting with bar-by-bar execution, complex order types, multiple analyzers, and custom indicators
Open skill - /birdeye-api
Solana token market data via Birdeye — prices, OHLCV, trades, token metadata, security checks, and trader activity
Open skill - /coingecko-api
Broad crypto market data from CoinGecko covering 13,000+ tokens. Global market stats, historical price data going back years, exchange volumes, trending tokens, and category filters. Best for macro analysis and long-term historical data.
Open skill - /cointegration-analysis
Cointegration testing for pairs trading using Engle-Granger, Johansen, and rolling stability analysis
Open skill - /copy-trading
Wallet evaluation, monitoring, and copy-trade strategy design for Solana DEX trading
Open skill - /correlation-analysis
Cross-asset correlation analysis including rolling correlation, hierarchical clustering, tail dependence, and regime-dependent correlation
Open skill

