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.
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 ?
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. :-)
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?
Why not use an input parameter for each symbol used in your EA ?
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?
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:
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.
Are you trading with 54 different symbols at the same time in your EA ?
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 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.
Its a simple indicator that displays some data from all pairs.
If i describe alot someone could steal idea. Please understand thanks.
![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
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.