Skip to content

MT4Account · Trading Actions — Overview

Entry / exit operations for live trading on MT4 accounts. Use this page to choose the correct action quickly.


📁 What lives here

  • order_send — place market or pending order (with optional SL/TP, expiration).
  • order_modify — update SL/TP, pending price, and expiration.
  • order_close_deleteclose market position (full/partial) or delete pending order.
  • order_close_by — close one hedge position by another opposite one (same symbol) → netting.

🧭 Plain English

  • order_sendEnter the market or schedule a pending entry.
  • order_modify → Adjust protection or re-price pending order.
  • order_close_deleteExit or cancel waiting order.
  • order_close_by → Fast de-hedge: match BUY vs SELL to reduce costs.

Rule of thumb:
✅ You want to enterorder_send()
✅ You want to exit or cancelorder_close_delete()
✅ You want to tweak SL/TP or pendingorder_modify()
✅ Hedge account and you want clean nettingorder_close_by()


Quick choose

If you need… Use Works on Key inputs Safety notes
Market entry or pending order order_send BUY / SELL / LIMIT / STOP symbol, op_type, volume, SL/TP Check StopsLevel / FreezeLevel
Update SL/TP / pending price / expiration order_modify Market or pending ticket, new_sl/tp, new_price Only pendings accept new_price
Close position or delete pending order_close_delete Market or pending ticket, lots?, slippage? Respect volume step; slippage only for market
Close one hedge position by another order_close_by Hedge accounts only two tickets Same symbol, opposite side only

❌ Cross-refs & Gotchas

  • Volume rules: snap to VolumeMin/Max/Step (symbol_params_many)
  • Protection distance: StopsLevel + FreezeLevel must be respected
  • Expiration only applies to pending orders
  • Partial close only through order_close_delete
  • Close By not available on netting accounts
  • On retry (reconnect) events may duplicate — keep UI actions idempotent