You never try double instead of int ?
juniorlcq:
At TotalSpread += MarketInfo ( List[y], MODE_SPREAD ) ;
it gives me an warning ( possible loss of data due to type of conversion ) when I compile it with strict property . It should be correct as I read the documentation MODE_SPREAD is an Integer type . Why is this happening ?
MODE_SPREAD enumerates as an integer, but you are using the function MarketInfo and that returns a double
GumRai:
MODE_SPREAD enumerates as an integer, but you are using the function MarketInfo and that returns a double
MODE_SPREAD enumerates as an integer, but you are using the function MarketInfo and that returns a double
Ohhhhhhhh, I see, now that make sense, how should I modify it to give no warning then ?
DoubleToInteger conversion ?
Edit : But there's no DoubleToInteger
Edit : But there's no DoubleToInteger
juniorlcq:
DoubleToInteger conversion ?
Edit : But there's no DoubleToInteger
DoubleToInteger conversion ?
Edit : But there's no DoubleToInteger
case 1 : TotalSpread += (int) MarketInfo ( List[y] , MODE_SPREAD ) ;See Typecasting.
I tried TotalSpread += NormalizeDouble ( MarketInfo ( List[y], MODE_SPREAD ), 0 ) ; but still got warning .... NormalizeDouble turn Double type to Integer type isn't it ?
Strange I thought NormalizeDouble and MathRound which should also give no warning like ( int ) .... Why is ( int ) giving no warning but NormalizeDouble still gives warning, mind to explain to me @.@ ?
juniorlcq:
Strange I thought NormalizeDouble and MathRound which should also give no warning like ( int ) .... Why is ( int ) giving no warning but NormalizeDouble still gives warning, mind to explain to me @.@ ?
NormalizeDouble and MathRound still return a double. Please check documentation before asking the same question for all functions Strange I thought NormalizeDouble and MathRound which should also give no warning like ( int ) .... Why is ( int ) giving no warning but NormalizeDouble still gives warning, mind to explain to me @.@ ?


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
At TotalSpread += MarketInfo ( List[y], MODE_SPREAD ) ;
it gives me an warning ( possible loss of data due to type of conversion ) when I compile it with strict property . It should be correct as I read the documentation MODE_SPREAD is an Integer type . Why is this happening ?