That's not as easy as it first seems.
Take a look at the Symbol definitions (CTRL-U)
You have multiple options, and they depend on the broker from which you receive the symbols.
The calculation type is one option.
The symbols path is another option.
The symbols country is a possible option.
The symbols industry is an option.
And most probably some more. You could go and analyze the description of the symbol, and filter by that as well.
The issue is, some brokers offer stocks and Forex as CFDs, other have forex symbols as Forex.
ETFs could be CFDs, or maybe even Futures.
Stocks can be indicated as stocks, and they might specifiy the exchange as well.
The challenge is, there is no definite way to separate these directly and reliable based on the symbols definitions across all brokers.
I guess, it is easier to define what you want, than to exclude what you don't want.
You could say, I want currencies, energies and Metalls. That could be done quite reliable by the symbols path.
I guess that would be the closest you can get to have a reliable selection.
My broker have diferent accounts. one for trade where you trade only CFD's and one for invest with only stocks and EDT if I remember right. Trader have them all including stocks and EFT's. Yes it seems the symbol path is the only way and I also need it to calculate the leverage because is diferent for diferent types of instruments. Thank you for the idea.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
I have the following code for getting all symbols
I would like to exclude some symbols like stocks and EFT because of commission so in the symbol_info there is a entry category but is empty. The question is how I exclude this category of symbols?