COrdersCounter – библиотека для метатрейдера 4

0
(0)

COrdersCounter - библиотека для метатрейдера 4

Алексей Лопатин | Английский

Взгляды:
395
Рейтинг:

голоса: 9

\MQL4\Include\

Descripition:

The class COrdersCounter was developed for counting of the orders with different filters: по символу валюты, Магическое число, либо закрыто, либо открытые ордера.

Below is description of the public methods of this class.

Constructors:

Метод Описание
COrdersCounter(void) Constructor by default.
COrdersCounter(внутренняя магия, string symbol, int counter_mode = MODE_TRADES) Параметры:магия - integer value of Magic Number for for the filtering of the orders. When magic = 0 не используется.

символ - symbol of the instrument. When symbol = "" не используется.

counter_mode - the pool of the orders (либо закрыто, либо открытые ордера). Allows 2 ценности: MODE_TRADES (по умолчанию) - opened orders, MODE_HISTORY - closed orders.

Methods:

Метод Описание
void refreshData(void) The method renews data for orders. This method must called before the calling getOrdersCount(), getTotalProfit(), getMarketVolume(), getTotalVolume().
int getOrdersCount(int type) The method returns orders count of defined type. Параметры:
тип - type of the orders. Allowed values:
OP_BUY - market buy orders,
OP_SELL - market sell orders,
OP_SELLLIMIT - sell limit orders,
OP_BUYLIMIT - buy limit orders,
OP_SELLSTOP - sell stops orders,
OP_BUYSTOP - buy stop orders.
When type = -1, the method will return total count of all orders.
int getLastOrder() Returns ticket number of last closed/opened order from the retrieved list.
int getFirstOrder() Returns ticket number of first closed/opened order from the retrieved list.
ProfitData getTotalProfit() Returns an instance of the struct ProfitData, containing total profit/loss of the retrieved list.The struct ProfitData contains fields:

double currency - profit/loss in currency
double points - profit/loss in points

double getMarketVolume() Returns the total volume of the market trades of the retrieved list.
double getTotalVolume() Returns the total volume for all orders of of the retrieved list.
void setMagicNumber(внутренняя магия) Sets Magic Number ценить. Параметры: магия - new value for Magic Number.
void setSymbol(string symbol) Sets Symbol value. Параметры: символ - new symbol value of currency.
void setMode(int mode) Set pool. Параметры: режим - the pool type: MODE_TRADES - opened orders, MODE_HISTORY - closed orders.
int getMagicNumber() Returns value of magic (Магическое число) for the filtering of the orders.
string getSymbol() Returns value of symbol.
int getMode() Return type of current pool for orders filtering: MODE_TRADES - opened orders, MODE_HISTORY - closed orders.

Насколько полезным был этот пост?

Нажмите на звездочку, чтобы оценить!

Средний рейтинг 0 / 5. Подсчет голосов: 0

Голосов пока нет! Будьте первым, кто оценит этот пост.

Сожалеем, что этот пост не оказался для вас полезным!

Давайте улучшим этот пост!

Расскажите нам, как мы можем улучшить этот пост?



Автор: Команда Форекс Вики
Мы команда опытных трейдеров Forex. [2000-2023] которые посвящены жизни на наших собственных условиях. Наша основная цель - достижение финансовой независимости и свободы, и мы занимались самообразованием и приобрели обширный опыт на рынке Forex, чтобы достичь самодостаточного образа жизни..