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?
Simple drawing question
- Alex Kramer
- Posts: 834
- Joined: 23 Feb 2006
here's a code that should do it right, please try this:
input : num_digits(4), label_offset_in_points(1);
var : value1(text_new(d,t,o + label_offset_in_points points,numtostr(o,num_digits)));
if lastbaronchart then
begin
text_setlocation(value1,d,t,o + label_offset_in_points points);
text_setstring(value1,numtostr(o,num_digits));
end;
input : num_digits(4), label_offset_in_points(1);
var : value1(text_new(d,t,o + label_offset_in_points points,numtostr(o,num_digits)));
if lastbaronchart then
begin
text_setlocation(value1,d,t,o + label_offset_in_points points);
text_setstring(value1,numtostr(o,num_digits));
end;
- Stanley Miller
- Posts: 556
- Joined: 26 Jul 2005
- Has thanked: 3 times
MultiCharts' PowerLanguage is fully compatible with TS EasyLanguage. So you can review original EasyLanguage tutorials to learn more about basic conceptions and syntax options:
https://www.TS.com/support/bo ... tarted.pdf
https://www.TS.com/support/bo ... _Guide.pdf
We'll add to our help file only the functions and reserved words which are not supported originally by TS.
https://www.TS.com/support/bo ... tarted.pdf
https://www.TS.com/support/bo ... _Guide.pdf
We'll add to our help file only the functions and reserved words which are not supported originally by TS.