INNER CODE UNIT · Python
get_pivot_points
Spoofkapoof/TradingViewMCPServer · tradingview_mcp/server.py:516
def get_pivot_points(symbol: str, timeframe: str = "1h") -> dict:
"""
Calculate pivot points for intraday trading.
Args:
symbol: Symbol (e.g., 'EURUSD', 'AAPL', 'BTC')
timeframe: Time interval ('5m', '15m', '1h', '4h', '1d')
Returns:
Pivot point, 3 resistance levels, 3 support levels
"""
hist_data = get_historical_data(symbol, timeframe)
if not hist_data.get("success"):
return hist_data
pivots = calculate_pivot_points(hist_data["data"])