Need to Hide All Symbols

 

By SymbolSelect function we can hide a symbol in MarketWatch but we can't "Hide All" .

This is a problem when we have so many symbols in Market Watch List.

How I can hid all symbols on it?

 
Saed Modarresi:

By SymbolSelect function we can hide a symbol in MarketWatch but we can't "Hide All" .

This is a problem when we have so many symbols in Market Watch List.

How I can hid all symbols on it?

Code:

//--- remove all symbols from the Market Watch
   int symbols_total=SymbolsTotal(true);
   for(int i=symbols_total-1; i>=0; i--)
     {
      string symbol_name=SymbolName(i,true);
      SymbolSelect(symbol_name,false);
     }
 
Saed Modarresi: By SymbolSelect function we can hide a symbol in MarketWatch but we can't "Hide All" .

Correct, the current symbol can't be. Other symbols can be hidden 10 minutes after last use, as Vladimir showed.


 
William Roeder:

Correct, the current symbol can't be. Other symbols can be hidden 10 minutes after last use, as Vladimir showed.


Thank you but when we have 2000 symbol in Market Watch List, this loop work for long time.
We need a function that it can hide all symbol.
for example:
SymbolSelect("*", false);
 
Can anyone propose a viable solution to this issue?
 
Saed Modarresi :
Can anyone propose a viable solution to this issue?

You were answered above.

 
Vladimir Karputov:

You were answered above.

Yes but when we have 2000 symbol in Market Watch List, this loop work for long time.
We need a function that it can hide all symbol immediately.
for example:
SymbolSelect("*", false);
Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Symbol Properties
Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Symbol Properties
  • www.mql5.com
To obtain the current market information there are several functions: SymbolInfoInteger(), SymbolInfoDouble() and SymbolInfoString(). The first parameter is the symbol name, the values of the second function parameter can be one of the identifiers of ENUM_SYMBOL_INFO_INTEGER, ENUM_SYMBOL_INFO_DOUBLE and ENUM_SYMBOL_INFO_STRING. Some symbols...
 
Saed Modarresi :
Yes but when we have 2000  symbol in Market Watch  List, this loop work for long time.
We need a function that it can hide all symbol immediately .
for example:
SymbolSelect("*", false);

5000 characters are deleted in three seconds:

2020.11.15 09:27:04.822 Scripts script remove all symbols (FB.cfd,Daily) loaded successfully
2020.11.15 09:27:07.221 Scripts script remove all symbols (FB.cfd,Daily) removed

that's not for long.

 
Vladimir Karputov:

5000 characters are deleted in three seconds:

that's not for long.

It's great, but practically the rows, one by one of the internal arrays of the system, have been deleted.

Updating this internal array, under different conditions, costs MetaTrader5 and creates a different time delay on different computers with different system resources.

Of course, I think the new option recently added to the Settings section has somewhat hidden this problem:

"Preload chart data for open positions and orders"

However, I hope that MQL5 makers will create functions to improve and increase efficiency.

 
Saed Modarresi :

It's great, but practically the rows, one by one of the internal arrays of the system, have been deleted.

Updating this internal array, under different conditions, costs MetaTrader5 and creates a different time delay on different computers with different system resources.

Of course, I think the new option recently added to the Settings section has somewhat hidden this problem:

"Preload chart data for open positions and orders"

However, I hope that MQL5 makers will create functions to improve and increase efficiency.

And again you forget - you are on a technical forum. Show the data of your hardware, operating system and measurement results. Please do not make frivolous accusations if you do not show technical data.

 
Vladimir Karputov:

And again you forget - you are on a technical forum. Show the data of your hardware, operating system and measurement results. Please do not make frivolous accusations if you do not show technical data.

Although I don't think like you and my goal is to increase the efficiency of this unique platform, I accept your guidance and act within your desired framework.

Reason: