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

[amibroker] Metastock code conversion



PureBytes Links

Trading Reference Links

Looking for some help to convert the following metastock code to 
amibroker code!

{Multiple Time Frame
  "Weekly Support & Resistance" 4/23/99}
 
Dw:=If(DayOfWeek()<=Ref(DayOfWeek(),-1),1,0);
Wt:=If(Dw=1,
    {then}(Ref(HighestSince(1,Dw=1,H),-1)+
           Ref(LowestSince(1,Dw=1,L),-1) +
           Ref(C,-1))/3,
    {else}0);
Wh:=If(Dw=1,
    {then}Ref(HighestSince(1,Dw=1,H),-1),
    {else}0);
Wl:=If(Dw=1,
    {then}Ref(LowestSince(1,Dw=1,L),-1),
    {else}0);
Wr:=ValueWhen(1,Wh>0,Wh)-ValueWhen(1,Wl>0,Wl);
DwP:=ValueWhen(1,Wt>0,Wt);
RR1:=DwP+(Wr*.55); 
RR2:=DwP+(Wr*.89);
 
SR1:=DwP-(Wr*.55);
SR2:=DwP-(Wr*.89);


thanks in advance!


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/uetFAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/