Skip to main content
Glama

metatrader-mcp-server

calculate_price_target.md816 B
# 🎯 calculate_price_target **Signature:** ```python def calculate_price_target(order_type: Union[int, str, OrderType], symbol: str, volume: float, entry_price: float, target: float) -> Optional[float] ``` ## What does it do? 🤓 Calculates the price level needed to hit a desired profit or loss target. Super handy for planning exits! ## Parameters - **order_type**: Type of order (BUY/SELL or OrderType enum) - **symbol**: Instrument name (e.g., "EURUSD") - **volume**: Trading volume in lots - **entry_price**: Your entry price - **target**: Profit/loss target (positive for profit, negative for loss) ## Returns - The price level to achieve the target, or None if not found. ## Fun Fact 📈 This function iteratively searches for the magic price that will get you to your goal. Math + trading = ❤️!

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/ariadng/metatrader-mcp-server'

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