
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
limit in the code, if 1/2=0.5 then apparently the rounding now gives 0 instead of 1?
To test the hypothesis I changed the code
Total trash - got division by zero error again
Code from ME as a picture - maybe I'm blind but I don't understand what's going on
The error is still in the same line.
The file is the same, as the error line has shifted due to the addition of code for the print.You should usea styler - you would immediately see that your problem string is NOT within the check zone if(limit==0)
You should usea styler - you would immediately see that your problem string is NOT in the check zone if(limit==0)
So it doesn't need to enter, why?
This code.
Hanging up the terminal.
limit in the code, if 1/2=0.5 then apparently the rounding now gives 0 instead of 1?
To test the hypothesis I changed the code
Code:
Result:
Code:
Result:
That's the thing, and earlier apparently 1/2 gave a 1, not a zero.
That's the thing, and before, 1/2 must have been a 1 instead of a zero.
Nope. It always rounded up like that.
Nope. It's always rounded off like that.
So it's something else after all...
Changed the code for the print
and now I get...
How come?
Changed the code for the print
and now I get...
How's that?
All is correct. If limit is calculated using the formulalimit=(int)(stop_time-start_time)/PeriodSeconds(_Period);
then the result will be = 0.
Now we need to see how stop and start times are formed.