Quote:
Originally Posted by SaxMan
Hi all,
I thought I had my answers with the following code:
Code:
double range[5];
for(int i=1;i<5;i++)
{
range[i]={High[i]-Low[i]};
int Max=ArrayBsearch(range,10,WHOLE_ARRAY,1,MODE_ASCEND);
double MaxRange=(High[Max]-Low[Max])/Point;
}
Print("Max Range: ",MaxRange," found at index: ",Max);
But it still just returns the last index not the largest range index.
Any further help would be appreciated.
SaxMan
|
Here's the fix:
Code:
double range[5];
for(int i=1;i<5;i++)
{
range[i]={High[i]-Low[i]};
int Max=ArrayMaximum(range);
double MaxRange=(High[Max]-Low[Max])/Point;
}
Print("Max Range: ",MaxRange," found at index: ",Max);
This could be used to get the highest/lowest(using ArrayMinimum(range)) of the array to compare any variables.
Hope this helps,
SaxMan