Error message when compiling
-
I have this error when compiling .ex5:
possible loss of data due to type conversion (Value1.Shift = v::CandUpU;)
Code:
public: /* Custom methods */
virtual double Value1() {
Value1.Symbol = CurrentSymbol();
Value1.Period = CurrentTimeframe();
Value1.Shift = v::CandUpU;Can anyone help to solve this?
-
@swissi
"possible loss of data due to type conversion" is not an error, just a warning. -
@roar
Yes I know but it can cause losses in trading. Any suggestions to solve this? -
@swissi this is just a wild guess, but the warning maybe considers the difference between double and int data types...
Try changing your double variable to int, maybe it does the trick

-
@roar
It is not the solution. Thanks -
@swissi worked in my own test but ok
-
Solved. Thanks
-
Hello, I know it is quite a long time, but what was the solution here please?
-
probably exactly what Roar said.
But if you have an issue like this, it is probably specific to you. Problems like this can happen for anything.