sort an array from smallest to highest

 
hello,

I have an EA in which i must sort data in an array.

For example : array[9]=[4,7,2,9,6,3,1,8,5]

i need to sort it from smallest to highest. The result will be as follow : array[9]=[1,2,3,4,5,6,7,8,9]

Is it possible to do that ? in the same array or do i need 2 arrays (one for chronological datas and one for sorted datas)?
Do you have an idea how to code that ?

thanks for your help

TAAD
 
https://docs.mql4.com/array/ArraySort

p.s. Next time please search before you post... This comes up in the top 10 for searching 'sort array'.
Reason: