[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CODE QUESTION



PureBytes Links

Trading Reference Links

You can use the RANGE variable.

However, your error was in not considering the operator execution order.

you should have used another set of parenthesis as in:

( ( H-L ) + (H-L) + (H-L) ) / 3

what you did was interpreted as

R + R + (R/3)

----- Original Message -----
From: Husky <husky@xxxxxxxxxxxxxxxx>
To: OmegaList <omega-list@xxxxxxxxxx>
Sent: Monday, February 28, 2000 10:55 AM
Subject: CODE QUESTION


> Good Day,
>
>    I am trying to create a indicator to tell me the average of the
intra-day
> range for the last 3 days and the last 5 days. The indicator is not
> displaying values correctly when i check against the numbers manually..
> could someone point out to me what i have done incorrectly please?
>
>
>
> Plot1 ((H[0] - L[0]) + (H[1] - L[1]) + (H[2] - L[2])  /  3,"3 DAY RANGE");
>
> Plot2 ((H[0] - L[0]) + (H[1] - L[1]) + (H[2] - L[2]) +(H[3] - L[3]) +
> (H[4] - L[4]) + (H[5] - L[5]) / 5,"5 DAY RANGE");
>
>
>
>                                                                Thankyou,
> William
>