Before this line . . . .
double LotSize = NormalizeDouble( (RiskAmount/StopLoss)/TickValue,1);
. . add a Print for StopLoss . . . you have a Zero somewhere, print all your Denominators.
Can someone spot what is wrong with my code. I only have one place in my code where any division is being done but I continue to get zero divide errors
You haven't declared TickValue as an int by any chance?
I'm guessing that you do not see zeros in your Prints. But if you do have a zero in StopLoss or TickValue it will not print!
Try putting the prints before the divide, then you may see something.
You haven't declared TickValue as an int by any chance?
I'm guessing that you do not see zeros in your Prints. But if you do have a zero in StopLoss or TickValue it will not print!
Try putting the prints before the divide, then you may see something.
thanks I was able to find the error.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Can someone spot what is wrong with my code. I only have one place in my code where any division is being done but I continue to get zero divide errors