Dimka-novitsek: Good day! If I write Buffer1[0]=Close[i] inside of a chart which is located on a certain pair, say Eurodollar, I get the price of this pair. But if I want to share with Close[i] another pair, say, GBPUSD?
2) but why is it needed in this task in principle? Just save 1/2/3 in Cls_ and write:
1) Can't set can't describe array correctly - gives error. Especially just can't - as [i] is related to magicians and closing orders... It's just - it gets cumbersome... I want it to look nice.
In words: Opn [i] - we open an order with MagNum [i+10]
if there is an order with MagNum [i+10] - then Cl [i]
Who could have doubted it... It should have been clear as day in my opinion. :-)))
I helped you in your research to come to THIS decision.
I wonder what was supposed to be "clear as day" on the basis of? Roman, thanks for your help - but it turned out to be a Sisyphean task - a waste of time, and not a small one at that. If you knew for sure that it was not working, I think you could have said at once, without holding back: I would have spent this time on researching other options. As it is, a couple of months is wasted.
In words: Opn [i] - open an order with MagNum [i+10].
if there is an order with MagNum [i+10] - then Cl [i]
Cl [i] - close Lot/(4-i) from i=1 to i=3
do not understand anything)
if there is an order with MagNum [i+10] - then Cl [i].
Cl [i] what? after "that" there should be a description of what should be executed (i.e., body of if statement), and Cl [i] is just a variable. it should be an operation with a variable/
you're told to write in words what you want. i.e. the gist of actions in russian. what's being done and why.
// создаем массив Cl из 4 элементов (с 0 по 3)
bool Cl[4];
for (int i = 1; i<=3; i++)
Cl[i] = false;
..бла-бла-бла..
// возникло условие, что 2 ордер надо закрыть
Сl[2] = true;
..бла-бла-бла..
// проверка условий закрытия ордеров
for (int i = 1; i<=3; i++)
if (Cl[i])
{
LotCt=NormalizeLot(OrderLots()/(4-i));
Cl[i] = false; }
volshebnik: I wonder on what basis it should have been "clear as day"? Roman, thanks for your help - but it turned out to be a Sisyphean task - a waste of time, and not a small one at that. If you knew for sure that it was not working, I think you could have said at once, without holding back: I would have spent this time on researching other options. But now you've wasted a couple of months.
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.
Good day! If I write Buffer1[0]=Close[i] inside of a chart which is located on a certain pair, say Eurodollar, I get the price of this pair. But if I want to share with Close[i] another pair, say, GBPUSD?
1) How you set up the Cls_ array
2) but why is it needed in this task in principle? Just save 1/2/3 in Cls_ and write:
1) Can't set can't describe array correctly - gives error. Especially just can't - as [i] is related to magicians and closing orders... It's just - it gets cumbersome... I want it to look nice.
In words: Opn [i] - we open an order with MagNum [i+10]
if there is an order with MagNum [i+10] - then Cl [i]
Cl [i] - close Lot/(4-i) from i=1 to i=3
Who could have doubted it... It should have been clear as day in my opinion. :-)))
I helped you in your research to come to THIS decision.
100yan:
In words: Opn [i] - open an order with MagNum [i+10].if there is an order with MagNum [i+10] - then Cl [i]
Cl [i] - close Lot/(4-i) from i=1 to i=3
do not understand anything)
if there is an order with MagNum [i+10] - then Cl [i].
Cl [i] what? after "that" there should be a description of what should be executed (i.e., body of if statement), and Cl [i] is just a variable. it should be an operation with a variable/
you're told to write in words what you want. i.e. the gist of actions in russian. what's being done and why.
Cl [i] - close Lot/(4-i) from i=1 to i=3
// создаем массив Cl из 4 элементов (с 0 по 3) bool Cl[4]; for (int i = 1; i<=3; i++) Cl[i] = false; ..бла-бла-бла.. // возникло условие, что 2 ордер надо закрыть Сl[2] = true; ..бла-бла-бла.. // проверка условий закрытия ордеров for (int i = 1; i<=3; i++) if (Cl[i]) { LotCt=NormalizeLot(OrderLots()/(4-i)); Cl[i] = false; }Is this the kind of thing you want?I wonder on what basis it should have been "clear as day"? Roman, thanks for your help - but it turned out to be a Sisyphean task - a waste of time, and not a small one at that. If you knew for sure that it was not working, I think you could have said at once, without holding back: I would have spent this time on researching other options. But now you've wasted a couple of months.
...And experience is the son of mistakes...
How do I turn off a MetaTrader that has glitched?
Kill it from the processes... what's easier
Is this the kind of thing you want?
Thanks for the example! I'll try to implement...