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

[amibroker] Krausz Bands Conversion from MS



PureBytes Links

Trading Reference Links

Hello,

Is anyone able to translate the Metastock formula below to produce the Krausz Bands in Amibroker.

The link below shows them as weekly support and resistance lines plotted on a daily chart.

http://www.cedarcreektrading.com/Charts/chart7.gif

Thanks to anyone who will tackle this.

 

Greg

--------------------------------------------------

Upper Krausz Band

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);

RR2:=DwP+(Wr*.618);

RR2;

--------------------------------------------------------------

 Lower Krausz Band

 

 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);

SR2:=DwP-(Wr*.618);

SR2;



Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software Stock investment software


YAHOO! GROUPS LINKS