ACCOUNT_ASSETS=50,//The current assets of an account
ACCOUNT_LIABILITIES=51,//The current liabilities on an account
ACCOUNT_COMMISSION_BLOCKED=52//The current blocked commission amount on an account
}
publicenumENUM_ACCOUNT_INFO_STRING
{
ACCOUNT_NAME=1,//Client name
ACCOUNT_SERVER=3,//Trade server name
ACCOUNT_CURRENCY=36,//Account currency
ACCOUNT_COMPANY=2//Name of a company that serves the account
}
publicenumENUM_ACCOUNT_TRADE_MODE
{
ACCOUNT_TRADE_MODE_DEMO=0,//Demo account
ACCOUNT_TRADE_MODE_CONTEST=1,//Contest account
ACCOUNT_TRADE_MODE_REAL=2//Real account
}
publicenumENUM_ACCOUNT_STOPOUT_MODE
{
ACCOUNT_STOPOUT_MODE_PERCENT=0,//Account stop out mode in percents
ACCOUNT_STOPOUT_MODE_MONEY=1//Account stop out mode in money
}
publicenumENUM_ACCOUNT_MARGIN_MODE
{
ACCOUNT_MARGIN_MODE_RETAIL_NETTING=0,//Used for the OTC markets to interpret positions in the "netting" mode
ACCOUNT_MARGIN_MODE_EXCHANGE=1,//Used for the exchange markets
ACCOUNT_MARGIN_MODE_RETAIL_HEDGING=2//Used for the exchange markets where individual positions are possible
}
#endregion//Account Properties
// Trade Constants:
#regionHistoryDatabaseProperties
publicenumENUM_SERIES_INFO_INTEGER
{
SERIES_BARS_COUNT=0,//Bars count for the symbol-period for the current moment
SERIES_FIRSTDATE=1,//The very first date for the symbol-period for the current moment
SERIES_LASTBAR_DATE=5,//Open time of the last bar of the symbol-period
SERIES_SERVER_FIRSTDATE=2,//The very first date in the history of the symbol on the server regardless of the timeframe
SERIES_TERMINAL_FIRSTDATE=3,//The very first date in the history of the symbol in the client terminal, regardless of the timeframe
SERIES_SYNCHRONIZED=4//Symbol/period data synchronization flag for the current moment
}
#endregion//History Database Properties
#regionOrderProperties
publicenumENUM_ORDER_PROPERTY_INTEGER
{
ORDER_TICKET=22,//Order ticket. Unique number assigned to each order
ORDER_TIME_SETUP=1,//Order setup time
ORDER_TYPE=4,//Order type
ORDER_STATE=14,//Order state
ORDER_TIME_EXPIRATION=2,//Order expiration time
ORDER_TIME_DONE=3,//Order execution or cancellation time
ORDER_TIME_SETUP_MSC=18,//The time of placing an order for execution in milliseconds since 01.01.1970
ORDER_TIME_DONE_MSC=19,//Order execution/cancellation time in milliseconds since 01.01.1970
ORDER_TYPE_FILLING=5,//Order filling type
ORDER_TYPE_TIME=6,//Order lifetime
ORDER_MAGIC=15,//ID of an Expert Advisor that has placed the order (designed to ensure that each Expert Advisor places its own unique number)
ORDER_REASON=23,//The reason or source for placing an order
ORDER_POSITION_ID=17,//Position identifier that is set to an order as soon as it is executed. Each executed order results in a deal that opens or modifies an already existing position. The identifier of exactly this position is set to the executed order at this moment.
ORDER_POSITION_BY_ID=21//Identifier of an opposite position used for closing by order ORDER_TYPE_CLOSE_BY
}
publicenumENUM_ORDER_PROPERTY_DOUBLE
{
ORDER_VOLUME_INITIAL=7,//Order initial volume
ORDER_VOLUME_CURRENT=8,//Order current volume
ORDER_PRICE_OPEN=9,//Price specified in the order
ORDER_SL=12,//Stop Loss value
ORDER_TP=13,//Take Profit value
ORDER_PRICE_CURRENT=10,//The current price of the order symbol
ORDER_PRICE_STOPLIMIT=11//The Limit order price for the StopLimit order
}
publicenumENUM_ORDER_PROPERTY_STRING
{
ORDER_SYMBOL=0,//Symbol of the order
ORDER_COMMENT=16,//Order comment
ORDER_EXTERNAL_ID=20//Order identifier in an external trading system (on the Exchange)
}
publicenumENUM_ORDER_TYPE
{
ORDER_TYPE_BUY=0,//Market Buy order
ORDER_TYPE_SELL=1,//Market Sell order
ORDER_TYPE_BUY_LIMIT=2,//Buy Limit pending order
ORDER_TYPE_SELL_LIMIT=3,//Sell Limit pending order
ORDER_TYPE_BUY_STOP=4,//Buy Stop pending order
ORDER_TYPE_SELL_STOP=5,//Sell Stop pending order
ORDER_TYPE_BUY_STOP_LIMIT=6,//Upon reaching the order price, a pending Buy Limit order is places at the StopLimit price
ORDER_TYPE_SELL_STOP_LIMIT=7,//Upon reaching the order price, a pending Sell Limit order is places at the StopLimit price
ORDER_TYPE_CLOSE_BY=8//Order to close a position by an opposite one
}
publicenumENUM_ORDER_STATE
{
ORDER_STATE_STARTED=0,//Order checked, but not yet accepted by broker
ORDER_STATE_PLACED=1,//Order accepted
ORDER_STATE_CANCELED=2,//Order canceled by client
ORDER_STATE_PARTIAL=3,//Order partially executed
ORDER_STATE_FILLED=4,//Order fully executed
ORDER_STATE_REJECTED=5,//Order rejected
ORDER_STATE_EXPIRED=6,//Order expired
ORDER_STATE_REQUEST_ADD=7,//Order is being registered (placing to the trading system)
ORDER_STATE_REQUEST_MODIFY=8,//Order is being modified (changing its parameters)
ORDER_STATE_REQUEST_CANCEL=9//Order is being deleted (deleting from the trading system)
}
publicenumENUM_ORDER_TYPE_FILLING
{
ORDER_FILLING_FOK=0,
ORDER_FILLING_IOC=1,
ORDER_FILLING_RETURN=2
}
publicenumENUM_ORDER_TYPE_TIME
{
ORDER_TIME_GTC=0,
ORDER_TIME_DAY=1,
ORDER_TIME_SPECIFIED=2,
ORDER_TIME_SPECIFIED_DAY=3
}
publicenumENUM_ORDER_REASON
{
ORDER_REASON_CLIENT=0,//The order was placed from a desktop terminal
ORDER_REASON_MOBILE=1,//The order was placed from a mobile application
ORDER_REASON_WEB=2,//The order was placed from a web platform
ORDER_REASON_EXPERT=3,//The order was placed from an MQL5-program, i.e. by an Expert Advisor or a script
ORDER_REASON_SL=4,//The order was placed as a result of Stop Loss activation
ORDER_REASON_TP=5,//The order was placed as a result of Take Profit activation
ORDER_REASON_SO=6//The order was placed as a result of the Stop Out event
}
#endregion//Order Properties
#regionPositionProperties
publicenumENUM_POSITION_PROPERTY_INTEGER
{
POSITION_TICKET=17,//Position ticket
POSITION_TIME=1,//Position open time
POSITION_TIME_MSC=14,//Position opening time in milliseconds since 01.01.1970
POSITION_TIME_UPDATE=15,//Position changing time in seconds since 01.01.1970
POSITION_TIME_UPDATE_MSC=16,//Position changing time in milliseconds since 01.01.1970
POSITION_TYPE=2,//Position type
POSITION_MAGIC=12,//Position magic number
POSITION_IDENTIFIER=13,//Position identifier is a unique number that is assigned to every newly opened position and doesn't change during the entire lifetime of the position. Position turnover doesn't change its identifier.
POSITION_REASON=18//The reason for opening a position
}
publicenumENUM_POSITION_PROPERTY_DOUBLE
{
POSITION_VOLUME=3,//Position volume
POSITION_PRICE_OPEN=4,//Position open price
POSITION_SL=6,//Stop Loss level of opened position
POSITION_TP=7,//Take Profit level of opened position
POSITION_PRICE_CURRENT=5,//Current price of the position symbol
POSITION_COMMISSION=8,//FIXME: Undocumented!
POSITION_SWAP=9,//Cumulative swap
POSITION_PROFIT=10//Current profit
}
publicenumENUM_POSITION_PROPERTY_STRING
{
POSITION_SYMBOL=0,//Symbol of the position
POSITION_COMMENT=11//Position comment
}
publicenumENUM_POSITION_TYPE
{
POSITION_TYPE_BUY=0,//Buy
POSITION_TYPE_SELL=1//Sell
}
publicenumENUM_POSITION_REASON
{
POSITION_REASON_CLIENT=0,//The position was opened as a result of activation of an order placed from a desktop terminal
POSITION_REASON_MOBILE=1,//The position was opened as a result of activation of an order placed from a mobile application
POSITION_REASON_WEB=2,//The position was opened as a result of activation of an order placed from the web platform
POSITION_REASON_EXPERT=3//The position was opened as a result of activation of an order placed from an MQL5 program
}
#endregion//Position Properties
#regionDealProperties
publicenumENUM_DEAL_PROPERTY_INTEGER
{
DEAL_TICKET=15,//Deal ticket. Unique number assigned to each deal
DEAL_ORDER=1,//Deal order number
DEAL_TIME=2,//Deal time
DEAL_TIME_MSC=13,//The time of a deal execution in milliseconds since 01.01.1970
DEAL_TYPE=3,//Deal type
DEAL_ENTRY=4,//Deal entry - entry in, entry out, reverse
DEAL_MAGIC=11,//Deal magic number
DEAL_REASON=16,//The reason or source for deal execution
DEAL_POSITION_ID=12//Identifier of a position
}
publicenumENUM_DEAL_PROPERTY_DOUBLE
{
DEAL_VOLUME=5,//Deal volume
DEAL_PRICE=6,//Deal price
DEAL_COMMISSION=7,//Deal commission
DEAL_SWAP=8,//Cumulative swap on close
DEAL_PROFIT=9//Deal profit
}
publicenumENUM_DEAL_PROPERTY_STRING
{
DEAL_SYMBOL=0,//Deal symbol
DEAL_COMMENT=10,//Deal comment
DEAL_EXTERNAL_ID=14//Deal identifier in an external trading system (on the Exchange)