You are using the StringReplace function incorrectly. Please read the documentation again.
It alters the source string and the return value is not a string. It is an integer with the number of replacements carried out.

- www.mql5.com
ERROR
implicit conversion from 'number' to 'string'
Help me please...
Because I wanted to remove the apostrophe of text below
Japan Large Retailer's Sales y/y
StringReplace() function returns the replacement count as integer. Here you are trying to save integer to a string so it's implicit conversion error. Your source string event.name had been changed in this function call, so it's not mandatory to save it in another string. You can use like this
if(StringReplace(event.name,"'","")>0) Print(event.name," changed successfully.");
You are using the StringReplace function incorrectly. Please read the documentation again.
It alters the source string and the return value is not a string. It is an integer with the number of replacements carried out.
Sir, thank you very much for attending my problem.
based on sample:
string text="The quick brown fox jumped over the lazy dog."; int replaced=StringReplace(text,"quick","slow"); replaced+=StringReplace(text,"brown","black"); replaced+=StringReplace(text,"fox","bear"); Print("Replaced: ", replaced,". Result=",text); // Result // Replaced: 3. Result=The slow black bear jumped over the lazy dog. //
and my code:
string txtEN = event.name; int txtRN=StringReplace(txtEN, "'", "");
and my problems are 100% SOLVED!!!
this text
Japan Large Retailer's Sales y/y
Japan Large Retailers Sales y/y
refer attached jpeg.
Again thank you Sir Fernando.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
ERROR
implicit conversion from 'number' to 'string'
Help me please...
Because I wanted to remove the apostrophe of text below
Japan Large Retailer's Sales y/y