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

Re: [amibroker] Metastock code conversion



PureBytes Links

Trading Reference Links








//{Multiple Time Frames "Weekly Support & Resistance" 4/23/99}

Dw=IIf(DayOfWeek()<=Ref(DayOfWeek(),-1),1,0);
Wt=IIf(Dw==1,(Ref(HighestSince(Dw==1,H),-1)+Ref(LowestSince(Dw==1,L),-1) +Ref(C,-1))/3,0);
Wh=IIf(Dw==1,Ref(HighestSince(Dw==1,H),-1),0);
Wl=IIf(Dw==1,Ref(LowestSince(Dw==1,L),-1),0);
Wr=ValueWhen(Wh>0,Wh,1)-ValueWhen(Wl>0,Wl,1);
DwP=ValueWhen(Wt>0,Wt,1);

RR2=DwP+(Wr*.618);

SR2=DwP-(Wr*.618);
Plot(SR2,"SR2",colorRed,styleLine);
Plot(C,"Close",colorBlack,styleCandle); 
Plot(RR2,"RR2",colorRed,styleLine); 
-------Original Message-------
 

From: amibroker@xxxxxxxxxxxxxxx
Date: Wednesday, May 21, 2003 8:52:16 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Metastock code conversion
 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!Send BUG REPORTS to bugs@xxxxxxxxxxxxxSend 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 the Yahoo! Terms of Service. 
 







____________________________________________________  IncrediMail - Email has finally evolved - Click Here






Yahoo! Groups Sponsor


  ADVERTISEMENT  









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 the Yahoo! Terms of Service.

Attachment: Description: ""