Problem with SymbolName (int pos, bool selected ) function. Symbol that is not in Market Window appears, althought selected bool true.
Unfortunately, this solution means that the selected instruments will not appear in the CCombobox window, even if they are on the market list.
At the moment it works, of course. But it seems to be temporary solution.
Documentation says, that function in this form:
SymbolName ( i, true ) ;
Should return only Symbols from marketwatch view....
MQL5 debugger is not running.
BTW I am sorry, I did not let know It is MQL4 working with MQL5 standard library.
I cannot edit topic title now .
My guess (And I just confirmed it on MT5) is that some time before the previous run you opened USDPLN and EURPLN charts and than closed them - what leaves them in the market watch but does not show them on the market watch window. Bug or feature? Don't know
Well, it turns out it's a feature..
There are symbols selected in market watch, but not visible.
So, if you want to see all of the symbols that your program selects, in the market watch, you need to use
SymbolInfoInteger - with SYMBOL_VISIBLE to be able to see them and set them to true in the process of adding them to combo.
Or - select to add to your combobox only those that are visible (SYMBOL_VISIBLE=true)
Well, it turns out it's a feature..
There are symbols selected in market watch, but not visible.
So, if you want to see all of the symbols that your program selects, in the market watch, you need to use
SymbolInfoInteger - with SYMBOL_VISIBLE to be able to see them and set them to true in the process of adding them to combo.
Or - select to add to your combobox only those that are visible (SYMBOL_VISIBLE=true)
Thanks Amir :)
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I am in the process of creating the simple PIP calculator ( learning and portfolio purposes - I know a lot already exists ).
I have used CComboBox (MQL5 Standard Library. Panel And Dialogs) as the instrument selection field.
The part of the code responsible for displaying selected Symbols is following :
Unfortunately, there is something wrong.
SymbolsTotal(true), returns bigger symbols number value than is selected (13 instead 11) in the window. So I have more instruments in CComboBox Field displaying.
It looks folowing :
I have got 11 instruments selected in Market Window, but there are appearing addictional 2 Symbols at CComboBox field (USDPLN, EURPLN ) ...
Does anyone know where I am making a mistake ?
How to solve this problem ?