intTo=(int)doubleFrom;
But i would not recommend you to do it
this is a reminder (warning) that if you have a decimal number, you will lose it during the conversion from double to int
Thanks qjol.
But i would not recommend you to do it
Yes, but I get a Double and I need a Integer.
And I don't like warning.
void CParallels::formatLine(string lineName,color lineColor) { double bufferNumber=GlobalVariableGet("gvCounterBufferNumber"); bufferNumber++; GlobalVariableSet("gvCounterBufferNumber",bufferNumber); Print("gvCounterBufferNumber : ",DoubleToString(bufferNumber)); string bufferName=lineName+DoubleToString(bufferNumber); addLine(new CLine((int)bufferNumber,bufferName,lineColor)); } //+------------------------------------------------------------------+
Don't use a GV if you dont want a double. Save to file instead.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
How to remove the warning :
possible loss of data due to type conversion FromDoubleToInt.mq4 20 9