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

Re: Please, some help with a formula



PureBytes Links

Trading Reference Links

Jim & Lana/

Why do you want a standard deviation?  Your quote doesn't ask for it. 
If you really do want standard deviations take a look at Bollinger
Bands.  The quote is not clear as to what the centre line is based on,
but assuming that too refers to a daily range, the following MS v.6.5
code should cover it.

Mov(H-L,20,S);
Mov(H-L,20,S)+Mov(H-L,20,S)*2.5;
Mov(H-L,20,S)-Mov(H-L,20,S)*2.5

If you want the plotted centre line based on (H+L+C)/3 you can
substitute Mov(Typical(),20,S) in each line.  If you don't want all
lines in the same colour and style you can enter each line as a separate
indicator, omitting the semi-colons at the end of lines 1 and 2.  Looks
as if your formula #2 contains a typo: (H+L) should read (H-L); perhaps
that was your problem..

Harvey Pearce, Victoria, B.C., Canada
=====================================



Jim & Lana wrote:
> 
> I have found an indicator that Linda Rashke uses.  It is based on a
> Keltner Band, "I put Keltner channels set at 2.5 times the 20-day moving
> average daily range, centered around the 20-period moving average."
> 
> I have been struggling with this, I assume, simple formula, and find I
> am doing something wrong, the bands are to wide or look so very narrow.
> Keltner Bands use a 10 day moving average so I have substituted "20" for
> the "10".  Here is a Keltner Band formula from Equis, could someone
> please help me get a 2.5 standard deviation on this thing.  I would
> really appreciate it....Lana..
> 
> Formula #1:
> 
> Name :20 Day Moving Average
> Formula:  MOV((H+L+C)/3,20,Simple)
> 
> Formula #2:
> Name:  Upper Keltner Band
> Formula: MOV((H+L+C)/3,20,S)+MOV((H+L),20,S)
> 
> Formula #3:
> Name:  Lower Keltner Band
> Formula:  MOV((H+L+C)/3,20,S)-MOV((H-L),20,S)