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

[amibroker] Re: Metastock code conversion



PureBytes Links

Trading Reference Links

Anthony!

Thanks a bunch the people on this list are amazing!

Thanks again!
Jeff

--- In amibroker@xxxxxxxxxxxxxxx, "Anthony Faragasso" <ajf1111@xxxx> 
wrote:
> //{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!
> 
> 
> Yahoo! Groups Sponsor
> ADVERTISEMENT
> 
> 
> 
> 
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> 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.


------------------------ 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/