I want to put a "ticks left" indicator on my chart, and i am running into a few issues, first, the tick count is not correct, as it seems that ticks are skipped (in playback i have been testing this).
Second, i want the indicator to be at the right of the last bar, and this has been a challenge to figure out how to do on the tick chart.
Here is some code:
Code: Select all
vars:
vTextID(0),
intrabarpersist vTickCount(0);
if barstatus(1)=2 then begin
vTickCount = 1500;
end;
vTickCount = vTickCount-1;
text_delete(vTextID);
vTextID = text_new(date,time,high,"<- " + numtostr(vTickCount,0));