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

Dynamic Multiple Time Frames



PureBytes Links

Trading Reference Links

Ok.....I have learned (the hard way) about the
"lastvalue()" function I used in the previous
version of Dynamic Multiple Time Frames.....
the lesson?.....It doesn't work! So again here is
the latest version with many thanks to Chuck
Wemlinger  for all his hours of testing!
Please delete previous versions and use the
ones posted below. I will give a short explanation
of these indicators in another post.

  Best wishes,
      Adam Hefner.
VonHef@xxxxxxxxxxxxx
VonHef@xxxxxxxxxx

---------------------------------------
version: 1-11-99

name: FT-FBP

  {Fibonacci Trader - Fixed Balance Point}
  {NOTE: under Color/Style options, change
         plot to last "style" option}

 {Monday & Friday count}
Mc1:=BarsSince(DayOfWeek()=1);
Fc1:=BarsSince(DayOfWeek()=5);
 {Monday Holiday count}
Mhc:=If(BarsSince(DayOfWeek()=2)=3,
    {then}(HHV(H,4)+LLV(L,4)+C)/3,
    {else}(HHV(H,3)+LLV(L,3)+C)/3);
 {Fixed Balance Point Calculation}
FBC:=If(Mc1=0 AND Fc1>2,
    {then}(Ref(HighestSince(1,Mc1=0,H),-1)+
        Ref(LowestSince(1,Mc1=0,L),-1)+
        Ref(C,-1))/3,
    {else}If(Fc1=0 AND Mc1>5,
          {then}Mhc,
          {else}If(Fc1=0,
               {then}(HighestSince(1,Mc1=0,H)+
                    LowestSince(1,Mc1=0,L)+C)/3,
                {else}0)));
 {Fixed Balance Point Plot}
FBP:=ValueWhen(1,FBC>0,FBC);
FBP;
----------------------------------------------------------------
name: FT-S&R

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

 {Monday Holiday count}
Mhc:=If(BarsSince(DayOfWeek()=2)=3,
    {then}HHV(H,4)-LLV(L,4),
    {else}HHV(H,3)-LLV(L,3));
WRC:=If(Mc1=0 AND Fc1>2,
    {then}Ref(HighestSince(1,Mc1=0,H),-1)-
        Ref(LowestSince(1,Mc1=0,L),-1),
    {else}If(Fc1=0 AND Mc1>5,
          {then}Mhc,
          {else}If(Fc1=0,
               {then}HighestSince(1,Mc1=0,H)-
                    LowestSince(1,Mc1=0,L),
                {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}
SR1;
SR2;
RR1;
RR2;
-----------------------------------------
name: FT-FBPS

  {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;
---------------------------------------------------
name: FT-DBP

  {Fibonacci Trader - Dynamic Balance Point}
  {Dynamic Balance Point Calculation}
dt:=DayOfWeek();
DBC:=(HighestSince(5,dt,H)+
     LowestSince(5,dt,L)+CLOSE)/3;
DBC;
---------------------------------------------------
name: FT-DBPS

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