[ CLAUDE MCP SKILLS ]
BUILT FOR TRADING
INTELLIGENCE
> FILTER BY CATEGORY (↕↓)
58 ready-to-use skills for Claude Code + MCP integration with TradingView. Copy and run directly in your Claude Code terminal.
58 total skills
7 categories
Claude MCP powered
Python 3.10+
mcp_connect_tradingview
Establish MCP connection between Claude and TradingView Desktop
import anthropic_mcp as mcp
def connect_tradingview(timeout=30):
client = mcp.MCPClient(server="tradingview-mcp", timeout=timeout)
conn = client.connect()
assert conn.status == "connected"
return client
MCPTradingViewVIEW →
mcp_draw_sr_levels
Draw support and resistance lines directly on TradingView chart via MCP
def draw_sr_levels(client, support, resistance):
for lvl in support:
client.call("draw_line", {"price": lvl, "color": "#22C55E", "style": "solid"})
for lvl in resistance:
client.call("draw_line", {"price": lvl, "color": "#EF4444", "style": "dashed"})
MCPDrawingVIEW →
mcp_read_chart_data
Read OHLCV data from active TradingView chart via MCP
def read_chart_data(client, bars=365):
result = client.call("get_chart_data", {"bars": bars, "timeframe": "1D"})
return {"open": result["o"], "high": result["h"], "low": result["l"], "close": result["c"]}
MCPDataVIEW →
mcp_set_symbol
Switch TradingView chart to a specific symbol via MCP command
def set_symbol(client, symbol: str, timeframe="1D"):
client.call("set_symbol", {"symbol": symbol, "timeframe": timeframe})
client.wait_for("chart_loaded")
return f"Loaded {symbol} @ {timeframe}"
MCPNavigationVIEW →
mcp_add_indicator
Programmatically add a technical indicator to TradingView chart
def add_indicator(client, name, params=None):
client.call("add_study", {"name": name, "params": params or {}, "panel": "new" if name in ["RSI", "MACD"] else "same"})
return f"Added {name} to chart"
MCPIndicatorVIEW →
mcp_screenshot_chart
Capture a screenshot of current TradingView chart for visual analysis
import base64
def screenshot_chart(client):
raw = client.call("screenshot", {"format": "png"})
img_b64 = base64.b64encode(raw).decode()
return {"type": "image", "data": img_b64}
MCPVisionVIEW →
mcp_set_timeframe
Change active chart timeframe via MCP protocol
def set_timeframe(client, tf: str):
valid = ["1", "5", "15", "60", "240", "1D", "1W"]
if tf not in valid:
raise ValueError(f"Invalid TF: {tf}")
client.call("set_timeframe", {"timeframe": tf})
MCPChartVIEW →
mcp_export_to_db
Export Claude MCP analysis results to Supabase database
from supabase import create_client
def export_to_db(coin, analysis):
sb = create_client(SUPABASE_URL, SUPABASE_KEY)
sb.table("analysis").upsert({"coin": coin, "signal": analysis["signal"]}).execute()
MCPDatabaseVIEW →
mcp_alert_manager
Create and manage price alerts on TradingView via MCP
def create_alert(client, price, condition="crosses"):
client.call("create_alert", {"price": price, "condition": condition, "notify": ["popup", "email"]})
return f"Alert set at {price}"
MCPAlertsVIEW →
mcp_scan_watchlist
Iterate through entire TradingView watchlist and run Claude analysis on each coin
def scan_watchlist(client, claude):
watchlist = client.call("get_watchlist")
results = []
for sym in watchlist:
set_symbol(client, sym)
data = read_chart_data(client)
results.append(claude.analyze(data))
return results
MCPScannerVIEW →
detect_support_resistance
Detect key support and resistance levels from OHLCV price data
def detect_sr(highs, lows, n=5):
support, resist = [], []
for i in range(n, len(lows)-n):
if lows[i] == min(lows[i-n:i+n]): support.append(round(lows[i], 2))
if highs[i] == max(highs[i-n:i+n]): resist.append(round(highs[i], 2))
return {"support": support, "resistance": resist}
AnalysisS&RVIEW →
identify_trend_direction
Classify market trend as bullish, bearish, or sideways using EMA
def identify_trend(close, fast=20, slow=50):
ema_f = calc_ema(close, fast)
ema_s = calc_ema(close, slow)
diff = (ema_f[-1] - ema_s[-1]) / ema_s[-1] * 100
if diff > 1.5: return "Bullish"
elif diff < -1.5: return "Bearish"
else: return "Sideways"
AnalysisTrendVIEW →
find_chart_patterns
Detect classic chart patterns: double top, double bottom, head & shoulders
def find_patterns(highs, lows, close):
peaks = find_peaks(highs)
patterns = []
if len(peaks) >= 2:
p1, p2 = highs[peaks[-2]], highs[peaks[-1]]
if abs(p1-p2)/p1 < 0.03:
patterns.append("double_top")
return patterns
PatternAnalysisVIEW →
detect_divergence
Detect bullish and bearish RSI/MACD divergence from price action
def detect_divergence(close, rsi):
price_highs = local_peaks(close)
rsi_highs = local_peaks(rsi)
if (close[price_highs[-1]] > close[price_highs[-2]] and
rsi[rsi_highs[-1]] < rsi[rsi_highs[-2]]):
return "bearish_divergence"
return "no_divergence"
DivergenceRSIVIEW →
calculate_pivot_points
Calculate Classic, Fibonacci, and Camarilla pivot points
def pivot_points(high, low, close):
pp = (high + low + close) / 3
return {"PP": round(pp, 2), "R1": round(2*pp-low, 2), "R2": round(pp+high-low, 2), "S1": round(2*pp-high, 2), "S2": round(pp-high+low, 2)}
PivotsS&RVIEW →
identify_fibonacci_levels
Calculate Fibonacci retracement and extension levels
def fibonacci_levels(swing_high, swing_low):
diff = swing_high - swing_low
fibs = [0, 0.236, 0.382, 0.5, 0.618, 0.786, 1.0]
return {f"Fib {int(f*100)}%": round(swing_high-diff*f, 4) for f in fibs}
FibonacciS&RVIEW →
measure_trend_strength
Measure trend strength using Average Directional Index (ADX)
def calc_adx(high, low, close, period=14):
tr = [max(h-l, abs(h-c), abs(l-c)) for h,l,c in zip(high,low,close)]
adx = smooth(tr, period)
if adx[-1] > 25: return "Strong"
elif adx[-1] > 20: return "Moderate"
else: return "Weak"
ADXTrendVIEW →
detect_candlestick_patterns
Identify key candlestick patterns: doji, hammer, engulfing, shooting star
def detect_candles(o, h, l, c):
body = abs(c[-1]-o[-1])
rng = h[-1]-l[-1]
if body/rng < 0.1: return "doji"
lwick = min(o[-1],c[-1])-l[-1]
if lwick > 2*body: return "hammer"
return "normal"
CandlesPatternVIEW →
find_breakout_levels
Detect price breakouts from consolidation zones
def find_breakout(close, lookback=20):
recent_high = max(close[-lookback-1:-1])
recent_low = min(close[-lookback-1:-1])
if close[-1] > recent_high: return "bullish_breakout"
if close[-1] < recent_low: return "bearish_breakout"
return "consolidating"
BreakoutAnalysisVIEW →
detect_volume_anomalies
Identify unusual volume spikes that signal potential price moves
def detect_volume_spike(volume, threshold=2.0):
avg_vol = sum(volume[-20:-1]) / 19
ratio = volume[-1] / avg_vol
return {"is_spike": ratio > threshold, "ratio": round(ratio, 2), "severity": "high" if ratio>3 else "medium"}
VolumePatternVIEW →
scan_buy_signals
Scan all coins for bullish buy signal setups (EMA + RSI + MACD)
def scan_buy_signals(coins):
return [
c for c in coins
if calc_rsi(fetch_daily(c)) < 65
and ema_cross(fetch_daily(c)) == "golden"
and macd_positive(fetch_daily(c))
]
ScannerBuyVIEW →
scan_oversold
Find coins in oversold territory (RSI < 30) for potential reversal
def scan_oversold(coins, threshold=30):
return [{"coin": c, "rsi": round(r, 1)} for c in coins if (r := get_rsi(c)) < threshold]
ScannerRSIVIEW →
scan_golden_cross
Identify coins where EMA 20 has recently crossed above EMA 50
def scan_golden_cross(coins, lookback=5):
signals = []
for coin in coins:
e20, e50 = get_ema(coin, 20), get_ema(coin, 50)
for i in range(-lookback, 0):
if e20[i]>e50[i] and e20[i-1]<e50[i-1]: signals.append(coin)
return signals
ScannerEMAVIEW →
scan_death_cross
Detect coins where EMA 20 crossed below EMA 50 recently
def scan_death_cross(coins, lookback=5):
signals = []
for c in coins:
e20, e50 = get_ema(c,20), get_ema(c,50)
for i in range(-lookback,0):
if e20[i]<e50[i] and e20[i-1]>e50[i-1]: signals.append(c)
return signals
ScannerBearishVIEW →
scan_overbought
Find overbought coins (RSI > 70) that may be ready for pullback
def scan_overbought(coins, threshold=70):
return [{"coin": c, "rsi": round(r, 1), "action": "watch_short"} for c in coins if (r := get_rsi(c)) > threshold]
ScannerRSIVIEW →
scan_volume_breakout
Find coins breaking out of consolidation with high volume confirmation
def scan_vol_breakout(coins):
hits = []
for c in coins:
data = get_daily(c)
bo = find_breakout(data["close"])
vs = detect_volume_spike(data["volume"])
if bo != "consolidating" and vs["is_spike"]: hits.append({"coin":c,"dir":bo})
return hits
ScannerVolumeVIEW →
scan_top_setups
Rank all coins by signal quality score and return top N setups
def scan_top_setups(coins, top_n=10):
scored = [(c, compute_signal_score(c)) for c in coins]
scored.sort(key=lambda x: -x[1])
return scored[:top_n]
ScannerRankingVIEW →
scan_macd_crossover
Detect MACD line crossover above/below signal line
def scan_macd_cross(coins, direction="bullish"):
hits = []
for c in coins:
macd, sig = get_macd(c)
cross = macd[-1]>sig[-1] and macd[-2]<sig[-2]
if direction=="bullish" and cross: hits.append(c)
return hits
ScannerMACDVIEW →
calculate_rsi
Pure Python RSI calculation without external dependencies
def calc_rsi(close, period=14):
deltas = [close[i]-close[i-1] for i in range(1,len(close))]
avg_g = sum([max(d,0) for d in deltas[:period]])/period
avg_l = sum([abs(min(d,0)) for d in deltas[:period]])/period
rs = avg_g/avg_l if avg_l else 100
return round(100 - (100/(1+rs)), 2)
RSIIndicatorVIEW →
calculate_ema
Exponential Moving Average with configurable period
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
EMAIndicatorVIEW →
calculate_macd
MACD indicator with configurable fast, slow, and signal periods
def calc_macd(close, fast=12, slow=26, sig=9):
ema_f = calc_ema(close, fast)
ema_s = calc_ema(close, slow)
macd_line = [f-s for f,s in zip(ema_f,ema_s)]
signal = calc_ema(macd_line, sig)
return macd_line, signal
MACDIndicatorVIEW →
calculate_bollinger_bands
Bollinger Bands with configurable period and standard deviation multiplier
def bollinger_bands(close, period=20, mult=2):
import statistics as s
sma = [sum(close[i:i+period])/period for i in range(len(close)-period+1)]
std = [s.stdev(close[i:i+period]) for i in range(len(close)-period+1)]
return sma[-1]+mult*std[-1], sma[-1], sma[-1]-mult*std[-1]
BBIndicatorVIEW →
calculate_stochastic
Stochastic oscillator %K and %D lines
def stochastic(high, low, close, k=14, d=3):
k_values = [(close[i]-min(low[i-k+1:i+1]))/(max(high[i-k+1:i+1])-min(low[i-k+1:i+1]))*100 for i in range(k-1,len(close))]
return k_values, calc_sma(k_values, d)
StochIndicatorVIEW →
calculate_atr
Average True Range for volatility measurement and stop loss calculation
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
ATRVolatilityVIEW →
calculate_vwap
Volume Weighted Average Price for intraday fair value reference
def calc_vwap(high, low, close, volume):
typical = [(h+l+c)/3 for h,l,c in zip(high,low,close)]
return round(sum([t*v for t,v in zip(typical,volume)])/sum(volume), 4)
VWAPIndicatorVIEW →
calculate_ichimoku
Ichimoku cloud components: Tenkan, Kijun, Senkou A/B, Chikou
def ichimoku(high, low, close):
mid = lambda h,l,n: (max(h[-n:])+min(l[-n:]))/2
tenkan = mid(high,low,9)
kijun = mid(high,low,26)
return {"tenkan": round(tenkan,2), "kijun": round(kijun,2), "above_cloud": close[-1]>kijun}
IchimokuIndicatorVIEW →
sr_indicator_pine
Pine Script indicator to automatically draw S&R levels on TradingView chart
// @version=5
indicator("Claude S&R Levels", overlay=true)
n = input(10, "Pivot Lookback")
ph = ta.pivothigh(high, n, n)
pl = ta.pivotlow(low, n, n)
if not na(ph)
line.new(bar_index[n], ph, bar_index, ph, color.red)
if not na(pl)
line.new(bar_index[n], pl, bar_index, pl, color.green)
PineS&RVIEW →
signal_indicator_pine
Pine Script buy/sell signal indicator based on EMA + RSI combo
// @version=5
indicator("Claude Signal", overlay=true)
ema20 = ta.ema(close, 20)
ema50 = ta.ema(close, 50)
rsi = ta.rsi(close, 14)
buy = ta.crossover(ema20,ema50) and rsi < 65
plotshape(buy, "Buy", shape.triangleup, location.belowbar, color.green)
PineSignalsVIEW →
generate_pine_from_claude
Use Claude API to generate custom Pine Script from natural language description
import anthropic
def generate_pine(description: str):
client = anthropic.Anthropic()
msg = client.messages.create(model="claude-sonnet-4-5", max_tokens=1024,
messages=[{"role":"user", "content": f"Write Pine Script v5: {description}"}])
return msg.content[0].text
PineClaude APIVIEW →
pivot_script_pine
Pine Script that plots classic pivot points with R1-R3 and S1-S3 levels
// @version=5
indicator("Pivot Points", overlay=true)
pp = (high[1]+low[1]+close[1])/3
r1 = 2*pp - low[1]
s1 = 2*pp - high[1]
plot(pp, "PP", color.orange, 2)
plot(r1, "R1", color.red)
plot(s1, "S1", color.green)
PinePivotsVIEW →
custom_strategy_pine
Pine Script strategy template with entry/exit conditions and risk management
// @version=5
strategy("Claude Strategy", overlay=true, initial_capital=10000)
ema20 = ta.ema(close,20)
rsi = ta.rsi(close,14)
if ta.crossover(close,ema20) and rsi<65
strategy.entry("Long", strategy.long)
if ta.crossunder(close,ema20) and rsi>35
strategy.close("Long")
PineStrategyVIEW →
alert_script_pine
Pine Script alert system that fires on key price level touches
// @version=5
indicator("Claude Alerts", overlay=true)
support = input.float(92000, "Support Level")
resist = input.float(98000, "Resistance Level")
alertcondition(ta.cross(close,support), "Support Touch", "Price hit support")
alertcondition(ta.cross(close,resist), "Resistance Touch", "Price hit resistance")
PineAlertsVIEW →
multi_indicator_dashboard
Pine Script dashboard overlay showing RSI, MACD signal, and trend status in a table
// @version=5
indicator("Claude Dashboard", overlay=true)
var tbl = table.new(position.top_right,2,4)
rsi = ta.rsi(close,14)
table.cell(tbl,0,0,"RSI")
table.cell(tbl,1,0,str.tostring(math.round(rsi,1)), text_color=rsi>70?color.red:color.green)
PineDashboardVIEW →
fetch_ohlcv_coingecko
Fetch OHLCV data for any coin from CoinGecko API
def fetch_ohlcv(coin_id: str, days=365):
url = f"https://api.coingecko.com/api/v3/coins/{coin_id}/ohlc?vs_currency=usd&days={days}"
data = requests.get(url).json()
return {"open":[d[1] for d in data], "high":[d[2] for d in data], "low":[d[3] for d in data], "close":[d[4] for d in data]}
DataCoinGeckoVIEW →
fetch_top100_coingecko
Fetch top 100 cryptocurrencies by market cap from CoinGecko
def fetch_top100():
url = "https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&order=market_cap_desc&per_page=100&page=1"
return requests.get(url).json()
DataCoinGeckoVIEW →
cache_to_supabase
Store Claude analysis results to Supabase PostgreSQL database
from supabase import create_client
def cache_analysis(results: list):
sb = create_client(os.environ["SUPABASE_URL"], os.environ["SUPABASE_KEY"])
sb.table("coin_analysis").upsert(results, on_conflict="coin_id").execute()
DatabaseSupabaseVIEW →
run_batch_analysis
Process all 100 coins in parallel and aggregate analysis results
import concurrent.futures as cf
def batch_analyze(coins, max_workers=10):
with cf.ThreadPoolExecutor(max_workers) as ex:
futures = {ex.submit(analyze_coin, c): c for c in coins}
return [f.result() for f in cf.as_completed(futures)]
DataBatchVIEW →
normalize_price_data
Normalize and validate OHLCV data before analysis
def normalize_ohlcv(raw: dict) -> dict:
for key in ["open","high","low","close"]:
if key not in raw: raise ValueError(f"Missing: {key}")
raw[key] = [float(x) for x in raw[key]]
return raw
DataUtilsVIEW →
schedule_daily_cron
Set up a daily cron job to refresh all coin analysis automatically
from apscheduler.schedulers.blocking import BlockingScheduler
sched = BlockingScheduler()
sched.add_job(lambda: cache_analysis(batch_analyze(fetch_top100())), "cron", hour=0)
sched.start()
DataCronVIEW →
export_analysis_json
Export all cached analysis results to JSON file
import json, datetime
def export_json(results, path="analysis.json"):
with open(path, "w") as f:
json.dump({"generated_at": datetime.now().isoformat(), "count": len(results), "data": results}, f, indent=2)
return path
DataExportVIEW →
generate_market_narrative
Use Claude to write a natural language market analysis narrative
def generate_narrative(coin, analysis):
client = anthropic.Anthropic()
msg = client.messages.create(model="claude-sonnet-4-5", max_tokens=300,
messages=[{"role":"user","content":f"Write 2-sentence analysis for {coin} in Indonesian. RSI: {analysis['rsi']}, trend: {analysis['trend']}"}])
return msg.content[0].text
Claude APINarrativeVIEW →
rate_signal_quality
Ask Claude to rate the quality of a trading signal from 0-100
def rate_signal(analysis: dict) -> int:
msg = client.messages.create(model="claude-sonnet-4-5", max_tokens=10,
messages=[{"role":"user","content":"Rate this signal quality 0-100. Return only the number. Data: "+str(analysis)}])
return int(msg.content[0].text.strip())
Claude APIScoringVIEW →
analyze_chart_screenshot
Pass TradingView chart screenshot to Claude vision for S&R detection
def analyze_chart_image(img_b64: str):
msg = client.messages.create(model="claude-sonnet-4-5", max_tokens=500,
messages=[{"role":"user","content":[{"type":"image","source":{"type":"base64","media_type":"image/png","data":img_b64}},{"type":"text","text":"List key S&R levels"}]}])
return msg.content[0].text
Claude APIVisionVIEW →
explain_indicator
Ask Claude to explain what an indicator reading means for a coin
def explain_indicator(name, value, coin):
msg = client.messages.create(model="claude-sonnet-4-5", max_tokens=100,
messages=[{"role":"user","content":f"Explain {name}={value} for {coin} in 1 sentence. Simple Indonesian."}])
return msg.content[0].text
Claude APIEducationVIEW →
generate_trade_plan
Generate a complete trade plan with entry, stop loss, and take profit levels
def generate_trade_plan(coin, sr, signal):
msg = client.messages.create(model="claude-sonnet-4-5", max_tokens=400,
messages=[{"role":"user","content":f"Create trade plan for {coin}. Signal: {signal}. S: {sr['support']}. R: {sr['resistance']}. Entry, SL, TP1, TP2. JSON format."}])
return msg.content[0].text
Claude APITradeVIEW →
compare_two_coins
Ask Claude to compare two coins and recommend the better setup
def compare_coins(coin_a, a, coin_b, b):
msg = client.messages.create(model="claude-sonnet-4-5", max_tokens=200,
messages=[{"role":"user","content":f"Compare {coin_a} vs {coin_b} as trading setups. {coin_a}: {a}. {coin_b}: {b}. Which is better? 2 sentences max."}])
return msg.content[0].text
Claude APICompareVIEW →
summarize_market_conditions
Get Claude to write a market-wide overview based on aggregate signal data
def market_summary(buy, sell, neutral):
msg = client.messages.create(model="claude-sonnet-4-5", max_tokens=150,
messages=[{"role":"user","content":f"Out of {buy+sell+neutral} crypto: {buy} buy, {sell} sell, {neutral} neutral. Describe market in 1 sentence (Indonesian)."}])
return msg.content[0].text
Claude APISummaryVIEW →
validate_sr_with_claude
Ask Claude to validate and rank S&R levels by significance
def validate_sr(coin, raw_levels, price_history):
msg = client.messages.create(model="claude-sonnet-4-5", max_tokens=300,
messages=[{"role":"user","content":f"For {coin}, rank these levels by strength: {raw_levels}. Return sorted JSON array."}])
return msg.content[0].text
Claude APIS&RVIEW →