The kicker is, I do NOT want to use ArraySort() or any other built in MQL function. I want to do this manually in MQL(4). I have a reason, but I need to figure out the basics first.
Thanks.
Thanks.
invalid integer number as parameter 1 for TimeToNumber function 13 replies
comparing double to integer in MQ4 0 replies
Two Dimensional Array vs One Dimensional Array 13 replies
Calculate Stochastic Formula on a array (non indicator buffer array) 2 replies
'^' - bitwise operators are to be applied to integer value 2 replies
#property strict void OnStart() { int arr[] = {21,2,8,1,0,58,96,3}; int n = ArraySize(arr); int save; int i,j; //ascending order for(i=0;i<n;i++) { for(j=i+1;j<n;j++) { if(arr[i]>arr[j]) { save = arr[i]; arr[i]= arr[j]; arr[j]= save; } } } string proof = ""; for(i=0;i<n;i++) proof += arr[i]+", "; Print(proof); return; }