Hello freinds,
I'm tranfering an indicator from MQL4 to MQL5, and I have this line:
shortname = "T1F Price v6 (" + bas + ")";
as - bas - is an integer.
I got a massage: shortname = implicit conversion from 'number' to 'string'
How do I overcome this?
Thanks
Try this.
shortname = "T1F Price v6 (" + IntegerToString(bas) + ")";
Try this
Thank you wackena,
It works great.
I need another help.
At MQL4 I have:
i_digits=MarketInfo (Symbol(),MODE_DIGITS);
and I changed it to:
SymbolInfoInteger(c_symbol,SYMBOL_DIGITS);
But I got the masage:
possible loss of data due to type conversion.
Can you help?
Thank you.
- www.mql5.com
Thank you wackena,
It works great.
I need another help.
At MQL4 I have:
i_digits=MarketInfo (Symbol(),MODE_DIGITS);
and I changed it to:
SymbolInfoInteger(c_symbol,SYMBOL_DIGITS);
But I got the masage:
possible loss of data due to type conversion.
Can you help?
Thank you.
Try applying this typecasting. https://www.mql5.com/en/docs/basis/types/casting
int i_digits=0; i_digits=(int)SymbolInfoInteger(c_symbol,SYMBOL_DIGITS);
- www.mql5.com
Yes, It works.
Can you please see the following masages. If you can I will appriciate your kindness and your pasiont:
1) int cur_time=TimeLocal(); says: possible loss of data due to type conversion
2) double weight_calc=0; THEN
for(int j = 0; j < length; j++)
{
weight_calc = weight_calc + GetTickValue (SYMB,i);
}
THEN
for (int j=0;j<length;j++)
{
double weight=GetTickValue (Pair[j],shift)/weight_calc;
It says: 'weight_calc' - undeclared identifier. But It was declared?
I have more, but I ashamed to disturbe you, too much.
Thanks.
Yes, It works.
Can you please see the following masages. If you can I will appriciate your kindness and your pasiont:
1) int cur_time=TimeLocal(); says: possible loss of data due to type conversion
2) double weight_calc=0; THEN
for(int j = 0; j < length; j++)
{
weight_calc = weight_calc + GetTickValue (SYMB,i);
}
THEN
for (int j=0;j<length;j++)
{
double weight=GetTickValue (Pair[j],shift)/weight_calc;
It says: 'weight_calc' - undeclared identifier. But It was declared?
I have more, but I ashamed to disturbe you, too much.
Thanks.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello freinds,
I'm tranfering an indicator from MQL4 to MQL5, and I have this line:
shortname = "T1F Price v6 (" + bas + ")";
as - bas - is an integer.
I got a massage: shortname = implicit conversion from 'number' to 'string'
How do I overcome this?
Thanks