double to integer
jshumaker:
I am getting a bunch of warnings 'possible loss of data due to type conversion'. I am trying to convert my macd values to integers so that when I print data on my charts it is easier to read. That is why I multiply by the MACD by 10,000. Is there a way to do this such that I do not get all of these warning?
Replace
return (StringToInteger(DoubleToString (10000 * buf[0])));
by
return ((int)(10000.0 * buf[0]));
I am getting a bunch of warnings 'possible loss of data due to type conversion'. I am trying to convert my macd values to integers so that when I print data on my charts it is easier to read. That is why I multiply by the MACD by 10,000. Is there a way to do this such that I do not get all of these warning?