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]));

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
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?