Help me learn how to program. - page 10

 
Nikolay Mitrofanov:

Yeah. TS.

Yes. And that's harshly put out by the lack of expert development experience in MT5.

 
Dmitry Fedoseev:

Forget your name, what's it to me? And you weren't answering to me either)))

You'd better not forget yours. Judging by your answers, you are in Narnia)

 
Dmitry Fedoseev:

Yes. And it's harshly scribbled out by the lack of expert development experience in MT5.

Ahahahahahaha, oohohohohohoho))))))

So here's the thing. You fear for your reputation as a programmer. Ok) I'm an inexperienced youngster who got into an argument between the Great Dimitri and everyone else. Dimitri feels like he's being pushed around and immediately attacks indiscriminately, shoving poo all over the place. Then he licks his tiny fingers and with a crazy laugh of a winner sits down to write his programs and scripts with these victorious smelly fingers, using 8 year experience)))) What a hero!


Okay. Good luck in promoting your crafts and all the rest of your programming. You'll all get it right someday.

 
Nikolay Mitrofanov:

Ahahahahahaha, oohohohohohohoh))))))

So that's what this is about. You fear for your reputation as a programmer. OK) I'm an inexperienced youngster who got into an argument between the Great Dimitri and everyone else. Dimitri feels like he's being pushed around and immediately attacks indiscriminately, shoving poo all over the place. Then he licks his tiny fingers and with a crazy laugh of a winner gets to write his programs and scripts with these victorious smelly fingers, using 8 years of experience)))) What a hero!


Okay. Good luck in promoting your crafts and all the rest of your programming. You'll all get it right one day.

No comment. I'll just immortalize it, I mean fix it.

 
Dmitry Fedoseev:
The very idea that the PositionsTotal() function can get a number from the broker every time is brilliant!

Ask your broker, get it.

The function takes it from the internal terminal state for the given pair, which is updated either upon the arrival of a new tick and call of the event handler, or (relevant for mql4) forcedly, by call of RefreshRates(). But it is called every time, the almighty compiler doesn't optimize anything there. The terminal caches, but this is different.

I hope that you handle errors, do you look smartly into _LastError at least sometimes?

 
Nikolay Mitrofanov:

What a joker you are)))

It's only natural that the function will call as many times as i needs to be compared.

The counter confirms it))

You're such a joker. You won't even be able to tell it's a joke.

The question was where does the PositionsTotal() function takes the value for comparison - gets the number each time from the broker or stores it somewhere in the terminal variables and is updated only at opening and closing.

It's just that there seems to be nowhere else to get redundancy, if there is any.

The question was of another kind: does the compiler optimize and cache the result of function calls in this case? That's why I cited not exactly PositionsTotal() but some function in the example to show you why this approach sucks. And further I've explained that I didn't focus my attention specially, because it's obvious! Do you read comments diagonally?

 
Tio Nisla:

The question was of a different kind: does the compiler optimize and cache the result of function calls in this case? Well, by the number of calls I cited not exactly PositionsTotal(), but some function in the example, showing why this approach sucks. And further I've explained that I didn't focus my attention specially, because it's obvious! Do you read comments diagonally?

"Caches" is the only word you know? There was no such question. The question was about something else, and the answer was somewhere on the 3rd or 4th page, and there is even such an answer, that one can burst with laughter, or burn with shame, depending on personal beliefs.

And just what function matters. But not for you... apparently...

 
Tio Nisla:

The question was of a different kind: does the compiler optimize and cache the result of function calls in this case? Well, by the number of calls I cited not exactly PositionsTotal(), but some function in the example, showing why this approach sucks. And further I've explained that I didn't focus my attention specially, because it's obvious! Do you read comments diagonally?

You don't know if it's caching or not. If it's caching it's cool. I think that developers have worked it out, as it is so obvious for pro.

No, I read carefully, but I also can misunderstand something, because I am not an expert.

Thanks for the reply.

 
Nikolay Mitrofanov:

It's unclear whether it's caching or not. If it's caching, that's cool. I think that the developers have thought of this, since it is so obvious to the pros.

No, I read carefully, but I also can misunderstand something, because I am not an expert.

Thanks for the reply.

Yes, it's cool if it caches... But if someone else had at least a little understanding of what caching is and what the conversation was about in the first place.

 
Let's hear more about memory leaks... ...to go along with it... traditionally...
Reason: