MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

A B C D E F G H I J K L M N O P R S T U V W Y Z #

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/

Equis and MetaStock® and MetaStock Professional® are registered trademarks of Equis International. Achelis Binary Wave®, The DownLoader®,
Expert Advisor®, OptionScope®, Quotecenter® and Smart Charts® are trademarks of Equis International, a Thomson Reuters company.

TradeStation® Pro, TradeStation® 2000i, OptionStation®, SuperCharts®, PowerEditor® and EasyLanguage®
are registered trademarks of TradeStation Technologies, Inc. Other names and marks referred to are the property of their respective owners.

All information provided on this website is for educational purposes only. Trading involves risk, including possible loss of principal and other losses.

Ten i inne materiały na tej stronie zostały zamieszczone zostały jedynie w celach edukacyjnych, nie ponoszę żadnej odpowiedzialno¶ci za ich stosowanie.

Gra na giełdzie i rynkach walutowych (FOREX) niesie ze sob± ryzyko poważnych strat finansowych!