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

RE: formula question



PureBytes Links

Trading Reference Links

John,

I'm not sure if you are asking for the stochastics formula itself or the
implementation using MetaStock's built in formula.  I'll assume the latter..

{Fast Stochastic, with variables 12,3}
FAST:=Stoch(12,3);
{This is the "fast" line with smoothing of 3 periods}
SLOW:=Mov(FAST,3,S);
{The "slow" stochastic is just a simple moving average of the fast}

{For the FAST crossing up through the SLOW}
UP:=Cross(FAST,SLOW);
{Likewise for the crossing down through the SLOW}
DWN:=Cross(SLOW,FAST);

If you would rather trigger off of the threshold lines, such as 70 or 30,
just substitute those values for FAST or SLOW above.

Since the built in formula for stochastics is built off of the closing
price, this should give you the signals that you are looking for having
crossed today.  If you want to add the additional test of not having crossed
yesterday use the formula

Ref(UP,-1)<>1; {This tests that the UP signal wasn't generated yesterday}

You can do the same for the down signal, and combine these as you like.

Dave Nadeau
Fort Collins, CO

-----Original Message-----
From: owner-metastock@xxxxxxxxxxxxx
[mailto:owner-metastock@xxxxxxxxxxxxx]On Behalf Of john graham duff
Sent: Tuesday, February 06, 2001 3:27 PM
To: metastock@xxxxxxxxxxxxx
Subject: formula question


hi
could you please inform me how to write the formula
for the STOCHASTICS (12,3,3) line to have crossed at the close today but had
not crossed at the close yesterday for rising and falling lines

cheers, jd
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com