ERR_ZERO_DIVIDE 4013 Zero divide.

 
What could be "ERR_ZERO_DIVIDE 4013 Zero divide" - *Zerro devide* I am getting when running the EA in test?

It seems everithing ok, I've checked more than 20 times. Can someone tell me on what could point Zero Devide in errors?

Calculating values I've put in comment to be displayed and were right. If someone knows to point me what could be the error? code?

If someone knows?
 
Could you provide your expert advisor code, please?
 
I had sum counting of bool true values and return of them as int sum, but I did'nt noticed that returning sum value were somethimes 0 ( very rare case ) . . . code:
for ( . . . ) i1 = true ;
for ( . . . ) i2 = true ;
. . .
sum = i1 + i2 + . . . ;
Nsum = sum1 * sum . . . ;
Corrected :
 . . .
sum = 1 + i1 + i2 + ... ;
OK now, multiplier getting true values.

Thank You.
 
edddim:
I had sum counting of bool true values and return of them as int sum, but I did'nt noticed that returning sum value were somethimes 0 ( very rare case ) . . . code:
for ( . . . ) i1 = true ;
for ( . . . ) i2 = true ;
. . .
sum = i1 + i2 + . . . ;
Nsum = sum1 * sum . . . ;
Corrected :
 . . .
sum = 1 + i1 + i2 + ... ;
OK now, multiplier getting true values.

Thank You.