Skip to content

πŸ“– Glossary


Quick Cheat Sheet

Term Example Meaning
Symbol EURUSD, XAUUSD Trading instrument identifier.
Lot 1.00 β†’ usually 100,000 units Standard trade size.
Volume 0.10, 2.50 Lots to trade (can be fractional).
SL 1.09500 Stop Loss β€” protective exit level.
TP 1.10500 Take Profit β€” target exit level.
Ticket 12345678 Unique order/position/deal ID (uint64 in most RPCs).
Digits 5 Quote precision; e.g., 1.23456 for 5 digits.
Point 0.00001 (EURUSD) Smallest price step for the symbol.
Pip 0.0001 (most FX majors) Conventional 1 Β«pipΒ» (may differ from point).
Margin 100.00 Funds locked for open exposure.
Equity 1000.00 Balance Β± floating P/L.
Free Margin 900.00 Equity βˆ’ Margin.
Leverage 1:500 Borrowed funds ratio.
Market Watch selected symbols in the terminal The watchlist used by selected_only=True in some RPCs.
DOM/Book Market Depth Level‑2 price ladder; see Market Book methods.
Enum BMT5_ENUM_*, MRPC_ENUM_* Strongly‑typed constants β€” no Β«magic numbersΒ».
Retcode 10009, TRADE_RETCODE_DONE Trade server return code (see error mapping).
Deadline now() + 3s Per‑call absolute deadline β†’ turned into gRPC timeout.
Cancellation asyncio.Event() Cooperative stop for retry/stream wrappers.
Stream on_trade(), on_symbol_tick() Long‑lived server push (events until cancelled).

πŸ“Š Order & Position Lifecycle

   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚  New Order  β”‚  (market or pending)
   β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
          β”‚
          β”‚ executed β†’ DEAL_ADD (may create/affect POSITION)
          β–Ό
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚   Opened    β”‚  (POSITION with floating P/L)
   β””β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”˜
      SL     TP
      β”‚      β”‚
      β–Ό      β–Ό
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      pending order can be
   β”‚   Closed    β”‚ ◄─── deleted/cancelled before fill
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

MT5 note: in hedging mode multiple positions per symbol can coexist; in netting β€” one net position per symbol.

πŸ§‘β€πŸ’» Account Terms

  • Login / Server β€” broker account ID and server name.
  • Balance / Equity / Margin / Free β€” see cheat sheet; numbers come from:

  • Account Information Overview

  • Currency Digits β€” use ACCOUNT_CURRENCY_DIGITS (integer) to format money correctly.

πŸ“ˆ Market Info Terms


πŸ“¦ Orders & History Terms


πŸ”Œ RPC & Streaming Terms


πŸ›‘οΈ Errors & Codes

  • gRPC transport β€” timeouts, unavailables; wrappers auto‑retry via execute_with_reconnect(...).
  • Trade retcodes β€” see numeric+string mapping in package/MetaRpcMT5/mrpc_mt5_error_pb2.py and docs for order_* / on_trade_transaction.
  • Validation β€” prefer enums over raw ints/strings to avoid typos.

βœ… One‑page Summary

  • Account β€” who you are & your limits.
  • Market Info β€” what you can trade and how it’s specified.
  • Orders/History β€” what’s live & what happened before.
  • RPC β€” unary vs streaming, with deadlines & cancellation.
  • Errors β€” retcodes & transport issues, surfaced cleanly by the SDK.