Skip to main content
Glama
emerzon

MetaTrader5 MCP Server

by emerzon
helpers.py873 B
"""Helper functions for forecast orchestration.""" from typing import List def default_seasonality_period(timeframe: str) -> int: """Return default seasonality period for a given timeframe.""" tf_map = { 'M1': 60, 'M5': 288, 'M15': 96, 'M30': 48, 'H1': 24, 'H4': 6, 'D1': 5, 'W1': 4, 'MN1': 12 } return tf_map.get(timeframe, 24) def next_times_from_last(last_epoch: float, tf_secs: int, horizon: int) -> List[float]: """Generate future timestamps from last bar.""" return [last_epoch + (i + 1) * tf_secs for i in range(horizon)] def pd_freq_from_timeframe(tf: str) -> str: """Convert MT5 timeframe to pandas frequency string.""" freq_map = { 'M1': '1min', 'M5': '5min', 'M15': '15min', 'M30': '30min', 'H1': '1H', 'H4': '4H', 'D1': '1D', 'W1': '1W', 'MN1': '1MS' } return freq_map.get(tf, '1H')

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/emerzon/mt-data-mcp'

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