getsymbol()

 
Is there a way in MT4 maybe someone has written such a tool to obtain all available symbols offered by the broker independent of what chart it's loaded on, and then store them somewhere such as in a series of global vars or an array? For example one broker we are working with uses 2 EUR/USD symbols (don't ask why!) and they are constantly changing the suffixes from EURUSDab to EURUSDbc. So by obtaining available symbols we could trade any EURUSD symbol irrespective of suffix, etc. If this is possible.
 

https://www.mql5.com/en/code/8317. Also you can StringSubstr() the first 6 characters.

https://www.mql5.com/en/code/9102

 
ubzen:

https://www.mql5.com/en/code/8317. Also you can StringSubstr() the first 6 characters.

OMG, what a horrible way of doing it. Surely somebody has a better way than trying every permutation of all the possible characters and taking >20 minutes to do it?
 
Ok, that's better, even if the comments are in Russian.
 
dabbler:
OMG, what a horrible way of doing it. Surely somebody has a better way than trying every permutation of all the possible characters and taking >20 minutes to do it?

Well All I did was google search for "all symbols" and provided the links it give me :)

Reading the Op again, seems the first part talks about a tool which cache all symbols regardless of chart it's on.

If the ea however is on the correct chart but the broker's changing the symbol name.

Then a simple if( StringSubstr(Symbol(),0,6)=="EURUSD" ){ ....Then I'm working with EURUSD... } should suffice.

If the ea however is a multi-currency single chart, then more creative thinking is required.

 

ubzen:

If the ea however is on the correct chart but the broker's changing the symbol name.

Then a simple if( StringSubstr(Symbol(),0,6)=="EURUSD" ){ ....Then I'm working with EURUSD... } should suffice.

Brokers name the pair several ways: EURUSD, EURUSDm, EUR/USD, EUR-USD, EURUSDxxx (I can't remember what the xxx was)

Instead I'd use

string pair = Symbol();
if (StrStringFind(pair, "EUR") >= 0 && (StrStringFind(pair, "USD") >= 0)
 
WHRoeder:

Brokers name the pair several ways: EURUSD, EURUSDm, EUR/USD, EUR-USD, EURUSDxxx (I can't remember what the xxx was)

Instead I'd use

Within the "Point Pip Thread" Cloudbreaker mentioned that the current convention was appending only to the end of the symbol name. No one challanged the claim at that time and my experience thus far seemed to agree. However, thank-you for showing that's not always the case. ;) Happy Pip-ing.
Reason: