INNER CODE UNIT · Python
place_split_order
codedpro/mt5-trade-split-manager · mcp_server.py:130
def place_split_order(
symbol: str,
order_type: str,
price: float,
sl: float,
tp_levels: List[float],
lot_size: float = 0.1,
volume_split: Optional[List[float]] = None,
comment: str = "Claude AI",
):
"""Place one pending order that the EA splits into several positions,
each closing at a different take-profit level.
Arguments (prices are in the symbol's quote price, volumes in lots):
- symbol: e.g. "XAUUSD", "EURUSD", "BTCUSD" - any broker symbol.
- order_type: one of BUY_STOP, SELL_STOP, BUY_LIMIT, SELL_LIMIT.
Wrong-side requests are REJECTED by the EA:
* BUY_STOP price must be ABOVE the current ask.