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 #

Volatility Exits
. To: "'metastock@xxxxxxxxxxxxx'" <metastock@xxxxxxxxxxxxx>
. Subject: Volatility exits
. From: mikelu <mikelu@xxxxxxxxxxxxxxx>
. Date: Fri, 4 Dec 1998 04:53:30 -0800
. Sender: owner-metastock@xxxxxxxxxxxxx

I want to draw two lines on my chart to use for stops. The following kind of works, but I want the lines to never decrease, and today's chart for INTC shows the lines drooping. Can you tell what I've done wrong?

Thanks,

Mike

Volatility Exits

Dir:= Mov(C, 10, E) - Mov(C, 11, E);
Dir1:= Ref(Mov(C, 10, E) - Mov(C, 11, E),-1);

s2:=HHV(H, 5) - 2*ATR(10);
s21:=Ref((HHV(H, 5) - 2*ATR(10)),-1);
ss2:=LLV(L, 5) + 2*ATR(10);
ss21:=Ref((LLV(L, 5) + 2*ATR(10)),-1);

If( dir>=0, If(dir1<0,s2,Max(s2,s21)), If(dir1>=0,ss2,Min(ss2,ss21)));

s4:=HHV(H, 5) - 4*ATR(10);
s41:=Ref(HHV(H, 5) - 4*ATR(10),-1);
ss4:=LLV(L, 5) + 4*ATR(10);
ss41:=Ref(LLV(L, 5) + 4*ATR(10),-1);

If( dir>=0, If(dir1<0,s4,Max(s4,s41)), If(dir1>=0,ss4,Min(ss4,ss41)));

[10820]
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.