[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 187

 
TheXpert >> :

Incorrectly set parameters (by number or type) in EA.

Alternatively, remove all string parameters from the indicator.

TheXpert, Thank you!

===================================

Can you tell me how to calculate the high and low of a daily bar, its distance from the high and the low how to display it.

Let's assume there is a high price and low price and the distance between them exceeds 50 pips, it will be a signal to trade. If it is less than 50 pips it will be a signal to ban trades....

approximately so just can not derive a formula ........

	 
double ind_hi = iHigh(NULL, PERIOD_D1, 0);
double ind_lo = iLow (NULL, PERIOD_D1, 0);

 if (( ind_hi==Bid&& ind_lo==Bid)>50) ind2 = 1;     
	 else if (( ind_hi==Bid&& ind_lo==Bid)<50) ind2 =- 1;

really need....

 

....мне преобразовать эти данные для тестирования?

the question is off the table.
 

How do I make the step in the for loop bigger than 1(i++)?

 
NTH >> :

How do I make the step in the for loop bigger than 1(i++)?

{
   int step = 3;

   for (int i = 0; i < size; i += step)
   {
      //...
   }
}
 

Help me understand writing to an array...

We have a variable A - which can take different values, including repetitive, for example (1, 2, 3, 3, 3, 5, 1)
we have an array mass[s] and an index for the array s=0;
I can not understand how to write the variable A to the array, so that it does not repeat in it. and the array has the following arrangement of elements A :
mass = (s0=1, s1=2, s2=3, s3=5, s4=1)

for(int d=1;d<-1;d++)
{
if (A!=0) //check that the variable has no value 0
{
if( mass[s-1] != A) //check the last element of the array, if it is not equal to the current variable A write it down, if it is, look for another variable A
{
mass[s] = A; //write variable A into array
s++; //increase array index by 1 unit
break; //exit the loop for
}
}
}
I tried to write this code, I don't know if it is correct or not

 
Please tell me how to determine the direction of the MA (up or down), or at least the angle of inclination...
 
ArtY0m писал(а) >>
Please tell me how to determine the direction of the MA (up or down), or at least the angle of its inclination...

Calculate the difference at zero and, say, at bar 3. If positive, the MA looks up, if negative, it looks down.

 
Roger >> :

Calculate the difference at zero and, say, at bar 3. If positive, the MA looks up, if negative, it looks down.

The difference between the two MAs?

 
ArtY0m писал(а) >>

The difference between the two MAs?

No, the same MA, just one value on the zero bar and the other on the previous bar.

 
Roger >> :

No, the same MA, just one value on the zero bar and another on the previous ones.

Please tell me how to do this))

Reason: