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

Dynamic Multiple Time Frames (update)



PureBytes Links

Trading Reference Links

I have updated some of the code since my last post concerning the TASC
articles
written by Robert Krausz. The code now plots on the proper days (instead of
1 day
ahead) and they should also be more efficient to calculate. These are named
different
so you should delete the old code after you have installed the new. I will
also post
a follow up with a graphic to show how these plot. Note: The formula's on
the
Equis web page WILL NOT calculate for missing days (Holidays).

  Best wishes,
      Adam Hefner.
VonHef@xxxxxxxxxxxxx

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

name: MTF-Fixed Balance Point

  {Multiple Time Frame
  "Fixed Balance Point" 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);
DwP:=ValueWhen(1,Wt>0,Wt);
Dwp
--------------------------------------------

name: MTF-Fixed Balance Point Step

  {Multiple Time Frame
  "Fixed Balance Point Step" 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);
DwPs:=(ValueWhen(1,Wt>0,Wt)+
       ValueWhen(2,Wt>0,Wt)+
       ValueWhen(3,Wt>0,Wt)+
       ValueWhen(4,Wt>0,Wt)+
       ValueWhen(5,Wt>0,Wt))/5;
Dwps
------------------------------------------------

name: MTF-Dynamic Balance Point

  {Multiple Time Frame
   Dynamic Balance Point  4/23/99}
dt:=DayOfWeek();
dc:=If(Dt=1,BarsSince(Ref(dt,-1)=1)+1,
     If(Dt=2,BarsSince(Ref(dt,-1)=2)+1,
      If(Dt=3,BarsSince(Ref(dt,-1)=3)+1,
       If(Dt=4,BarsSince(Ref(dt,-1)=4)+1,
        BarsSince(Ref(dt,-1)=5)+1))));
DBC:=If(dc=5,
     {then}(Ref(HighestSince(5,dt,H),-1)+
            Ref(LowestSince(5,dt,L),-1)+
            Ref(CLOSE,-1))/3,
     {else}(Ref(HighestSince(4,dt,H),-1)+
            Ref(LowestSince(4,dt,L),-1)+
            Ref(CLOSE,-1))/3);
DBC
------------------------------------------------

name: MTF-Dynamic Balance Point Step

 {Multiple Time Frame
  Dynamic Balance Point Step 4/23/99}
Dr:= FmlVar("MTF-Dynamic Balance Point","DBC");
Dsc:=(ValueWhen(1,Dr,Dr)+
      ValueWhen(5,Dr,Dr)+
      ValueWhen(10,Dr,Dr)+
      ValueWhen(15,Dr,Dr)+
      ValueWhen(20,Dr,Dr))/5;
Dsc
--------------------------------------------------

name: MTF-S&R

  {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*.5);
RR2:=DwP+(Wr*.618);
SR1:=DwP-(Wr*.5);
SR2:=DwP-(Wr*.618);
SR2;
SR1;
RR1;
RR2;
---------------------------------------

name: MTF-Tendency

Mt:=If(DayOfWeek()=1,
    Ref(C,-1)- FmlVar("MTF-Fixed Balance Point","DWP"),
    0);
If(Mt>0,1,If(Mt<0,-1,0))
---------------------------------------