Unisciti alla nostra fan page
LastOrder - libreria per MetaTrader 4
- Visualizzazioni:
- 11641
- Valutazioni:
- Pubblicato:
- 2014.09.09 08:32
- Aggiornato:
- 2017.03.30 13:11
- Hai bisogno di un robot o indicatore basato su questo codice? Ordinalo su Freelance Vai a Freelance
The header file contains functions for searching last and previous order in the trade pool.
The functions list:
Function | Short description of the function |
---|---|
int get_last_order( int magic, int type = -1, int mode = MODE_TRADES ) | get_last_order() returns ticket number of the last order. The function returns -1 value when it havent found last order. Arguments: magic - Magic Number ID filtering orders. When 0 it is not used. type - type order (buy, sell, sell limit, buy limit, sell stop, buy stop) for filtering orders. mode - pool of orders: MODE-TRADES - trade orders, MODE_HISTORY - closed orders. |
int get_first_order( int magic, int type = -1, int mode = MODE_TRADES ) | get_first_order() returns ticket number of the first order. The function returns -1 value when it havent found first order. Arguments: magic - Magic Number ID filtering orders. When 0 it is not used. type - type order (buy, sell, sell limit, buy limit, sell stop, buy stop) for filtering orders. mode - pool of orders: MODE-TRADES - trade orders, MODE_HISTORY - closed orders. |
double order_lots( int ticket, int mode = MODE_TRADES ) | order_lots() returns trade volume by ticket number. Arguments: ticket - ticket number of the order. mode - pool of orders: MODE-TRADES - trade orders, MODE_HISTORY - closed orders. |
string order_comment( int ticket, int mode = MODE_TRADES ) | order_comment() returns string comment of the order by ticket number. Arguments: ticket - ticket number of the order. mode - pool of orders: MODE-TRADES - trade orders, MODE_HISTORY - closed orders. |
int order_type( int ticket, int mode = MODE_TRADES ) | order_type() returns type of the order by ticket number. Arguments: ticket - ticket number of the order. mode - pool of orders: MODE-TRADES - trade orders, MODE_HISTORY - closed orders. |
double order_open_price( int ticket, int mode = MODE_TRADES ) | order_open_price() returns open price of the order by ticket number. Arguments: ticket - ticket number of the order. mode - pool of orders: MODE-TRADES - trade orders, MODE_HISTORY - closed orders. |
double order_close_price( int ticket, int mode = MODE_TRADES ) | order_close_price() returns close price of the order by ticket number. Arguments: ticket - ticket number of the order. mode - pool of orders: MODE-TRADES - trade orders, MODE_HISTORY - closed orders. |
datetime order_open_time( int ticket, int mode = MODE_TRADES ) | order_open_time() returns open time of the order by ticket number. Arguments: ticket - ticket number of the order. mode - pool of orders: MODE-TRADES - trade orders, MODE_HISTORY - closed orders. |
datetime order_close_time( int ticket, int mode = MODE_TRADES ) | order_close_time() returns close time of the order by ticket number. Arguments: ticket - ticket number of the order. mode - pool of orders: MODE-TRADES - trade orders, MODE_HISTORY - closed orders. |
int close_by( int ticket, int mode = MODE_TRADES ) | close_by() returns the trigger of closing the order:by takeprofit (1), by stoploss (-1), manual(0).It is defined based on comment of the order. Arguments: ticket - ticket number of the order. mode - pool of orders: MODE-TRADES - trade orders, MODE_HISTORY - closed orders. |
int close_by2( int ticket, int mode = MODE_TRADES ) | close_by2() returns the trigger of closing the order:by takeprofit (1), by stoploss (-1), manual(0). It is defined based on the close price and open price of the order. Arguments: ticket - ticket number of the order. mode - pool of orders: MODE-TRADES - trade orders, MODE_HISTORY - closed orders. |
int orders_count( int magic, int type = -1, string comment = "" ) | orders_count() returns the count of the opened orders. Arguments: magic - Magic Number ID filtering orders. When 0 it is not used. type - orders type (buy, sell, sell limit, buy limit, sell stop, buy stop) for filtering orders. When -1 is not used. comment - comment string of the orders. When "" (empty) is not used. |
Tradotto dal russo da MetaQuotes Ltd.
Codice originale https://www.mql5.com/ru/code/11816
The simple class for counting of the orders with different filters: by symbol of currency, Magic Number, either closed, either opened orders.
RobotiADXwiningExpert Advisor work with one hour chart, and is the best robot for now, plays a sound when orders/alarms are executed and multiply positions by 10 when 5 digits is true, trailing stops every tick regardless of Execution Mode.
A tool to better visualize price action using a higher timeframe.
NetFlowsThe indicator computes the volume-adjusted flow of a currency considering all currency pairs available on your platform.