PureBytes Links
Trading Reference Links
|
Adam,
Thanks again for all the work on the "weekly bar in a daily time frame"
problem. Your efforts go a long way to helping me learn and understand the
Metastock language as I am sure this is true with many others on this list.
I will study this and possibly adapt it to the Tactical Trader - Soybean Gap
and Equilateral Quads systems in the Jan99 TASC. (unless of course you have
already done it <G>).
Chuck
-----Original Message-----
From: Adam Hefner <VonHef@xxxxxxxxxxxxx>
To: MetaStock <metastock@xxxxxxxxxxxxx>
Date: Saturday, January 09, 1999 10:53 AM
Subject: Dynamic Multiple Time Frames
>To Chuck and anyone else who is interested,
>The missing day (Holidays) problem with my formula
>turned out to be more of a problem than I anticipated.
>Since I completely revised two of the codes, I am posting
>the complete set again. These are coded for end-of-day
>use only. Please discard previous versions to this (1-9-99)
>post.
>
>{Fibonacci Trader - Fixed Balance Point}
> {NOTE: under Color/Style options, change
> plot to last "style" option}
>
>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;
>
> {Fibonacci Trader- Support & Resistance}
> {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;
>
> {Fibonacci Trader-Fixed Balance Point Step}
>
>FPS:=(ValueWhen(1,FmlVar("FT-FBP","FBC")>0,
> FmlVar("FT-FBP","FBC")) +
> ValueWhen(2,FmlVar("FT-FBP","FBC")>0,
> FmlVar("FT-FBP","FBC")) +
> ValueWhen(3,FmlVar("FT-FBP","FBC")>0,
> FmlVar("FT-FBP","FBC")) +
> ValueWhen(4,FmlVar("FT-FBP","FBC")>0,
> FmlVar("FT-FBP","FBC")) +
> ValueWhen(5,FmlVar("FT-FBP","FBC")>0,
> FmlVar("FT-FBP","FBC")))/5;
>FPS
>
> {Fibonacci Trader - Dynamic Balance Point}
> {Dynamic Balance Point Calculation}
>dt:=DayOfWeek();
>DBC:=(HighestSince(5,DayOfWeek()=dt,H)+
> LowestSince(5,DayOfWeek()=dt,L)+CLOSE)/3;
>DBC
>
>
> {Fibonacci Trader-Dynamic Balance Point Step}
>
>DPS:=(ValueWhen(1,FmlVar("FT-DBP","DBC"),
> FmlVar("FT-DBP","DBC"))+
> ValueWhen(5,FmlVar("FT-DBP","DBC"),
> FmlVar("FT-DBP","DBC"))+
> ValueWhen(10,FmlVar("FT-DBP","DBC"),
> FmlVar("FT-DBP","DBC"))+
> ValueWhen(15,FmlVar("FT-DBP","DBC"),
> FmlVar("FT-DBP","DBC"))+
> ValueWhen(20,FmlVar("FT-DBP","DBC"),
> FmlVar("FT-DBP","DBC")))/5;
>DPS;
>
>
> Best wishes,
> Adam Hefner.
> VonHef@xxxxxxxxxx
>
>-------------------------------------
>
>
|