Skip to main content
Glama
patch-ridermg48

TradingView MCP Server

volume_confirmation_analysis

Analyzes trading volume patterns to confirm price movements for cryptocurrencies. Provides detailed volume confirmation analysis for specific coins across exchanges and timeframes.

Instructions

Detailed volume confirmation analysis for a specific coin.

Args:
	symbol: Coin symbol (e.g., BTCUSDT)
	exchange: Exchange name
	timeframe: Time frame for analysis

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes
exchangeNoKUCOIN
timeframeNo15m

Implementation Reference

  • The main handler function for the 'volume_confirmation_analysis' tool. It performs detailed volume confirmation analysis using TradingView TA data, calculating volume ratios, price changes, and generating trading signals based on volume strength combined with technical indicators like RSI and Bollinger Bands. Registered via @mcp.tool() decorator.
    @mcp.tool()
    def volume_confirmation_analysis(symbol: str, exchange: str = "KUCOIN", timeframe: str = "15m") -> dict:
    	"""Detailed volume confirmation analysis for a specific coin.
    	
    	Args:
    		symbol: Coin symbol (e.g., BTCUSDT)
    		exchange: Exchange name
    		timeframe: Time frame for analysis
    	"""
    	exchange = sanitize_exchange(exchange, "KUCOIN")
    	timeframe = sanitize_timeframe(timeframe, "15m")
    	
    	if not symbol.upper().endswith('USDT'):
    		symbol = symbol.upper() + 'USDT'
    	
    	screener = EXCHANGE_SCREENER.get(exchange, "crypto")
    	
    	try:
    		analysis = get_multiple_analysis(screener=screener, interval=timeframe, symbols=[symbol])
    		
    		if not analysis or symbol not in analysis:
    			return {"error": f"No data found for {symbol}"}
    			
    		data = analysis[symbol]
    		if not data or not hasattr(data, 'indicators'):
    			return {"error": f"No indicator data for {symbol}"}
    			
    		indicators = data.indicators
    		
    		# Get volume data
    		volume = indicators.get('volume', 0)
    		close = indicators.get('close', 0)
    		open_price = indicators.get('open', 0)
    		high = indicators.get('high', 0)
    		low = indicators.get('low', 0)
    		
    		# Calculate price metrics
    		price_change = ((close - open_price) / open_price) * 100 if open_price > 0 else 0
    		candle_range = ((high - low) / low) * 100 if low > 0 else 0
    		
    		# Volume analysis
    		sma20_volume = indicators.get('volume.SMA20', 0)
    		volume_ratio = volume / sma20_volume if sma20_volume > 0 else 1
    		
    		# Technical indicators
    		rsi = indicators.get('RSI', 50)
    		bb_upper = indicators.get('BB.upper', 0)
    		bb_lower = indicators.get('BB.lower', 0)
    		bb_middle = (bb_upper + bb_lower) / 2 if bb_upper and bb_lower else close
    		
    		# Volume confirmation signals
    		signals = []
    		
    		# Strong volume + price breakout
    		if volume_ratio >= 2.0 and abs(price_change) >= 3.0:
    			signals.append(f"🚀 STRONG BREAKOUT: {volume_ratio:.1f}x volume + {price_change:.1f}% price")
    		
    		# Volume divergence
    		if volume_ratio >= 1.5 and abs(price_change) < 1.0:
    			signals.append(f"⚠️ VOLUME DIVERGENCE: High volume ({volume_ratio:.1f}x) but low price movement")
    		
    		# Low volume on price move (weak signal)
    		if abs(price_change) >= 2.0 and volume_ratio < 0.8:
    			signals.append(f"❌ WEAK SIGNAL: Price moved but volume is low ({volume_ratio:.1f}x)")
    		
    		# Bollinger Band + Volume confirmation
    		if close > bb_upper and volume_ratio >= 1.5:
    			signals.append(f"💥 BB BREAKOUT CONFIRMED: Upper band breakout + volume confirmation")
    		elif close < bb_lower and volume_ratio >= 1.5:
    			signals.append(f"📉 BB SELL CONFIRMED: Lower band breakout + volume confirmation")
    		
    		# RSI + Volume analysis
    		if rsi > 70 and volume_ratio >= 2.0:
    			signals.append(f"🔥 OVERBOUGHT + VOLUME: RSI {rsi:.1f} + {volume_ratio:.1f}x volume")
    		elif rsi < 30 and volume_ratio >= 2.0:
    			signals.append(f"🛒 OVERSOLD + VOLUME: RSI {rsi:.1f} + {volume_ratio:.1f}x volume")
    		
    		# Overall assessment
    		if volume_ratio >= 3.0:
    			volume_strength = "VERY STRONG"
    		elif volume_ratio >= 2.0:
    			volume_strength = "STRONG"
    		elif volume_ratio >= 1.5:
    			volume_strength = "MEDIUM"
    		elif volume_ratio >= 1.0:
    			volume_strength = "NORMAL"
    		else:
    			volume_strength = "WEAK"
    		
    		return {
    			"symbol": symbol,
    			"price_data": {
    				"close": close,
    				"change_percent": round(price_change, 2),
    				"candle_range_percent": round(candle_range, 2)
    			},
    			"volume_analysis": {
    				"current_volume": volume,
    				"volume_ratio": round(volume_ratio, 2),
    				"volume_strength": volume_strength,
    				"average_volume": sma20_volume
    			},
    			"technical_indicators": {
    				"RSI": round(rsi, 1),
    				"BB_position": "ABOVE" if close > bb_upper else "BELOW" if close < bb_lower else "WITHIN",
    				"BB_upper": bb_upper,
    				"BB_lower": bb_lower
    			},
    			"signals": signals,
    			"overall_assessment": {
    				"bullish_signals": len([s for s in signals if "🚀" in s or "💥" in s or "🛒" in s]),
    				"bearish_signals": len([s for s in signals if "📉" in s or "❌" in s]),
    				"warning_signals": len([s for s in signals if "⚠️" in s])
    			}
    		}
    		
    	except Exception as e:
    		return {"error": f"Analysis failed: {str(e)}"}
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions 'detailed analysis' but doesn't specify what the analysis returns, whether it's computationally intensive, if it requires specific data availability, or any rate limits. For a 3-parameter tool with no annotations, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately concise with a clear purpose statement followed by parameter explanations. The Args section is well-structured and front-loaded. Every sentence serves a purpose, though the parameter explanations could be slightly more informative.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 3 parameters with 0% schema coverage, no annotations, and no output schema, the description is incomplete. It doesn't explain what the analysis returns, what 'volume confirmation' means in practice, or provide enough context about parameter constraints. For a financial analysis tool with multiple siblings, this leaves too many gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It provides basic parameter explanations in the Args section (e.g., 'Coin symbol (e.g., BTCUSDT)'), which adds some semantic meaning beyond the schema's bare titles. However, it doesn't explain valid values for 'exchange' or 'timeframe' beyond examples, leaving important parameter details undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'Detailed volume confirmation analysis for a specific coin' which provides a clear purpose (analyzing volume confirmation for a coin) but is somewhat vague about what 'volume confirmation analysis' entails. It distinguishes from siblings like 'volume_breakout_scanner' and 'smart_volume_scanner' by focusing on confirmation rather than scanning, but doesn't explicitly contrast them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention when volume confirmation analysis is appropriate, what scenarios it addresses, or how it differs from sibling tools like 'coin_analysis' or 'volume_breakout_scanner'. The agent receives no usage context beyond the basic purpose.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/patch-ridermg48/tradingview-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server