COrdersCounterlibrary for MetaTrader 4

0
(0)

COrdersCounter - library for MetaTrader 4

Alexey Lopatin | Engels

Uitsigte:
395
Gradering:

stemme: 9

\MQL4\Include\

Descripition:

The class COrdersCounter was developed for counting of the orders with different filters: by symbol of currency, Magiese nommer, either closed, either opened orders.

Below is description of the public methods of this class.

Constructors:

Metode Beskrywing
COrdersCounter(void) Constructor by default.
COrdersCounter(int magic, string symbol, int counter_mode = MODE_TRADES) Grense:towerkuns - integer value of Magic Number for for the filtering of the orders. When magic = 0 is not used.

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

counter_mode - the pool of the orders (either closed, either opened orders). Allows 2 values: MODE_TRADES (by verstek) - opened orders, MODE_HISTORY - closed orders.

Methods:

Metode Beskrywing
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. Grense:
tipe - type of the orders. Allowed values:
OP_KOOP - market buy orders,
OP_VERKOOP - 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 value. Grense: towerkuns - new value for Magic Number.
void setSymbol(string symbol) Sets Symbol value. Grense: symbol - new symbol value of currency.
void setMode(int mode) Set pool. Grense: wyse - the pool type: MODE_TRADES - opened orders, MODE_HISTORY - closed orders.
int getMagicNumber() Returns value of magic (Magiese nommer) 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.

Hoe nuttig was hierdie pos nie?

Klik op 'n ster om dit te gradeer!

Gemiddelde gradering 0 / 5. Stemmetelling: 0

Geen stemme tot dusver nie! Wees die eerste om hierdie plasing te beoordeel.

Ons is jammer dat hierdie plasing nie vir jou nuttig was nie!

Kom ons verbeter hierdie pos!

Vertel ons hoe ons hierdie pos kan verbeter?



Skrywer: Forex Wiki-span
Ons is 'n span hoogs ervare Forex Handelaars [2000-2023] wat daaraan toegewy is om die lewe op ons eie terme te leef. Ons primêre doelwit is om finansiële onafhanklikheid en vryheid te verkry, en ons het selfonderrig nagestreef en uitgebreide ondervinding in die Forex-mark opgedoen as ons manier om 'n selfvolhoubare leefstyl te bereik.