Hii guys it would be awesome if you can help me out here,
i need to get the EA file name and remove the strings from its name and have the final result in only numbers,
EXAMPLE:
EA name is "JOHNCORE 112.32231"
we need to get the name of the EA file from with-in the code somehow,
then from the file name "JOHNCORE 112.32231" we will need to remove the strings, which are "JOHNCORE" & ".",
in order to get our final result which would be only in numbers "11232231".
please can someone help me with that simple thing?, god bless if you can.
thanks i would be waiting for replies..
we need to get the name of the EA file from with-in the code somehow,
then from the file name "JOHNCORE 112.32231" we will need to remove the strings, which are "JOHNCORE" & ".", in order to get our final result which would be only in numbers "11232231".
- Perhaps you should read the manual. The first is easy: WindowExpertName - Chart Operations - MQL4 Reference
- The second doesn't require StringSplit at all.Not compiled
string numerics_only(string text){ int iPos=0; while(iPos < StringLen(text)){ string c = StringSubstr(text, iPos, 1); if(c < "0" || c > "9") StringReplace(text, c, ""); else ++iPos; } return text; }
Not compiledWas that so hard you couldn't even attempt it?
- The real question is why would you want to do something different if someone renames the file?
whroeder1:
...
2. The second doesn't require StringSplit at all.
...

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hii guys it would be awesome if you can help me out here,
i need to get the EA file name and remove the strings from its name and have the final result in only numbers,
EXAMPLE:
EA name is "JOHNCORE 112.32231"
we need to get the name of the EA file from with-in the code somehow,
then from the file name "JOHNCORE 112.32231" we will need to remove the strings, which are "JOHNCORE" & ".",
in order to get our final result which would be only in numbers "11232231".
please can someone help me with that simple thing?, god bless if you can.
thanks i would be waiting for replies..