Useful features from KimIV - page 125

 
borilunad:
Artem and Renat don't need sixes!
Which of them have you already offered your services to?
 
borilunad:

Is this true?! "... then the terminal is slowed down so you can't make money..."

It was just about the tester, and the rest is not my words at all. Another fake 6-tenner!

Hello businessmen with conclusions!

Where is it:

"...Here's a thank you for your efforts to help... Everyone's a bastard, stalking and hindering you... ...they slow down the terminal so you can't make money, they only give advice for money... I have never met anyone in my 60 years of life, but this is the first time I've seen anything like this..."

he's saying the terminal's being deliberately slowed down to make money?

That's a picture of you. Plus he gave me some sympathy.

I don't understand you at all...

 
artmedia70:

Why not? The programmer. I like his logic, but that's how I would have written the order counting function:

//+------------------------------------------------------------------+
int NumberTradesOrders(string sy, int op, int mn) {
   int num=0;
   for(i=OrdersTotal()-1; i>=0; i--) {
      if(OrderSelect(i,SELECT_BY_POS)) {
         if(OrderMagicNumber()!=mn) continue;   // для тестера можно удалить
         if(OrderSymbol()!=sy)      continue;   // для тестера можно удалить
         if(OrderType()!=op)        continue;
         num++;
         }
      }
   return(num);
}
//+------------------------------------------------------------------+

I'm getting off-topic here - here's a thought. For both of the above implementations.

What will happen if OrderSelect() returns false for some orders for some reason?

The value calculated will not be trustworthy, right?

And what if it returns false for all the orders? In general, it will say that there are no orders with such characteristics and the "top" logic that has called NumberTradesOrders() will happily start opening new ones since there are no orders?

The idea is that we should foresee these error situations and return the "failed to calculate" sign in such cases, i.e. there is no such number since we were unable to calculate it.

And the "upper" code should check this sign and build its logic accordingly.

 
simpleton:

There's some off-topic swearing going on - here's a thought. For both of the above implementations.

What happens if OrderSelect() returns false for some orders for some reason?

The value calculated will not be trustworthy, right?

And what if it returns false for all the orders? In general, it will say that there are no orders with such characteristics and the "top" logic that has called NumberTradesOrders() will happily start opening new ones since there are no orders?

The idea is that we should foresee these error situations and return the "failed to calculate" sign in such cases, i.e. there is no such number since we were unable to calculate it.

And the "upper" code must check this sign and build its logic accordingly.

I have deliberately made if(OrderSelect(i,SELECT_BY_POS)) a separate block. It is intended to return the error value during debugging. else {// write the selection error as you like and return the error value, for example EMPTY}.

And let's think of a situation where there is an error of selecting an order to be placed in the market. Let's discuss it. I haven't encountered one yet.

 
simpleton:

What happens if for some orders OrderSelect() returns false for whatever reason?

And name one reason why a correctly created order loop might return "false".

Oops, didn't notice Artem already asked, oops. And yet.

 
borilunad:
........ .... ....!
Boris, you are wrong.
The guys are trying to help both you and others, while being quite correct. And you seem overly irritable and incontinent here.
I don't think you notice that.
 

Victor, I am not a programmer, but a user, but with interest I develop and implement my ideas for the effectiveness of my programs. Everyone has their own vision, their own style, their own manner. I have learned a lot, thanks and help from the guys. But when I state the facts of tester's braking due to the presence of a custom indicator call in the Expert Advisor since the 711th build, they insist on proof, demand logs! And this at a time when I have already replaced the custom indicators with the staff ones, and my mind is already focused on other tasks.

I'm not interested in problems, I bypass them and do my own thing. But I did demonstrate to them, but they didn't react in any way, because they didn't see what they wanted. After waiting 24 hours, I deleted the excess as I saw fit, leaving only the lines relating to the indicator call and the time spent on the annual comparison runs! Above you can see and see for yourself!

For me programming is a means to market. I don't pretend to work in the marketplace, nor do I need it. Programmers may have great goals, but it is my irritation and intemperance is provoked by their insistence and a certain amount of unflattering expressions addressed to me!

 
Boris, why don't you show them an example of restraint? I've been training for a long time, but I've learned to restrain myself. It seems...
 
granit77:
Boris, why don't you show them an example of restraint? I've been training for a long time, but I've learned to hold back. It seems...
We all learn everything if we want to, and if we can show an example of tester's restraint, I can also restrain myself without showing it to anyone. At least in a way that makes it seem...
 
granit77:
Boris, why don't you show them an example of restraint? I've been training for a long time, but I've learned to restrain myself. It seems...
Get into his position. Life in a foreign land, far from your homeland, doesn't go away. You get irritable, angry at yourself for making the irreparable mistake of being a migrant worker.)