INNER CODE UNIT · Python
detect_unfilled_gaps
Spoofkapoof/TradingViewMCPServer · tradingview_mcp/server.py:945
def detect_unfilled_gaps(symbol: str, timeframe: str = "1h") -> dict:
"""
Detect unfilled price gaps (unfinished business areas).
Args:
symbol: Symbol (e.g., 'EURUSD', 'AAPL', 'BTC')
timeframe: Time interval ('5m', '15m', '1h', '4h', '1d')
Returns:
List of unfilled gaps with price levels and timestamps
"""
hist_data = get_historical_data(symbol, timeframe)
if not hist_data.get("success"):
return hist_data
gaps = detect_gaps(hist_data["data"])