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

Re: Creeping Text



PureBytes Links

Trading Reference Links

The way I would do it is to use the function "Text_SetLocation" explained
below from the help files.
Initialize a variable for the text then assign the text to the variable,
then reference the variable in the Text_SetLocation function

VARS: txtvar(0);

if currentbar = 1 then txtvar = Text_New(date,time,0," test ");

Text_SetLocation(txtvar,Lastcalcdate,Lastcalctime,Highest(H,20){just a
suggestion for a vertical value, this can be anything});

Text_SetStyle(txtvar,1,1); {this will help to place the text}
..............................

help file:

Text_SetLocation

Category: Drawing Object

Function: Text_SetLocation(TX_Ref,Date,Time,Val)

Usage:

Moves a text object to a new location in the chart window specified by means
of the date, time and value specified. The date and time inputs can be
considered the x-coordinates and the value can be considered the
y-coordinate. If the function is not successful, an error code is returned.


Example:

Text_SetLocation(24,950418,1100,32) moves text object number 24 to the new
location. The new location will be where April, 18, 1995 at 11am intersects
with the price 32.



>Monte
>
>you must use Text_New once on barnumber 1 to start the text, then on
>following bars Text_Delete, then rewrite with another Text_New command.
>This way the text is deleted and rewritten on each new bar.
>
>wayne
>
>> After writing text on a chart window, the text will creep to the left as
>> more bars are added over time, eventually disappearing off the left edge
>> of the window. Does anyone know how to write text so it stays in the
>> same position in the chart window (i.e., relative to the window border)
>> without drifting to the left over time? Thanks.
>>
>> Monte
>
>