That's right. I still can't understand the use of this code:
//+----------------------------------------------------------------------------+//| Автор : Ким Игорь В. aka KimIV, http://www.kimiv.ru |//+----------------------------------------------------------------------------+//| Версия : 19.02.2008 |//| Описание : Возвращает тип последней открытой позиции или -1 |//+----------------------------------------------------------------------------+//| Параметры: |//| sy - наименование инструмента ("" - любой символ, |//| NULL - текущий символ) |//| mn - MagicNumber (-1 - любой магик) |//+----------------------------------------------------------------------------+int GetTypeLastOpenPos(string sy="", int mn=-1) {
datetime t;
int i, k=OrdersTotal(), r=-1;
if (sy=="0") sy=Symbol();
for (i=0; i<k; i++) {
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
if ((OrderSymbol()==sy || sy=="") && (mn<0 || OrderMagicNumber()==mn)) {
if (OrderType()==OP_BUY || OrderType()==OP_SELL) {
if (t<OrderOpenTime()) {
t=OrderOpenTime();
r=OrderType();
}
}
}
}
}
return(r);
}
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
if(B_1 > B_2 && B_1 > B_3) { Key = Buy_Key; }Is that part of the code wrong?Is this part of the code wrong?
You complained that you cannot use functions from Igor Kim.
This part of the code is not wrong, but you can make it work an order of magnitude faster. But this does not concern your problem.
I still can't understand the use of this code:
.
That's right.
Still can't understand the use of this code:
.
How are you trying to use it? Give me the code.
That's right.
Still can't understand the use of this code:
.
How are you trying to use it? Give me the code
A little above.
Do you not know how the functions are used in general or is this function not understood specifically?
I don't understand this particular function.
Which variable in it is responsible for issuing the order type?
A little higher.
I don't understand this particular function.
Which variable in it is responsible for issuing the order type?
And where is the function itself (in your code)?
I opened a demo account $ 5000, lost 950, have a balance of $ 4050, but can not open orders (Dice and Buy) do not function What do I do?
It may be a day off.
Where is the function itself (in your code)?
That's the thing, I don't know which side to put it in. :)