
Trading Strategist
- 902 installs
- 31 repo stars
- Updated May 4, 2026
- kukapay/crypto-skills
trading-strategist is an agent skill with a Python technical-analysis script that computes indicators and emits trading signals and rules for developers building autonomous crypto agents or backtesting systems.
About
trading-strategist is an agent skill backed by a Python technical-analysis calculation script for developers building crypto trading bots, signal services, or backtesting pipelines. The bundled script computes indicators such as SMA, EMA, and RSI from historical OHLC market data and returns structured signals an autonomous agent can execute or feed into a backtest harness. Invoke trading-strategist when you need deterministic TA rules rather than discretionary chart commentary. The skill translates price history into machine-readable trading logic suitable for agent orchestration. It does not replace exchange connectivity, order routing, or production risk controls.
- Calculates SMA, EMA, RSI, Bollinger Bands and MACD from price series
- Lightweight Python functions ready for MCP server or agent integration
- Supports JSON input/output for real-time market data pipelines
- Core technical-analysis building block for rule-based trading agents
Trading Strategist by the numbers
- 902 all-time installs (skills.sh)
- +11 installs in the week ending Aug 5, 2026 (Skillselion tracking)
- Ranked #170 of 1,106 Finance & Trading skills by installs in the Skillselion catalog
- Security screen: HIGH risk (skills.sh audit)
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/kukapay/crypto-skills --skill trading-strategistAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 902 |
|---|---|
| repo stars | ★ 31 |
| Security audit | 1 / 3 scanners passed |
| Last updated | May 4, 2026 |
| Repository | kukapay/crypto-skills ↗ |
How do you generate TA signals for trading bots?
Generate technical analysis signals and trading rules that an autonomous agent can execute or backtest.
Who is it for?
Developers implementing crypto trading agents or backtesting services who need programmatic SMA, EMA, and RSI signal generation from OHLC history.
Skip if: Teams seeking discretionary trade advice, portfolio accounting, or production exchange order-management without their own execution layer.
When should I use this skill?
A developer asks for technical analysis signals, trading rules, indicator calculations, or backtestable crypto strategy logic from market data.
What you get
JSON trading signals, indicator values, and executable rule definitions derived from historical market data.
- trading signals
- indicator values
- strategy rules
By the numbers
- Bundled Python script implements SMA, EMA, and RSI with RSI default period 14
Files
Trading Strategies Skill
This skill generates data-driven trading strategies for cryptocurrencies by integrating multiple data sources and analytical tools.
Core Components
1. Binance Market Data: Real-time price, volume, and historical klines from Binance API 2. Technical Analysis (TA): Calculated indicators including SMA, RSI, MACD, Bollinger Bands, Stochastic, and more 3. Market Sentiment: Aggregated sentiment scores from popular crypto RSS feeds
Workflow
Step 1: Data Collection
- Fetch current ticker data from Binance API (
/api/v3/ticker/priceand/api/v3/ticker/24hr) - Retrieve historical klines (
/api/v3/klineswith 30-100 days of data) - Aggregate sentiment using the market-sentiment skill
Step 2: TA Calculation
Use the scripts/calculate_ta.py script to compute indicators from historical data.
Step 3: Strategy Generation
Combine TA signals, price action, and sentiment score to recommend:
- Buy/Sell/Hold signals
- Entry/exit points
- Risk management (stop-loss, position sizing)
- Timeframes (swing, day trading)
Usage Examples
Basic Strategy Request
For ETH, generate a trading strategy based on current market data.→ Fetch ETH data, calculate TA, get sentiment, output strategy.
Advanced Analysis
Analyze BTC with 50-day history, include sentiment, recommend swing trade.→ Use longer history, focus on swing signals.
Risk Management
- Always include stop-loss recommendations
- Suggest position sizes (1-5% of capital)
- Warn about volatility and leverage risks
- Note: Not financial advice
References
- TA formulas: See references/ta_formulas.md
- Sentiment interpretation: See references/sentiment_guide.md
Scripts
scripts/calculate_ta.py: Python script for TA indicator calculationsscripts/fetch_binance.py: Helper for Binance API calls</content>
<parameter name="filePath">./skills/trading-strategies/SKILL.md
#!/usr/bin/env python3
"""
Trading Strategies Skill - TA Calculation Script
Calculates technical analysis indicators from historical market data.
"""
import sys
import json
import statistics
def calculate_sma(data, period):
"""Simple Moving Average"""
if len(data) < period:
return None
return sum(data[-period:]) / period
def calculate_ema(data, period):
"""Exponential Moving Average"""
if len(data) < period:
return None
multiplier = 2 / (period + 1)
ema = data[0]
for price in data[1:]:
ema = (price * multiplier) + (ema * (1 - multiplier))
return ema
def calculate_rsi(closes, period=14):
"""Relative Strength Index"""
if len(closes) < period + 1:
return None
deltas = [closes[i] - closes[i-1] for i in range(1, len(closes))]
gains = [d if d > 0 else 0 for d in deltas]
losses = [-d if d < 0 else 0 for d in deltas]
avg_gain = sum(gains[-period:]) / period
avg_loss = sum(losses[-period:]) / period
if avg_loss == 0:
return 100
rs = avg_gain / avg_loss
return 100 - (100 / (1 + rs))
def calculate_bollinger_bands(closes, period=20, std_dev=2):
"""Bollinger Bands"""
if len(closes) < period:
return None, None, None
sma = calculate_sma(closes, period)
std = statistics.stdev(closes[-period:])
upper = sma + (std_dev * std)
lower = sma - (std_dev * std)
return upper, sma, lower
def calculate_macd(closes):
"""MACD (12, 26, 9) - returns MACD line, signal line approx"""
if len(closes) < 26:
return None, None
ema12 = calculate_ema(closes, 12)
ema26 = calculate_ema(closes, 26)
macd_line = ema12 - ema26
# Simple signal approximation (should be EMA9 of MACD, but simplified)
signal_line = macd_line # Placeholder
return macd_line, signal_line
def calculate_stochastic(highs, lows, closes, period=14):
"""Stochastic %K"""
if len(highs) < period or len(lows) < period or len(closes) < period:
return None
high_period = max(highs[-period:])
low_period = min(lows[-period:])
if high_period == low_period:
return 50 # Neutral
k = 100 * (closes[-1] - low_period) / (high_period - low_period)
return k
def calculate_indicators(klines_data):
"""
Input: list of klines [ [timestamp, open, high, low, close, volume, ...], ... ]
Output: dict of indicators
"""
closes = [float(k[4]) for k in klines_data]
highs = [float(k[2]) for k in klines_data]
lows = [float(k[3]) for k in klines_data]
volumes = [float(k[5]) for k in klines_data]
indicators = {}
# Price metrics
indicators['current_price'] = closes[-1]
indicators['price_change_24h'] = None # Would need 24h data
indicators['volume_24h'] = sum(volumes[-1:]) # Last candle volume
# Moving Averages
indicators['sma_20'] = calculate_sma(closes, 20)
indicators['sma_10'] = calculate_sma(closes, 10)
indicators['ema_12'] = calculate_ema(closes, 12)
indicators['ema_26'] = calculate_ema(closes, 26)
# Momentum
indicators['rsi_14'] = calculate_rsi(closes, 14)
# Bollinger Bands
bb_upper, bb_middle, bb_lower = calculate_bollinger_bands(closes, 20, 2)
indicators['bb_upper'] = bb_upper
indicators['bb_middle'] = bb_middle
indicators['bb_lower'] = bb_lower
# MACD
macd_line, signal_line = calculate_macd(closes)
indicators['macd_line'] = macd_line
indicators['macd_signal'] = signal_line
indicators['macd_histogram'] = macd_line - signal_line if macd_line and signal_line else None
# Stochastic
indicators['stochastic_k'] = calculate_stochastic(highs, lows, closes, 14)
return indicators
if __name__ == "__main__":
# Example usage: read from stdin as JSON
data = json.load(sys.stdin)
result = calculate_indicators(data)
print(json.dumps(result, indent=2))</content>
<parameter name="filePath">./skills/trading-strategies/scripts/calculate_ta.pyRelated skills
How it compares
Use trading-strategist for indicator math and rule generation; add exchange-integration skills when you need live order placement and fill handling.
FAQ
Which indicators does trading-strategist calculate?
trading-strategist includes a Python TA script that computes Simple Moving Average, Exponential Moving Average, and Relative Strength Index from historical price data, with RSI using a default 14-period window.
Can trading-strategist output rules for autonomous agents?
trading-strategist generates technical analysis signals and trading rules formatted for autonomous agents to execute live or feed into backtesting workflows from structured historical market input.
Is Trading Strategist safe to install?
skills.sh reports 1 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.