TextDrawing with linebreaks

Questions about MultiCharts and user contributed studies.
User avatar
Januson
Posts: 119
Joined: 18 Apr 2007
Location: Denmark

TextDrawing with linebreaks

Postby Januson » 17 Nov 2008

Hello
I need to create some text, but the text is long so it would be nice with linebreaks.

I need Bar Date and Time on to seperate lines!
Text_new(D,T,C,Text("Bar Date/Time is ",Date:0:0,"/",Time:0:0));


How do I do that?

fs

Postby fs » 17 Nov 2008

Use two Text_new statements.

User avatar
ABC
Posts: 631
Joined: 16 Dec 2006
Has thanked: 119 times
Been thanked: 356 times
Contact:

Postby ABC » 18 Nov 2008

Januson,
depending on your bar spacing (if too little it might look clumsy), you can work with the vertical text location.
Use:
Text_SetStyle (ObjectID, HorizPl, VertPl)

Parameters
ObjectID - a numerical expression specifying the object ID number

HorizPl - a numerical expression specifying the horizontal placement style for the text object:

0 - to the right of the specified bar
1 - to the left of the specified bar
2 - centered on the specified bar

VertPl - a numerical expression specifying the vertical placement style for the text object:

0 - below the specified price value
1 - above the specified price value
2 - centered on the specified price value

Price value represents the vertical position corresponding to a value on the price scale of a chart.

So you can have up to three text messages using the same price to anchor them, only one is above, one below and the last one centered.

Best regards,

ABC


Return to “MultiCharts”