PureBytes Links
Trading Reference Links
|
In-Reply-To: <19047957469.20020404180613@xxxxxxxxxxx>
Hi Dave,
Many thanks for that - it works...! (:-)
One more query... The Length parameter in MyAv can be in 0.5 increments
and using that with the bands throws them out of whack - maybe 1030
instead of 1130 or whatever. I can round the Length up or down to the
nearest whole number but it would be nice to use the correct parameters.
Any ideas...?
Cheers,
Ian
> Hi Ian,
>
> IW> Value1=BollingerBand(MyAv(Length,Factor),Length,+2);
> IW> Value2=BollingerBand(MyAv(Length,Factor),Length,-2);
> IW> Plot1(Value1,"BandUp"); Plot2(Value2),"BandDn");
>
> I think that your code is actually taking the Standard
> Deviation of MyAvg instead of the Close.
>
> I'd consider approaching your problem directly:
>
> Inputs:
> SDev(2);
>
> Vars: Mid(Close),
> Uppr(Close),
> Lwr(Close);
>
> Mid = <MyAvg(Length,Factor,etc.) per your def'n>;
> Uppr = Mid + SDev*StdDev(Close,Length);
> Lwr = Mid - SDev*StdDev(Close,Length);
>
> Plot1(Mid);
> Plot2(Uppr);
> Plot3(Lwr);
>
> {Add formatting and embellish to suit your taste...<grin>}
>
>
> --
> Dave Nadeau
> Fort Collins, CO
>
|