Skip to content

πŸ“– Glossary (MT4 Terms)

A quick reference for common MT4/GoMT4 terms used throughout the docs and code.


πŸ“ Quick Cheat Sheet

Term Example Meaning
Symbol EURUSD Instrument identifier
Lot 1.0 β†’ 100,000 Standard trading volume
SL 1.09500 Stop Loss (protect from loss)
TP 1.10500 Take Profit (close with gain)
Ticket 12345678 Unique order ID
Digits 5 Quote precision (1.23456)
Margin 100.00 Locked funds for position
Equity 1000.00 Balance Β± open positions PnL
Stream StreamQuotes() Continuous updates (ticks, orders, profits)

πŸ“Š Order Lifecycle Diagram

   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚ New Order β”‚
   β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜
         β”‚ (executed at market / placed pending)
         β–Ό
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚   Open    β”‚
   β””β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”˜
       β”‚   β”‚
       β”‚   β”‚ SL hit (loss)
       β”‚   β–Ό
       β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”
       β”‚ β”‚Closed β”‚
       β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       β”‚ TP hit (profit)
       β”‚
       β–Ό
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚ Delete/   β”‚
   β”‚ Cancelled β”‚ (for pending orders)
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

This diagram shows a typical order lifecycle: creation β†’ open β†’ closure (SL/TP or manual) or cancellation (if pending).


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

  • Login β†’ Numeric ID of your trading account.
  • Password β†’ Investor or trader password. Grants access to terminal.
  • Server β†’ Broker server name (e.g., RoboForex-Demo).
  • Balance β†’ Money currently on the account.
  • Equity β†’ Balance + open positions PnL.
  • Margin β†’ Funds locked for open positions.
  • Free Margin β†’ Equity βˆ’ Margin.
  • Leverage β†’ Ratio (e.g., 1:500) showing how much borrowed funds you can use.

πŸ“ˆ Market Info

  • Symbol β†’ Instrument identifier (e.g., EURUSD).
  • Quote β†’ Current bid/ask prices for a symbol.
  • Digits β†’ Decimal precision of the quote (e.g., 5 digits β†’ 1.23456).
  • Point β†’ Smallest price step for the symbol (e.g., 0.00001 for EURUSD).
  • Lot β†’ Standard trade size (usually 100,000 units base currency).
  • Lot Step β†’ Minimum increment allowed when specifying volume.
  • Contract Size β†’ Amount of base currency per lot.
  • Stops Level β†’ Minimum distance (in points) required for SL/TP from current price.

πŸ“¦ Orders

  • Order β†’ Instruction to buy or sell a symbol.
  • Market Order β†’ Executed immediately at current market price.
  • Pending Order β†’ Placed to execute in the future at a specific price (Limit or Stop).
  • Ticket β†’ Unique ID of an order (int64).
  • SL (Stop Loss) β†’ Protective level to cap loss.
  • TP (Take Profit) β†’ Target level to close with profit.
  • Magic Number β†’ User-defined integer to tag EAs/orders.
  • Comment β†’ Free text attached to an order.

πŸ”„ Order Types (MT4)

  • OP_BUY β†’ Buy at market.
  • OP_SELL β†’ Sell at market.
  • OP_BUYLIMIT β†’ Pending: buy if price drops to X.
  • OP_SELLLIMIT β†’ Pending: sell if price rises to X.
  • OP_BUYSTOP β†’ Pending: buy if price rises to X.
  • OP_SELLSTOP β†’ Pending: sell if price drops to X.

πŸ”Œ Connection & RPC

  • gRPC β†’ Protocol used by GoMT4 to expose MT4 functions.
  • Port 50051 β†’ Default local address where server listens (127.0.0.1:50051).
  • Stream β†’ Long‑lived connection pushing updates (quotes, orders, history).
  • Unary RPC β†’ One‑shot request/response (e.g., GetQuote).

πŸ“Š History & Streaming

  • Quote History β†’ Past bid/ask points (OHLC bars or ticks).
  • Order History β†’ List of closed trades for a period.
  • StreamQuotes β†’ Continuous tick updates.
  • StreamTradeUpdates β†’ Real-time feed of order lifecycle events.

πŸ›‘οΈ Errors & Codes

  • MrpcError β†’ Generic RPC error (code + message).
  • OrderError β†’ Error tied to a specific order (invalid volume, price, etc.).
  • Slippage β†’ Max price deviation allowed when executing orders.
  • Requote β†’ Server rejects trade at requested price, offers new one.

βœ… Cheat Sheet (summary)

  • Account β†’ who you are.
  • Market Info β†’ what you trade.
  • Orders β†’ how you trade.
  • Connection β†’ how GoMT4 talks to MT4.
  • History/Streaming β†’ how you monitor trades and quotes.
  • Errors β†’ what can go wrong.