Been really scratching my head on this one
I have a very simple formula
all of the values are none ZERO ( see the attached screenshot of the OUTOUT Window)
but my computed value is always ZERO.
I even multiplied by 10000 instead of 100 and i get the same results
I would be truly grateful if someone could tell me why...
is it a c# variable issue?
is it a problem with the INT and DOUBLE?
Thank you kindly in advance
Sammy
//variables
private double Average1=0;
private int a=0, b=0;
protected override void OnBarUpdate()
.....
Average1 = ((a-b)/(a+b))*100;
Print("average1 = "+Average1);
Print("a= "+a);
Print("b= "+b);
Print("(a-b)= "+(a-b));
Print("(a+b)= "+(a+b));
Comment