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

RE: Three Point Break Code



PureBytes Links

Trading Reference Links

I only have it in an ELD attached but the text of the code is below. I
presently have no way to verify they are the same.

{based on three point break - Nison / candlestick.
TS code written by rich estrem}

var:v1(0),v2(0),h1(0),h2(0),bp(0),cur(0),dir(0),bc(0),d1(0),t1(0),c1(0),c2(0
),c3(0)  ;

if t[1] = Sess1FirstBarTime and bc=0 then begin  {initialize first bar of
day}
 if c > c[1] then dir=1 else dir=-1;
 v1=TL_New(D[1],T[1],c[1],D[1],t[1],c);
 v2=TL_New(D,T,c[1],D,t,c);
 h1=TL_New(D[1],T[1],c[1],D,t,c[1]);
 h2=TL_New(D[1],T[1],c,D,t,c);
 bp=c[1]; {breakpoint/price}
 cur=c; {current max price}
 bc=1;
 d1=d;t1=t;c1=c[1];c2=c[1];c3=c[1];
end else begin
 if dir=1  then begin
  if c > cur then begin  {plot a new up box}
   v1=TL_New(D1,T1,c1,D1,t1,c);
   v2=TL_New(D,T,c1,D,t,c);
   h1=TL_New(D1,T1,c1,D,t,c1);
   h2=TL_New(D1,T1,c,D,t,c);
   TL_SetColor(h1,7);TL_SetColor(h2,7);TL_SetColor(v1,7);TL_SetColor(v2,7);
   cur=c; {new current max price}
   bc=bc+1; {inc barcounter}
   bp=c3;
   d1=d;t1=t; c3=c2;c2=c1;c1=c;
  end else begin
   if c < bp then begin {then change direction to dn}
   v1=TL_New(D1,T1,c2,D1,t1,c);
   v2=TL_New(D,T,c2,D,t,c);
   h1=TL_New(D1,T1,c2,D,t,c2);
   h2=TL_New(D1,T1,c,D,t,c);
   TL_SetColor(h1,6);TL_SetColor(h2,6);TL_SetColor(v1,6);TL_SetColor(v2,6);
   cur=c; {new current max price}
   dir=-1; {change direction}
   bp=c1;
   d1=d;t1=t;c1=c;{c2=cur[1]};c3=cur[1];
   end;
  end;
 end;

 if dir=-1  then begin
  if c < cur then begin  {plot a new dn box}
   v1=TL_New(D1,T1,c1,D1,t1,c);
   v2=TL_New(D,T,c1,D,t,c);
   h1=TL_New(D1,T1,c1,D,t,c1);
   h2=TL_New(D1,T1,c,D,t,c);
   TL_SetColor(h1,6);TL_SetColor(h2,6);TL_SetColor(v1,6);TL_SetColor(v2,6);
   cur=c; {new current max price}
   bp=c3;
   d1=d;t1=t;c3=c2;c2=c1;c1=c;
  end else begin
   if c > bp then begin {then change direction to up}
   v1=TL_New(D1,T1,c2,D1,t1,c);
   v2=TL_New(D,T,c2,D,t,c);
   h1=TL_New(D1,T1,c2,D,t,c2);
   h2=TL_New(D1,T1,c,D,t,c);
   TL_SetColor(h1,7);TL_SetColor(h2,7);TL_SetColor(v1,7);TL_SetColor(v2,7);
   cur=c; {new current max price}
   dir=1; {change direction}
   bp=c1;
   d1=d;t1=t;c1=c;c3=cur[1];
   end;
  end;
 end;
end;

plot1(cur,"cur");
plot2(bp,"bp");

-----Original Message-----
From: ericzh2003 [mailto:ericzh2003@xxxxxxxx]
Sent: Tuesday, February 08, 2005 10:21 AM
To: OmegaList
Subject: Three Point Break Code


Hi List,

Does anyone have the 3PB (Three point break) code for Tradestation?

thanks.

Eric

Attachment: Description: Binary data