BartWinter:
Hello,
When compiling I have the error "possible loss of data due to type conversion" i suspect it is because of the variable type which the price is being stored in. Any help is greatly appreciated.
Here's the code: (by the way I know it doesn't do anything I'm just looking for a solution to the error)
That's not an error, that's a warning. iOpen/iClose return a double not a float.
Common Errors in MQL4 Programs and How to Avoid Them
- 2014.03.25
- MetaQuotes Software Corp.
- www.mql5.com
To avoid critical completion of programs, the previous version compiler handled many errors in the runtime environment. For example, division by zero or array out of range are critical errors and usually lead to program crash. The new compiler can detect actual or potential sources of errors and improve code quality. In this article, we discuss possible errors that can be detected during compilation of old programs and see how to fix them.
Alain Verleyen:
Thanks a lot, I'll use the SRC in the future :)
That's not an error, that's a warning. iOpen/iClose return a double not a float.
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,
When compiling I have the error "possible loss of data due to type conversion" i suspect it is because of the variable type which the price is being stored in. Any help is greatly appreciated.
Here's the code: (by the way I know it doesn't do anything I'm just looking for a solution to the error)