訂單計數器 – MetaTrader 庫 4

0
(0)

訂單計數器 - MetaTrader 庫 4

阿列克謝·洛帕廷 | 英語

觀點:
395
評分:

選票: 9

\MQL4\Include\
corderscounter.mqh (16.46 知識庫)看法

Descripition:

The class 訂單計數器 was developed for counting of the orders with different filters: 按貨幣符號, 幻數, 要么關閉, 要么已打開訂單.

Below is description of the public methods of this class.

Constructors:

方法 描述
訂單計數器(void) Constructor by default.
訂單計數器(魔法, string symbol, int counter_mode = MODE_TRADES) 參數:魔法 - integer value of Magic Number for for the filtering of the orders. When magic = 0 is not used.

象徵 - symbol of the instrument. When symbol = "" is not used.

counter_mode - the pool of the 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(整型) 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(內部模式) 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] 致力於以我們自己的方式生活的人. 我們的主要目標是實現財務獨立和自由, 我們追求自我教育並在外匯市場上獲得豐富的經驗,以此作為實現自我可持續生活方式的手段.