Download MetaTrader 5

Help with a function

To add comments, please log in or register
Write articles and earn money. We pay 200 USD for them!
AtApi
75
AtApi 2014.08.09 19:33 

Hi guys, thanx for your help , i was wondering if someone can address me to the right direction here... im trying to create a function that scan all the pairs in the market watch and return only the one where a specific currency (for example the EUR) is contained..

 

Thanks!!! 

Alain Verleyen
Moderator
30721
Alain Verleyen 2014.08.09 22:24  
AtApi:

Hi guys, thanx for your help , i was wondering if someone can address me to the right direction here... im trying to create a function that scan all the pairs in the market watch and return only the one where a specific currency (for example the EUR) is contained..

 

Thanks!!! 

 

What have you tried ? Please show your code.
Ian Venner
2584
Ian Venner 2014.08.10 04:12  
AtApi:

Hi guys, thanx for your help , i was wondering if someone can address me to the right direction here... im trying to create a function that scan all the pairs in the market watch and return only the one where a specific currency (for example the EUR) is contained..

 

Thanks!!! 

 

Bring up the F1 help in metaeditor look through the Symbol functions for what you need.
Simon Gniadkowski
Moderator
17998
Simon Gniadkowski 2014.08.10 09:09  
AtApi:

Hi guys, thanx for your help , i was wondering if someone can address me to the right direction here... im trying to create a function that scan all the pairs in the market watch and return only the one where a specific currency (for example the EUR) is contained..


If you look at AllMarketData.mq4  you should get some idea of what you need to do to loop through all the symbols,  then it's just a case of checking the symbol name for "EUR".
whroeder1
14480
whroeder1 2014.08.10 12:09  
RaptorUK: If you look at AllMarketData.mq4
  1. AllMarketData or my implementation (get list of all symbols running in mt4 programatically - MQL4 forum) read and parsed the binary file symbols.raw.
  2. Now you can just use the provided functions SymbolsTotal and SymbolName
  3. Alphabetic Index of MQL4 Functions (600+) - MQL4 forum
AtApi
75
AtApi 2014.08.10 17:57  
Wow thanks you guys!! i really appreciated!!!
To add comments, please log in or register