π 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.