[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 659

 
ToLik_SRGV:

What makes you think i is an array? If it were an array element, the entry would look like this

and this is an ordinary variable.

In this case, I, as a dummie, don't understand the point of using a variable ( [i] ) in this way...
 
artmedia70:

Please explain the difference between the writing and the writing:



If you want to compare 2 values, you write

double DeM5_0  =iDeMarker(NULL,PERIOD_M5, 14,0);
double DeM5_1  =iDeMarker(NULL,PERIOD_M5, 14,1);

If you want to fill the buffer, you'll count in a loop

double DeM5[i] =iDeMarker(NULL,PERIOD_M5, 14,i);
 
valenok2003:


If you want to compare 2 values, you will write

If you want to fill the buffer, you will read in the loop


It's clear. Thank you
 
ToLik_SRGV:

What makes you think i is an array? If it were an array element, the entry would look like this

double DeM5[i] =iDeMarker(NULL,PERIOD_M5, 14,array_name[i]);

and this is an ordinary variable.


Decipher what you wrote, please, if you don't mind.
 
Vinin:
Decipher what you wrote, please, if you don't mind.
Victor, is there something wrong there?
 
Vinin:
Decipher what you wrote, please, if you don't mind.

There was a question:

Please explain the difference between spelling:

double DeM5_1 =iDeMarker(NULL,PERIOD_M5, 14,1);

и

double DeM5[i] =iDeMarker(NULL,PERIOD_M5, 14,i);

I understand that the first one explicitly specifies the bar number from which the value is taken, while the second one creates a certain array, the element i of which points to the bar number.
The advantages and disadvantages of the two methods are of interest... What is the advantage, speed, convenience and so on and so forth... Thank you.

The answer is that i is not an array element, but the array element index. I did not understand right away that it was a brute-force loop and I meant the DemM5 array, but i is just a variable in this case too. But if we are speaking of the loop, what does the first entry have to do with it? Apparently we just misunderstood each other...
 
ToLik_SRGV:

There was a question:

Correspondingly, the answer is that i is not an array element but an index of an array element. I didn't get it right away that it was a search loop and I meant the DemM5 array, but i is just a variable in this case too. But if we are speaking of the loop, what does the first entry have to do with it? Apparently we just misunderstood each other...


What I'm interested in is this

array_name[i]

It's a mystery to me.

Although it has every right to exist. Depending on the type.

 
Vinin:


So I'm interested in just this
It's a mystery to me.
Although it has every right to exist. Depending on the type.

In second case some array is created...

some array - array_name (for example)

...element i of which points to bar number.

For example, array_name[5] = { 4, 7, 22, 57}
And then in loop we don't get all values of iDeMarker() from history, but only necessary bars.

double DeM5[i] =iDeMarker(NULL,PERIOD_M5, 14,array_name[i]);

Wrote that we just didn't understand each other :)))) sorry...

 
ToLik_SRGV:

some array - array_name (for example)

For example, array_name[5] = { 4, 7, 22, 57}
And then in loop we don't get all values of iDeMarker() from history, but only necessary bars.

double DeM5[i] =iDeMarker(NULL,PERIOD_M5, 14,array_name[i]);

I told you, they just don't understand each other :))) sorry...


No problem. Just wanted to understand, too. Thanks, man. Got it. Every method has a right to exist. As long as the author understands it. I hear you. Thanks again.
 
Vinin:

No problem. Just wanted to understand, too. Thanks, man. Got it. Every method has a right to exist. As long as the author understands it. I hear you. Thank you again.
Yes, it is very convenient when using already passed, but required for the further current calculations of the indicator values... :)
Reason: