Is it possible select a symbol?

 

Hi


 Is it possible select a row on marketwatch or get the symbol from the row that is selected? 

 I mean select as "mark" not show/hide.

 
Eric Sebestyen Ferreira  Is it possible select a row on marketwatch or get the symbol from the row that is selected?  I mean select as "mark" not show/hide.

Please explain in more detail what it is you mean!

If you have difficulty with English, you can always post your question in the Portuguese section of the forum!

Fórum MQL5
Fórum MQL5
  • www.mql5.com
MQL5: Fórum sobre sistemas de negociação automatizados e testes de estratégia
 

Can I know wich symbol is selected on Markewatch ? for example "PETR4" is selected, how can I get this info on MQL5?



 
Eric Sebestyen Ferreira: Can I know wich symbol is selected on Markewatch ? for example "PETR4" is selected, how can I get this info on MQL5?

Yes, you can use the SymbolInfoInteger() function with the SYMBOL_SELECT property.

EDIT: I should add that you will have to cycle through all the "Market Watch" Symbols to find out which one is selected. Use SymbolsTotal() to get the count, then loop through every position geting the symbol name with SymbolName() and then checking if it is selected. Its not the most efficient way, but it seems to be the only way available.

EDIT2: I just tested this on my system, and it does not seem to work. It may just be that I have read the documentation incorrectly and that the concept of "selected" is something else. Can someone else comment on this too please?

EDIT3: I apologise, but it seems that the concept of "selected" in MQL5 code is the concept of show/hide in the Market Watch and not actually selected. So, I was wrong and one cannot find via MQL5 code which symbol is selected in the Market watch. So please ignore my previous text.

Sorry about the confusion!

Documentation on MQL5: Market Info / SymbolInfoInteger
Documentation on MQL5: Market Info / SymbolInfoInteger
  • www.mql5.com
SymbolInfoInteger - Market Info - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 

So, final answer ...

No, it does not seem possible to know which Symbol a user has selected in the Market Watch window via code!

 
Many thanks, I appreciate youor help! I thin MQ would develop something else to get more information about the system, eg. Open deep of market of some symbol.
Reason: