Self-learning the MQL5 language from scratch - page 83

 
SanAlex #:

I don't write them - I need ready-made functions, and the documentation is full of them. What functions I lack, I mould as I can, as long as it works the way I imagine it will.

Sasha, anyone with a ninth-grade education can use someone else's code. If you can't write your own, don't post anything. You do more harm than good with such codes.
 
SanAlex #:

I don't know what you mean? I did it myself with my own hands, what do you mean? the code is from the terminal but the method itself, how to implement the opening of several pairs in the tester, I have personally achieved the result.

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

show me in what place i took your code?

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

I sit at the terminal 24 hours a day, I copied everything for free - and I still get blamed for it. I share for free - not the way some people do.

Oh, Sasha ... First you say that you take the codes from documentation and CodeBase, then you say that you write them yourself, then you rewrite them... You can't make a pretty thing out of crap, it's been proven more than once ... but the opposite has been repeated many times.

Tell me where you got such a declaration of an array

int    ExtHandle[]= {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20};

and such a filling of an already filled array.

//---
   for(int i=0; i<20; i++)
     {
      ExtTrade.SetTypeFillingBySymbol(symb_name[i]);
      //--- Moving Average indicator
      ExtHandle[i]=iMA(symb_name[i],_Period,12,6,MODE_SMA,PRICE_CLOSE);
      if(ExtHandle[i]==INVALID_HANDLE)
        {
         printf("Error creating MA indicator");
         return(INIT_FAILED);
        }
     }
//---

Why did you have to declare it filled in if you will have to fill it in the loop... It's easier and more correct to declare the array int ExtHandle[21]; and that's all... you don't need anything else.

All the claims are that unsophisticated minds learn from these examples...

And the answer to the question...


And someone might think that most of this ***** is my work, not turning candy into shit...

 
Alexey Viktorov #:

Oh, Sasha... First you say that you take codes from documentation and CodeBase, then you say that you write them yourself, then you rewrite them... You cannot make a piece of shit, it has been proved many times... but the opposite has been repeated many times.

Tell me where you got such a declaration of an array

and such a filling of an already filled array.

Why did you have to declare it filled in if you have to fill it in the loop... It's easier and more correct to declare the array int ExtHandle[21]; and that's all... you don't need anything else.

All the claims are that unsophisticated minds learn from these examples...

And the answer to the question...


And one might think that most of this ***** is my job, not turning candy into shit...

And I don't see the problem.

Right. A filled array is declared, and then - it's filled again, with other data. In my opinion, quite an acceptable beginner's mistake.

And is it an error?

When I'm declaring variables and arrays, I MUST FILL them IMMEDIATELY. If at the moment of declaration the exact value is unknown, I fill it with knowingly invalid value. If a variable is declared without initialization and then used, it can contain random values, which will be used during work, and the result of this work will be incorrect and it will be very difficult to find the problem (I've found it more than once).

But if a variable is initialized with invalid value right at creation, in case of using uninitialized variable it will be immediately found out that it contains some rubbish, it will be easy to find where it came from and see that the variable was used without initialization.

So personally, I think that declaring an array already populated is good practice. Except that the values there should be WRONG_VALUE.

 
Alexey Viktorov #:


And one might think that most of this ***** is my job, not turning candy into crap...

Sounds paranoid to me. Who's gonna look?

In my code when I use someone else's work I always write a comment where I got it from - so that if anything, I can contact the author and discuss if possible. I think no one but me will see these notes. And when a beginner writes such things - then you should be glad that your codes are an example for someone else.

 
Georgiy Merts #:

Sounds paranoid to me. Who's going to look closely?

In my code, when I use someone else's work, I always write a comment where I got it from - so that if anything, I can contact the author and discuss if possible. I think no one but me will see these notes. And when a beginner writes such things - then you should be glad that your codes are an example for someone else.

No one has seen your codes, don't compare them with the finger
 
Vladimir Baskakov #:
No one's seen your codes, don't compare with the finger.

It's the clowns that haven't seen it. That's right. None of the clowns did.

Others have. I've posted my codes to the public on more than one occasion. And, say, fxsaber, not unknown to the clowns, has my entire code library as of last year.

 
Georgiy Merts #:

It's the clowns who haven't seen it. That's right. None of the clowns did.

Others have. I've posted my codes to the public on more than one occasion. And, say, fxsaber, not unknown to the clowns, has my entire code library as of last year.

You don't have the codes in Kodobase, calm down.
 
Vladimir Baskakov #:
You don't have codes in Kodobaz, calm down.

No, of course not in Kodobase, they are too clingy one to another - they only need to be laid out in full as a library. And no one will understand so much code. And very few people use the library. Who is interested - I will directly provide all of them.

Kodobase is for simple things that are not "tied to anything", except standard constructs.

You don't mean codebase, you mean "no one has seen it". I answered you - among the clowns, no one has really seen... Well, that's their clown fate.

 
Georgiy Merts #:

No, of course not in Kodobase, they are too clingy one to another - they only need to be laid out in full as a library. And no one will understand so much code. And very few people use the library. Who is interested - I will directly provide all of them.

And Kodobase is for simple things, which are not "tied to anything", except the standard constructions.

No one is interested, and neither is your thread, go there in case someone wanders in by accident and you're not there
 
Vladimir Baskakov #:
No one is interested, like your branch, go there, in case someone accidentally wanders in and you're not there

That's what I'm saying!

And you say 'no one has seen'. No one is interested - so no one has seen it (clowns are not interested - they haven't seen it). Those who are interested - they have seen.