COrdersCounter – メタトレーダー用ライブラリ 4

0
(0)

COrdersCounter - メタトレーダー用ライブラリ 4

Alexey Lopatin | 英語

ビュー:
395
評価:

投票: 9

\MQL4\Include\

Descripition:

The class COrdersCounter was developed for counting of the orders with different filters: by symbol of currency, マジックナンバー, either closed, either opened orders.

Below is description of the public methods of this class.

Constructors:

方法 説明
COrdersCounter(void) Constructor by default.
COrdersCounter(int magic, string symbol, int counter_mode = MODE_TRADES) パラメーター:魔法 - integer value of Magic Number for for the filtering of the orders. When magic = 0 使用されていません.

symbol - symbol of the instrument. When symbol = "" 使用されていません.

counter_mode - the pool of the orders (either closed, either opened orders). Allows 2 values: 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(int magic) Sets Magic Number 価値. パラメーター: 魔法 - new value for Magic Number.
void setSymbol(string symbol) Sets Symbol value. パラメーター: symbol - 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

これまでのところ投票はありません! この投稿を最初に評価してください.

この投稿が役に立たなかったことをお詫び申し上げます!

この投稿を改善しましょう!

この投稿を改善する方法を教えてください?



著者: 外国為替ウィキチーム
私たちは経験豊富な外国為替トレーダーのチームです [2000-2023] 自分の思いどおりに人生を生きることに専念している人. 私たちの主な目的は、経済的自立と自由を獲得することです, 私たちは自立可能なライフスタイルを実現する手段として、独学で外国為替市場での豊富な経験を積んできました。.