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

TS8 intrabarpersist



PureBytes Links

Trading Reference Links

Any TS8 wizards out there? I'm suck on the alert code below. Using intrabar
persist to have alert sound only once, the first time in bar that condition
is true. It does that, but also alert sounds at the end of the bar when a
"real" alert is triggered when it seems it shouldn't. I know I must be
missing something dumb, but I still haven't found it a week later. Any
ideas?

Thanks,
Chris

p.s., intraday 4 min chart, indicator is for $tick which is data6 on the
chart. indicator is "based on" data6.




variables:    LL(0),  HH(0),   intrabarpersist htick(0),
intrabarpersist  ltick(0),  Length1(20) ;

if barstatus(6)=2 then begin
 LL = Lowest(L, Length1 );   HH=Highest(H, Length1 );
 if H>HH[1] then begin
  plot5(H,"Hup");   plot6(maxlist(l,HH[1]),"Lup");
 end;
 if L<LL[1] then begin
  plot7(minlist(LL[1],h),"Hdn");     plot8(l,"Ldn");
 end;
 Htick=0;  Ltick=0;
end else  begin
 if H>HH[1] then begin
  if Htick=0 then alert("tick");   htick=1;
  plot5(H,"Hup");     plot6(maxlist(l,HH[1]),"Lup");
 end;
 if L<LL[1] then begin
  if Ltick=0  then alert("tick");   Ltick=1;
  plot7(minlist(LL[1],h),"Hdn");     plot8(l,"Ldn");
 end;
end;