[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 457

 

I'm writing here as I'm sitting in a stupor. Question from a sucker: the bot was working, mooching money, and suddenly one procedure died! Attached to it Print..., to check how it counts, still gives 0)))) although the last pr-variable is passed to the procedure exactly NOT NULL!!! Can you tell me where the glitch is!

void ClosePosBySizeProfitInPercent(string sy="", int op=-1, int mn=-1, double pr=0) {
  int i, k=OrdersTotal();
  double score;

  if (sy=="0") sy=Symbol();
  for (i=k-1; i>=0; i--) {
    if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
      if ((OrderSymbol()==sy || sy=="") && (op<0 || OrderType()==op)) {
        if (OrderType()==OP_BUY || OrderType()==OP_SELL) {
          if (mn<0 || OrderMagicNumber()==mn) {
            score=score+(OrderProfit()+OrderSwap());
          }
        }
      }
    }
  }
  score=100/AccountBalance()*score;
  Print("попытка закрытся ",  score, ">", pr);
  k=OrdersTotal();
  if (score>pr)
     for (i=k-1; i>0; i--) {
       if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
         if ((OrderSymbol()==sy || sy=="") && (op<0 || OrderType()==op)) {
           if (OrderType()==OP_BUY || OrderType()==OP_SELL) {
             if (mn<0 || OrderMagicNumber()==mn) {
               ClosePosBySelect();
             }
           }
         }
       }
     }
}
 
semiromid:


It's for you.

I didn't ask you anything! And I thought I told you not to answer. Don't you know what I'm saying?

You don't seem to know where you are or who you're talking to. I think a week's ban will give you a chance to think about your behaviour.
 
semiromid:

Am I wrong? So it's OK for the moderators to flub? Insult and bully people?
A month's ban.
 
semiromid:

What's taking so long? Haha, you don't know how to ban? ))

You could've just blurted it out in private!!!

You'll get there. Punishment is strong in its inevitability, not its severity.
If you had read the rules carefully, you would know that for arguing with the moderator there is a ban, as in all forums.
Moreover, in the rules is Section 4.2 If you do not agree with these rules, you are free to find a more appropriate resource .
 
semiromid:

At least I'll know who got banned)

It would be more logical to consider how to behave so that you don't have to apply the ban.
 
semiromid:

It would have been more logical to write to me in a PM, rather than flubbing in the thread.


Dear commoner, there are two kinds of users on this forum - a regular user and a moderator.

A moderator can't just walk past your shitting in the threads. Therefore it is not worth asking him and shutting him up.

You are behaving inadequately. Sometimes in your posts you have absolutely no idea what you're asking and as a result you behave very aggressively like a haggard schoolboy.
Any help that you don't understand is considered a personal insult and bullying. You send everyone and even moderators away.
You say you want to read threads without flooding, yet you yourself make snarky outbursts off-topic.

I don't think you understand that this resource was not created specifically for you and your personal needs. No one here is obligated to teach you, much less do it for free. I take it you hope to squeeze out any information you want, while throwing stones at people around you. And spamming all the threads with your questions.

Personally, I don't think even a month's ban is enough for you. You need to learn to be polite and discreet. And not think everyone here is as morally immature as you are. But it's better not to do it on this resource.

 
demlin:
It's not going to be enough(((.

See here - it's definitely all there...
 
Roman.:

See here - it's definitely all there...
Thank you!
 
Abraxass:

I'm writing here as I'm sitting in a stupor. Question from a sucker: the bot was working, mooching money, and suddenly one procedure died! Attached to it Print..., to check how it counts, still gives 0)))) although the last pr-variable is passed to the procedure exactly NOT NULL!!! Can you tell me where the glitch is!


To be sure

Put Print() where function ClosePosBySizeProfitInPercent("0", -1, Magic, VashParametrPR) is called; before it.

 
I'm trying to write my first EA... Please tell me how to fix Ask by declaring it with a variable, and it must be global because it must be taken by every special function ....... Help me please)))