Simple drawing question
Posted: Aug 01 2006
I wrote a little code that should draw the open as text on the last bar.
But i draws the open on every new bar.
[code]
vars:dayopen(0);
if date[0]<>date[1] then begin
dayopen=open;
end;
if lastbaronchart then begin
value1=text_new(date,time,dayopen,"dayopen @ "+numtostr(dayopen, 2)) ;
text_setcolor(value1,yellow);
text_setstyle(value1,1,2);
end;[/code]
Could i avoid this, maybe with text_delete or is there a drawfunction update_text?
But i draws the open on every new bar.
[code]
vars:dayopen(0);
if date[0]<>date[1] then begin
dayopen=open;
end;
if lastbaronchart then begin
value1=text_new(date,time,dayopen,"dayopen @ "+numtostr(dayopen, 2)) ;
text_setcolor(value1,yellow);
text_setstyle(value1,1,2);
end;[/code]
Could i avoid this, maybe with text_delete or is there a drawfunction update_text?