PureBytes Links
Trading Reference Links
|
all i have is this....
but if you separate it it works... i dont know exacttly why....
Mc1:=BarsSince(DayOfWeek()=1);
Fc1:=BarsSince(DayOfWeek()=5);
Fc2:=Ref(BarsSince(DayOfWeek()=5),-1)-1;
{Fixed Balance Point Calculation}
FBC:=If(Mc1=0 AND Fc1>2,
{then}(Ref(HHV(H,LastValue(mc1)),-1)+
Ref(LLV(L,LastValue(Mc1)),-1)+
Ref(C,-1))/3,
{else}If(Fc1=0 AND Mc1>5,
{then}(HHV(H,LastValue(Fc2))+
LLV(L,LastValue(Fc2))+C)/3,
{else}If(Fc1=0,
{then}(HHV(H,LastValue(Mc1))+
LLV(L,LastValue(Mc1))+C)/3,
{else}0)));
{Fixed Balance Point Plot}
FBP:=ValueWhen(1,FBC>0,FBC);
FBP;
{NOTE: under Color/Style options, change
plot to last "style" option}
{Weekly Price Range Calculation}
Mc1:=BarsSince(DayOfWeek()=1);
Fc1:=BarsSince(DayOfWeek()=5);
Fc2:=Ref(BarsSince(DayOfWeek()=5),-1)-1;
WRC:=If(Mc1=0 AND Fc1>2,
{then}Ref(HHV(H,LastValue(mc1)),-1)-
Ref(LLV(L,LastValue(Mc1)),-1),
{else}If(Fc1=0 AND Mc1>5,
{then}HHV(H,LastValue(Fc2))-
LLV(L,LastValue(Fc2)),
{else}If(Fc1=0,
{then}HHV(H,LastValue(Mc1))-
LLV(L,LastValue(Mc1)),
{else}0)));
WRP:=ValueWhen(1,WRC>0,WRC);
{Resistance Range}
RR1:= FmlVar("FT-FBP","FBP")+(WRP*.5);
RR2:= FmlVar("FT-FBP","FBP")+(WRP*.618);
{Support Range}
SR1:= FmlVar("FT-FBP","FBP")-(WRP*.5);
SR2:= FmlVar("FT-FBP","FBP")-(WRP*.618);
{Plot Ranges}
RR1;
RR2;
SR1;
SR2;
.........
So what i made is to intruduce this like FT-FBP
Mc1:=BarsSince(DayOfWeek()=1);
Fc1:=BarsSince(DayOfWeek()=5);
Fc2:=Ref(BarsSince(DayOfWeek()=5),-1)-1;
{Fixed Balance Point Calculation}
FBC:=If(Mc1=0 AND Fc1>2,
{then}(Ref(HHV(H,LastValue(mc1)),-1)+
Ref(LLV(L,LastValue(Mc1)),-1)+
Ref(C,-1))/3,
{else}If(Fc1=0 AND Mc1>5,
{then}(HHV(H,LastValue(Fc2))+
LLV(L,LastValue(Fc2))+C)/3,
{else}If(Fc1=0,
{then}(HHV(H,LastValue(Mc1))+
LLV(L,LastValue(Mc1))+C)/3,
{else}0)));
{Fixed Balance Point Plot}
FBP:=ValueWhen(1,FBC>0,FBC);
FBP;
and this like another indicator
{FT Weekly Price Range}
Mc1:=BarsSince(DayOfWeek()=1);
Fc1:=BarsSince(DayOfWeek()=5);
Fc2:=Ref(BarsSince(DayOfWeek()=5),-1)-1;
WRC:=If(Mc1=0 AND Fc1>2,
{then}Ref(HHV(H,LastValue(mc1)),-1)-
Ref(LLV(L,LastValue(Mc1)),-1),
{else}If(Fc1=0 AND Mc1>5,
{then}HHV(H,LastValue(Fc2))-
LLV(L,LastValue(Fc2)),
{else}If(Fc1=0,
{then}HHV(H,LastValue(Mc1))-
LLV(L,LastValue(Mc1)),
{else}0)));
WRP:=ValueWhen(1,WRC>0,WRC);
{Resistance Range}
RR0:= FmlVar("FT-FBP","FBP")+(WRP*.236);
RR1:= FmlVar("FT-FBP","FBP")+(WRP*.382);
RR2:= FmlVar("FT-FBP","FBP")+(WRP*.5);
RR3:= FmlVar("FT-FBP","FBP")+(WRP*.618);
{Support Range}
SR0:= FmlVar("FT-FBP","FBP")-(WRP*.236);
SR1:= FmlVar("FT-FBP","FBP")-(WRP*.382);
SR2:= FmlVar("FT-FBP","FBP")-(WRP*.5);
SR3:= FmlVar("FT-FBP","FBP")-(WRP*.618);
{Plot Ranges}
RR0;
RR1;
RR2;
RR3;
SR0;
SR1;
SR2;
SR3;
and it works
this is all...
thanks
greg
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Metastockusers/
<*> To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|