|
|
Weekly Stochastic on Daily Chart |
|
|
To: Metastock List <metastock@xxxxxxxxxxxxx>
Subject: Weekly Stochastic and Momentum on Daily chart
From: wander@xxxxxxxx
Date: Mon, 19 Apr 1999 16:32:53 -0400
Reply-To: metastock@xxxxxxxxxxxxx
Sender: owner-metastock@xxxxxxxxxxxxx
Ah yes....the old Inbox factor....it seldom fails. Whenever something I post hits my Inbox, I see something I don't like. Usually I can live with it, but sometimes I just can't. :-) It would be more accurate name-wise if I changed the eow variable to sw (for start week). I had considered calling it ftd (first trading day), but it sounded so....well....flowery. (Merlin Olsen would have gone with it I bet. <g>) Anyway, since I had to change mine, I thought I'd save you most of the trouble. Just replace the original version with this revised version .
Regards,
Ken
--
mailto:wander@xxxxxxxx |
|
Wkly Stoch 5 per %K, slowing=3, no %D - I
{start week}
sw:=If(DayOfWeek()<=Ref(DayOfWeek(),-1),1,0);
yestClo:=If(sw>0,Ref(C,-1),0);
{lowest low last 5 weeks}
LLow:=(ValueWhen(1,sw>0, Ref(LowestSince(5,sw>0=1,L),-1)));
{highest high last 5 weeks}
HHigh:=(ValueWhen(1,sw>0,Ref(HighestSince(5,sw>0,H),-1)));
{5 per %K, slowing=3}
y:=(ValueWhen(1,sw>0,(yestClo-LLow)) +
ValueWhen(2,sw>0,(yestClo-LLow)) +
ValueWhen(3,sw>0,(yestClo-LLow)))/
((
ValueWhen(1,sw>0,HHigh) +
ValueWhen(2,sw>0,HHigh) +
ValueWhen(3,sw>0,HHigh)) -
(ValueWhen(1,sw>0,LLow) +
ValueWhen(2,sw>0,LLow) +
ValueWhen(3,sw>0,LLow))) * 100;
y;
|
|
Wkly Stoch 5 per %K, slowing=3, no %D - II
{start week}
sw:=If(DayOfWeek()<=Ref(DayOfWeek(),-1),1,0);
yestClo:=If(sw>0,Ref(C,-1),0);
{lowest low last 5 weeks}
LLow:=(ValueWhen(1,sw>0, Ref(LowestSince(5,sw>0=1,L),-1)));
{highest high last 5 weeks}
HHigh:=(ValueWhen(1,sw>0, Ref(HighestSince(5,sw>0,H),-1)));
{5 per %K, slowing=3}
y:=(ValueWhen(1,sw>0,(yestClo-LLow)) +
ValueWhen(2,sw>0,(yestClo-LLow)) +
ValueWhen(3,sw>0,(yestClo-LLow))) /
((ValueWhen(1,sw>0,HHigh) +
ValueWhen(2,sw>0,HHigh) +
ValueWhen(3,sw>0,HHigh)) -
(ValueWhen(1,sw>0,LLow) +
ValueWhen(2,sw>0,LLow) +
ValueWhen(3,sw>0,LLow)))*100;
{This plots the 3 period %D (ma) of the above.}
z:=(ValueWhen(1,sw>0,y) +
ValueWhen(2,sw>0,y) +
ValueWhen(3,sw>0,y)) / 3;
z
|
|
|
|
| Source / From: |
TOP |
| http://purebytes.com/archives/metastock/ |
|
|