Hi all,
hopefully this post is in the correct place.
I need some help on how to sort the values of a series array such as the Low array. Here is my code so far.
For a start I am trying to work on the first 3 Lows of the chart.
Low[0], Low[1] and Low[2]
The ArrayCopyRates works OK.
I am using ArrayCopy because you cannot sort a series array.
but when the values get printed out they are some random values I have no idea where they have come from.
Am I going about this the right way or is there a better way?
hopefully this post is in the correct place.
I need some help on how to sort the values of a series array such as the Low array. Here is my code so far.
For a start I am trying to work on the first 3 Lows of the chart.
Low[0], Low[1] and Low[2]
The ArrayCopyRates works OK.
I am using ArrayCopy because you cannot sort a series array.
but when the values get printed out they are some random values I have no idea where they have come from.
Am I going about this the right way or is there a better way?
Inserted Code
int start()
{
double arrayLows[3][6];
double arrayLows2[3][6];
//----
ArrayCopyRates(arrayLows,Symbol(),PERIOD_D1);
ArrayCopy(arrayLows2,arrayLows);
ArraySort(arrayLows2);
for(int x=0;x<=2;x++)
{
double tempLow=arrayLows2[x][2];
Print("value: "+tempLow);
}
//----
return(0);
}