sort Market Watch window by Symbol name? - page 2

 

wow...people are ignorant on both sides

here is how it can be done, semi automatic, and therefore it can be done fully automatic also: http://forums.theforexguy.com/threads/how-to-easily-organise-mt4-market-watch-alphabetically.704/ 

 
capoeira:

wow...people are ignorant on both sides

here is how it can be done, semi automatic, and therefore it can be done fully automatic also: http://forums.theforexguy.com/threads/how-to-easily-organise-mt4-market-watch-alphabetically.704/ 

Ok we are waiting your code for the full automation. Thank you.
 

The arrogance of some of you people - mods included - is truely staggering

 

This is actually quite easy to do....

#property strict
#include <Arrays\ArrayString.mqh>
void OnStart()
{
   CArrayString list;
   for(int i=SymbolsTotal(true)-1;i>=0;i--)
   {
      list.Add(SymbolName(i,true));
      SymbolSelect(SymbolName(i,true),false);
   }
   list.Sort(); 
   Sleep(10);
   for(int i=0;i<list.Total();i++)
      SymbolSelect(list[i],true);         
}
 
Except that isn't what the OP asked. He asked how to sort the window, not a list.
 
whroeder1: Except that isn't what the OP asked. He asked how to sort the window, not a list.
Actually, that is exactly what it does - it sorts the symbols in the Market Watch, not just the list.
 
nicholishen: This is actually quite easy to do....

Thanks! There is however a little hiccup. It won't sort the currently selected chart/symbol (or the top one on the list, at least).

 
whroeder1 2017.11.10 07:15      EN

Except that isn't what the OP asked. He asked how to sort the window, not a list.


Fernando Carreiro:
Actually, that is exactly what it does - it sorts the symbols in the Market Watch, not just the list.

Fernando, don't feed the troll...


"Thanks! There is however a little hiccup. It won't sort the currently selected chart/symbol (or the top one on the list, at least)."

That's because SymbolSelect cannot deselect an open window...

 
nicholishen: That's because SymbolSelect cannot deselect an open window...

I suspected that was the reason, but just wanted to point out the "hiccup"! If only there was a way of running a script without any Charts Open!

However, one can always manually move the symbol in question to the correct place after running the script (or run it against the Chart of the known First symbol).

 
Fernando Carreiro:

I suspected that was the reason, but just wanted to point out the "hiccup"! If only there was a way of running a script without any Charts Open!

However, one can always manually move the symbol in question to the correct place after running the script (or run it against the Chart of the known First symbol).

Or run the sort on AUDCAD chart, or whatever chart is first

Reason: