[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 294

 
Roman.:

Don't sweat it, BUT GRAIL it and fall it in the Villagers branch ! :-)

Everything has long since been stolen, ugh, manufactured, before you Kim I.V. - plug this f-you. Read it and take it - all of it.

was that sarcasm about the grail?
 
GarKain:
Was that sarcasm about the grail?
No.
 
Roman.:
No.

I don't like to rework someone else's stuff, it's easier to do it myself. I don't know what value to take to know the number of open orders.

 
GarKain:

I don't like to rework someone else's stuff, it's easier to do it yourself.

I do not know what value to take to find out the number of open orders.
 
Roman.:
Learn to work with the functions.
even in its pure form, if it is inserted separately in a new script, the copyist swears. rrrrr. what's the matter
 
GarKain:

1. even in its pure form, if it is inserted separately in a new script, the copyeditor will swear.

2.rrrrr. what is it

1. Read the tutorial in its entirety and the DOCUMENTATION (see all the keys at the top left of the website), learn how to work with functions, not only on this site - google it, then come out on the forum.

2. Because it's a function and it has to be CONNECTED to your EA in a certain place in its code.

 
Can you please tell me how to deal with a C drive overflow resulting from the Expert Advisor's "logs" folder overflowing to 100GB or more in a short period of time? I'm deleting the entries manually for now.
 
yosuf:
Could you please tell me how to deal with a C drive overflow resulting from the Expert Advisor's "logs" folder overflowing to 100GB or more in a short period of time? So far, I delete records manually.
Among other things, edit (optimize) the exp code. It contains a lot of errors + reduce variable value reprintering.
 
GarKain:

I don't like to rework someone else's stuff, it's easier to do it myself. I don't know what value to take to know the number of open orders.

Here are a couple of examples of order searching. Example 1: search for how many open and pending orders we have, if we have e.g. 5, the code below is not executed. Example 2: we search for the amount of open and pending orders of GBPUSD, the Stop Loss orders are not calculated. It is important that this part of the code is placed before the positions are opened.

//--- 1 start
extern int prot=5;
//---
int quantity=0;
if (OrdersTotal()>0)
{  for (int i=OrdersTotal()-1; i>=0; i--)
   {  if (OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
      quantity+=quantity;
   }
}
if (quantity>=prot) return(0);
//--- 1 end

//--- 2 start
extern int prot=5;
//---
int quantity=0;
if (OrdersTotal()>0)
{  for (int i=OrdersTotal()-1; i>=0; i--)
   {  if (OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
      if (OrderStopLoss()!=0) continue;
      if (OrderSymbol()=="GBPUSD")
      {
      quantity+=quantity;
      }
   }
}
if (quantity>=prot) return(0);
// --- 2 end
 
GarKain:

something's not working for me

bool Other=false;
int total=OrdersTotal();
if (total=0){ Other=true;

}


the compiler swears

At the point where the expression is checked, it should be "==", not an assignment
Reason: