Note:I'm using the translation function. There may be wrong expressions. In that case, I'm sorry.
I want to sort the time in descending order.
At that time, I want to rearrange the array of names as well.
What should I do?
Please answer.
- About description in function of mql5
- Sort array
- Sorting
string name[]; // get name of horizontal line datetime time[][2]]; // get the time of the horizontal line for(…){ name[i]=…; time[i][0]=…; time[i][1]=i; } ArraySort(time); PrintFormat("2nd element time=%s name=%s", TimeToString(time[2][0]), name[ time[2][1] ]);
William Roeder #:
string name[]; // get name of horizontal line datetime time[][2]]; // get the time of the horizontal line for(…){ name[i]=…; time[i][0]=…; time[i][1]=i; } ArraySort(time); PrintFormat("2nd element time=%s name=%s", TimeToString(time[2][0]), name[ time[2][1] ]);
string name[]; // get name of horizontal line datetime time[][2]]; // get the time of the horizontal line for(…){ name[i]=…; time[i][0]=…; time[i][1]=i; } ArraySort(time); PrintFormat("2nd element time=%s name=%s", TimeToString(time[2][0]), name[ time[2][1] ]);
Thank you for reply.
It was helpful!

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register