MQL4 Book  Appendixes    MarketInfo() Identifiers

MarketInfo() Identifiers

Query identifiers used in the MarketInfo() function can have the following values:

Constant Value Description
MODE_LOW 1 Minimum day price
MODE_HIGH 2 Maximum day price
MODE_TIME 5 The last incoming tick time.
MODE_BID 9 Last incoming bid price. For the current symbol, it is stored in the predefined variable Bid.
MODE_ASK 10 Last incoming ask price. For the current symbol, it is stored in the predefined variable Ask.
MODE_POINT 11 Point size in the quote currency. For the current symbol, it is stored in the predefined variable Point.
MODE_DIGITS 12 Count of digits after decimal point in the symbol prices. For the current symbol, it is stored in the predefined variable Digits.
MODE_SPREAD 13 Spread value in points.
MODE_STOPLEVEL 14 Minimal permissible StopLoss/TakeProfit value in points.
MODE_LOTSIZE 15 Lot size in the base currency.
MODE_TICKVALUE 16 Minimal tick value in the deposit currency.
MODE_TICKSIZE 17 Minimal tick size in the quote currency.
MODE_SWAPLONG 18 Swap of a long position.
MODE_SWAPSHORT 19 Swap of a short position.
MODE_STARTING 20 Trade starting date (usually used for futures).
MODE_EXPIRATION 21 Trade expiration date (usually used for futures).
MODE_TRADEALLOWED 22 Trade is allowed for the symbol.
MODE_MINLOT 23 Minimal permitted lot size.
MODE_LOTSTEP 24 Step for changing lots.
MODE_MAXLOT 25 Maximal permitted lot size.
MODE_SWAPTYPE 26 Swap calculation method. 0 - in points; 1 - in the symbol base currency; 2 - by interest; 3 - in the margin currency.
MODE_PROFITCALCMODE 27 Profit calculation mode. 0 - Forex; 1 - CFD; 2 - Futures.
MODE_MARGINCALCMODE 28 Margin calculation mode. 0 - Forex; 1 - CFD; 2 - Futures; 3 - CFD for indexes.
MODE_MARGININIT 29 Initial margin requirements for 1 lot.
MODE_MARGINMAINTENANCE 30 Margin to maintain open positions calculated for 1 lot.
MODE_MARGINHEDGED 31 Hedged margin calculated for 1 lot.
MODE_MARGINREQUIRED 32 Free margin required to open 1 lot for buying.
MODE_FREEZELEVEL 33 Order freeze level in points. If the execution price lies within the range defined by the freeze level, the order cannot be modified, canceled or closed.