Sort ASCEND or DESCEND (mode) of the whole data of an array
Syntax:
1 |
ArraySort($var,mode) |
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
defparam drawonlastbaronly=true if islastbarupdate then //populate an array with random values: for i = 1 to 100 do $a[i] = random(0,1000) next //sorting the array values from max to min value: arraysort($a,descend) //plot the array values: for i = 1 to lastset($a) do drawtext($a[i],barindex,i,sansserif,standard,14) next endif return 0 |