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

ts2ki chart flashing problem



PureBytes Links

Trading Reference Links

I am using the following indicator as a "tick counter". Works great in TS7,
but when applied to ts2ki, the entire chart keeps flashing with every tick.
Is this a problem with my code? Any help / comments appreciated. BTW, this
is great for putting on tick charts if you trade intraday and primarily use
tick charts.

Machine configuration doesn't seem to be a problem here. P4 1.6 GHz / 1GB
Ram / Win XP Pro. I would rule out any issue with underpowered video cards
etc. as well.

Thanks,

Abhijit

{Tick counter code, implemented as an indicator}
input:
 marker("<"), color(blue);

var:
 txt(" "), txtbool(true);

if txtbool then begin
 value1 = Text_New(date, calctime(time, 1), close, txt);
 value2 = Text_SetStyle(value1, 0, 2);
 value3 = text_setcolor(value1, color);
 txtbool = false;
end;

if LastBarOnChart then begin
 txt = numtostr(ticks[1] - ticks,0);
 txt = marker + txt;
 Text_SetLocation(Value1, Date, calctime(Time, 1), close);
end;