You "can't find any documentation" because there isn't any.
It is used in | void CList::QuickSort(int beg,int end,int mode){ List.mqhCObject *i_ptr,*j_ptr,*k_ptr; : while(i_ptr.Compare(k_ptr,mode)<0) |
The CObject method is defined as/in | virtual int Compare(const CObject *node,const int mode=0) const { return(0); } Object.mqh |
It is your code, where you derive from CObject and override the Compare method, determines what the mode parameter means.
If you only have one value to sort by, then you use positive/negative to determine the sorting direction.
If you have multiple possible values use the mode value to select which field and the sign the direction.
Etc. It is up to you.
Thank you, I was wondering how to select what I want to search on and now I know. Thanks again!

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
Hi,
I can't find any documentation on the CList object sort mode parameter of the Sort method. Could someone please explain how I use it.
Thanks in advance.