Symbol from market info without any pre- or suffix
-
Hi I'm currently trying to implement the icefx newsinfo indicator into the tutorial EA. According to icefx manual to make the indicator work in back testing, I need to create a global variable containing the current server time (bt time).
Example:”NEWS_EURUSD_TIMEOVERRIDE”In order to make this a bit more robust, I'd like to calculate the variable name. As it contains the current symbol name, I need it without any prefix or suffix.
@roar or @miro1360 any idea how to achieve that in an effective manner? Probably it needs some String operations. -
@trader-philipps Strings are not my strong suit, but maybe this setup helps:
https://fxdreema.com/shared/MJqQThQO
Idea is to use substring function to extract the symbol out, using stringfind to find a starting point.
https://docs.mql4.com/strings/stringsubstr
https://docs.mql4.com/strings/stringfind

-
@roar Okay, will dig deeper into it once news filter is working. Right now I just do this

Thanks a lot!