Пример #1
0
        /// <summary>
        ///     The function selects an order for further processing. It returns TRUE if the function succeeds. It returns FALSE if the function fails. To get the error information, one has to call the GetLastError() function.
        /// </summary>
        /// <param name="handler"></param>
        /// <param name="index">Order index or order ticket depending on the second parameter.</param>
        /// <param name="select">
        ///     Selecting flags. It can be any of the following values:
        ///     SELECT_BY_POS - index in the order pool,
        ///     SELECT_BY_TICKET - index is order ticket.
        /// </param>
        /// <param name="pool">
        ///     Optional order pool index. Used when the selected parameter is SELECT_BY_POS. It can be any of the following values:
        ///     MODE_TRADES (default)- order selected from trading pool(opened and pending orders),
        ///     MODE_HISTORY - order selected from history pool (closed and canceled order).
        /// </param>
        /// <returns></returns>
        public static bool OrderSelect(this MqlHandler handler, int index, SELECT_BY select,
                                       POOL_MODES pool = POOL_MODES.MODE_TRADES)
        {
            string retrunValue = handler.CallMqlMethod("OrderSelect", index, (int)select, (int)pool);

            return(Convertor.ToBoolean(retrunValue));
        }
Пример #2
0
        public bool OrderSelect(int index, SELECT_BY select, POOL_MODES pool = POOL_MODES.MODE_TRADES)
        {
            if (!TradingFunctions.OrderSelect(this, index, select, pool))
            {
                ThrowLatestException();
                return(false);
            }

            return(true);
        }
Пример #3
0
        public bool OrderSelect(int index, SELECT_BY select, POOL_MODES pool = POOL_MODES.MODE_TRADES)
        {
            if (!TradingFunctions.OrderSelect(this, index, select, pool))
            {
                ThrowLatestException();
                return false;
            }

            return true;
        }
Пример #4
0
 public static bool OrderSelect(this MqlHandler handler, int index, SELECT_BY select, POOL_MODES pool = POOL_MODES.MODE_TRADES)
 {
     return(Convertor.ToBoolean(handler.CallMqlMethod("OrderSelect", (object)index, (object)select, (object)pool)));
 }
Пример #5
0
 public static bool OrderSelect(this MqlHandler handler, int index, SELECT_BY select, POOL_MODES pool = POOL_MODES.MODE_TRADES)
 {
     return Convertor.ToBoolean(handler.CallMqlMethod("OrderSelect", (object) index, (object) select, (object) pool));
 }
Пример #6
0
        /// <summary>
        /// The function selects an order for further processing. It returns TRUE if the function succeeds. It returns FALSE if the function fails. To get the error information, one has to call the GetLastError() function.
        /// </summary>
        /// <param name="handler"></param>
        /// <param name="index">Order index or order ticket depending on the second parameter.</param>
        /// <param name="select">Selecting flags. It can be any of the following values:
        ///SELECT_BY_POS - index in the order pool,
        ///SELECT_BY_TICKET - index is order ticket.</param>
        /// <param name="pool">	Optional order pool index. Used when the selected parameter is SELECT_BY_POS. It can be any of the following values:
        ///MODE_TRADES (default)- order selected from trading pool(opened and pending orders),
        ///MODE_HISTORY - order selected from history pool (closed and canceled order).</param>
        /// <returns></returns>
        public static bool OrderSelect(this MqlHandler handler, int index, SELECT_BY select, POOL_MODES pool = POOL_MODES.MODE_TRADES)
        {
            string retrunValue = handler.CallMqlMethod("OrderSelect", index, (int)select, (int)pool);

            return Convertor.ToBoolean(retrunValue);
        }