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

 
DDFedor >>:


вот тут уже читали? https://book.mql4.com/ru/appendix/glossary

High-Low и Ask-Bid - различные вещи.

Are you kidding me?

 
Roger >>:


Значения High и Low даются для Bid. Для Ask прибавляйте значение спреда.

Thank you

 
tvar писал(а) >>

>> thank you


Just don't forget that the spread is floating
 
zhuki >>:
А это что, mov[] ? если массив, то где объявление ?

int array[10]; //array of the last 10 MA values
int shift;

for(shift=0;shift<=9;shift++)
{
array[shift]=iMA(NULL,240,12,0,0,0,shift);}
i.e., like this:)

 
Good afternoon friends.

Could you please tell me how to change the code of standard Stochastis as follows:

I need to add an external parameter to the indicator, so that I can manually specify (when "drawing" the indicator to the chart) which data to take from which chart (and which TF).

Many thanks in advance.
 
IMA returns double . You have an int.
 
zhuki >>:
IMA возвращает double . А у вас int.

Yeah, thanks, my mistake... I just put a double, but it still doesn't work(
There must be a mistake somewhere else...

 
how do I find the maximum value in this array?
double array[10];
int shift;
double max;

for(shift=0;shift<=9;shift++)
{
array[shift]=iMA(NULL,240,13,0,0,0,shift);}

max=ArrayMaximum(array,9,0); right?
 
Why 9, you have 10 elements and max is not a value but an element index. You can read the help, it's faster than on the forum. You can find examples. F1 works.

int ArrayMaximum( double array[], int count=WHOLE_ARRAY, int start=0)
Search for the element with the maximum value. The function returns the position of the maximal element in the array.
Parameters:
array[] - Numeric array to search in.
count - Number of elements to search.
start - The start index to search for.
 
zhuki thank you, is there a function that will not return the position but the value of the indicator itself? sorry, I can't find it myself(
F1 does not help:)
Reason: