PureBytes Links
Trading Reference Links
|
Chris,
That is true except when using parenthesis. Anything inside the parens gets
evaluated to a single number before any other operations. So if Value1 and
value2 are 1 and 2 respectively, and maxbarsback is 5 then (value1 +
value2)/2*maxbarsback is (3)/2*5 = 1.5*5 = 7.5. Your second expression is
(1+2)/(2*5) = 3 / 10 = 0.3.
Regards,
Ed Winters
----- Original Message -----
From: Chris Baker <chrisbak@xxxxxxxxxxxx>
To: Omega List <omega-list@xxxxxxxxxx>
Sent: Thursday, October 07, 1999 3:02 PM
Subject: TS 2000 ELA Operator Precedence
> I found that:
> (value1 + value2)/2*MaxBarsBack;
>
> gave different results than:
>
> (value1 + value2)/(2*MaxBarsBack).
>
> I thought normal operator precedence was parenthesis, "*", and then "/" ?.
>
>
|