What is the best way of fetching and adding broker prefix and suffix?

 

Lets assume we have something like

MarketInfo("EURUSD",MODE_BID); 

Then someone who has prefix and suffix wants to use the code. Which is the best way to add it to the "EURUSD" string. I know there are many ways to link strings but i want to make sure.

 
Lets assume you do NOT have something like that.
MarketInfo(Symbol(),MODE_BID);

But if you insist get list of all symbols running in mt4 programatically - MQL4 forum



 
WHRoeder:
Lets assume you do NOT have something like that.

But if you insist get list of all symbols running in mt4 programatically - MQL4 forum




This one i know. Lets assume you want to get it for another pair not the one attached like taking the above, we assume the EA is attached on USDJPYm but we want to get the current bid of EURUSDm and its supposed to work with all prefixes even those where its not m but maybe EURUSDtonny . Which would be the simplest code. I know there are some solutions that could fill the whole screen. I want the simplest because im gonna have 54 instances for MarketInfo(...,MODE_BID); for 54 different currencies so if the code is big multiplied by 54 you can't imagine the size. :-)
 
tonny:

This one i know. Lets assume you want to get it for another pair not the one attached like taking the above, we assume the EA is attached on USDJPYm but we want to get the current bid of EURUSDm and its supposed to work with all prefixes even those where its not m but maybe EURUSDtonny . Which would be the simplest code. I know there are some solutions that could fill the whole screen. I want the simplest because im gonna have 54 instances for MarketInfo(...,MODE_BID); for 54 different currencies so if the code is big multiplied by 54 you can't imagine the size. :-)
Why not use an input parameter for each symbol used in your EA ?
 
or look what is done in iExposure.mq4 indicator to find symbols
 
angevoyageur:
Why not use an input parameter for each symbol used in your EA ?
That will mean 54 inputs. In my solution i have the prefix and suffix to be set by the user then combine them using + sign. Im yet to test because market is closed. Like this MarketInfo(prefix+"EURUSD"+suffix,MODE_BID) I posting from mobile so i cant use src. So the variables prefix/suffix are extern and the code compiles well. What do you guys think?
 
tonny:
That will mean 54 inputs. In my solution i have the prefix and suffix to be set by the user then combine them using + sign. Im yet to test because market is closed. Like this MarketInfo(prefix+"EURUSD"+suffix,MODE_BID) I posting from mobile so i cant use src. So the variables prefix/suffix are extern and the code compiles well. What do you guys think?

Are you trading with 54 different symbols at the same time in your EA ?

If you have a solution why are you asking, without even show your code.

 
angevoyageur:

Are you trading with 54 different symbols at the same time in your EA ?

Its top secret indicator. Will my code work? Im waiting for market to open to test. Just wanted to confirm rather than work on 54 stuff then tomorrow correct 54 stuff.
 
tonny:
Its top secret indicator. Will my code work? Im waiting for market to open to test. Just wanted to confirm rather than work on 54 stuff then tomorrow correct 54 stuff.
Pfff, you never change, it seems. I do not waste my time in responding.
 
Its a simple indicator that displays some data from all pairs.
 
If i describe alot someone could steal idea. Please understand thanks.
Reason: