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

Re: Stochastic confirmations and Another question...



PureBytes Links

Trading Reference Links

> From: Steven Buss <sbuss@xxxxxxxxxxx>
> To: Frank B. Gaylord <fbg@xxxxxxxxxxxxxx>; Metstock List
<metastock-list@xxxxxxxxxxxxx>
> Subject: Stochastic confirmations and Another question...
> Date: Tuesday, December 09, 1997 11:40 PM
>
> Which brings me to my question:  (All my posts that provide info are
really
> disguised attempts to learn something from someone else.)  Has anyone
> written an indicator (e.g., a stochastic or MACD) using daily data that
> relatively PRECISELY replicates the values of these indicators at the
weekly
> level?  My belief is that the mere increasing of the number of bars
within
> the indicator doesn't cut it.  (e.g., Take a look at the DJIA daily chart
> with a stoch(26,3) and then the same DJIA on a weekly with a stoch(5,3).
> They're not the same thing.)
> 
> Steven Buss
> Walnut Creek, CA
> sbuss@xxxxxxxxxxx

Steve,

I think I have a pretty good approximation for you.

First step.  A Daily indicator on a Daily chart needs to be fed WEEKLY
data.
OK.  We can do this by creating an indicator that plots the Close or
whatever of the CURRENT week.  i.e. it must "look into the future" and
return THIS week's close.
We can do this by creating an indicator called "Weekly" as follows...

    { Weekly }
    { Plot close of THIS week (yet to come) }
     If(DayOfWeek() = 1 {Monday} ,
        Ref(P, 4),
     If(DayOfWeek() = 2 {Tuesday} ,
        Ref(P, 3),
     If(DayOfWeek() = 3 {Wednesday} ,
        Ref(P, 2),
     If(DayOfWeek() = 4 {Thursday} ,
        Ref(P, 1),
     If(DayOfWeek() = 5 {Friday} ,
        P               {Ref(P, 0)} ,
        P)))));  { <<--Not really necessary for this exercise }

Step Two.  Then we create our desired weekly indicator (Stochastic or
whatever) by applying it to the "Weekly" indicator above, and multiplying
its parameters by 5 (Five) to accomodate the fact that it's really being
applied to "Daily" data.

For example, if we wanted to plot an exponential 3-period (weekly) moving
average, 
we would create a new indicator as follows...

    { Weekly MOV }
     WeeklyClose:=Fml("Weekly");
     DaysPerWeek:=5;
     { Ideally, this would have been Mov(P,3,E) ... }
     Mov(WeeklyClose, 3*DaysPerWeek, E);

Compare this to Mov(P,3,E) on a Weekly chart and you'll see they're almost
identical.

Notes:

1.  This approach is fine if the indicator you want a weekly version of can
be applied to another indicator (so that it can be applied to the "Weekly"
indicator as we did above).  BUT!  You wanted to derive a weekly version of
the Stochastic.  Unfortunately, the built-in Stochastic is implicitly
applied to the Close and cannot be appplied to our "Weekly" indicator.  In
this case you will have to "manually" code a new version which CAN be
applied to "Weekly".  i.e. you'll need to look up the real formula for the
Stochastic and code it into a new indicator, then "Weekly-ize" it.

2.  Because "Weekly" is looking into the future in order to plot THIS
week's close, the weekly moving average in our example will be incomplete
for the last week of our daily data.  I will leave it to you ("as an
exercise") to modify our indicators above to more precisely correct for
this limitation.

Enjoy!  Hope this helps...

Paul Chivers
pchivers@xxxxxxxxxxxxxx
Western Australia