Simple drawing question

Questions about MultiCharts and user contributed studies.
SP
Posts: 444
Joined: 06 Feb 2006
Has thanked: 36 times
Been thanked: 280 times

Simple drawing question

Postby SP » 01 Aug 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?
Attachments
picture1.png
picture1.png (43.2 KiB) Viewed 281 times

User avatar
Alex Kramer
Posts: 834
Joined: 23 Feb 2006

Postby Alex Kramer » 01 Aug 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;

SP
Posts: 444
Joined: 06 Feb 2006
Has thanked: 36 times
Been thanked: 280 times

Postby SP » 01 Aug 2006

Many Thanks Alex,

it does the job right now.

Is there a plan to add an detailed user guide for the PLEditor for all functions, reserved words, alerts and drawing tools?

PS: Thanks also for adding the ARPS UNIVERSAL TOOL for free.

User avatar
Stanley Miller
Posts: 556
Joined: 26 Jul 2005
Has thanked: 3 times

Postby Stanley Miller » 01 Aug 2006

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.


Return to “MultiCharts”