Programmers wanted (again). How can I insert variable symbol names?
-
I'm working with a broker offering CFDs. This means the name of each symbol is changed quarterly: from GER30Mar20 to GER30June20, for example. I have to change the name in the global options quarterly and it is very annoying every time I simply forget to do it.
Can someone please tell how could I create something like GER30* on the global options and fix the problem once and for all?
-
@l-andorrà check this:
https://fxdreema.com/shared/xvIx8Yuge
For example, your symbol name might contain "URUS" and then something else. The EA will search through the available symbols and select first symbol that has this part in its name. In this case, the symbol will (probably) be "EURUSD"

Here's the mql4 functions:
https://docs.mql4.com/marketinformation/symbolstotal
https://docs.mql4.com/marketinformation/symbolname
https://docs.mql4.com/strings/stringfind
Naturally this approach might result in trading a wrong symbol, so be careful. -
Ok. Thanks. Shouldn't that 'sym' variable be inserted into the 'buy now' block too?
-
@l-andorrà this block already takes care of it

-
Ok. Thank you.