PlotTextSetFont
- write text on the chart with user-defined font

Basic price pattern detection
(AmiBroker 4.80)


SYNTAX PlotTextSetFont( ''text'', ''fontname'', pointsize, x, y, color, bkcolor = colorDefault, yoffset = 0 )
RETURNS NOTHING
FUNCTION This function writes text in specified co-ordinates using specified font

where:

  • 'text' is a text to display
  • 'fontname' is a type face name
  • pointsize is a font size in points
  • x - is x-coordinate in bars (like in LineArray)
  • y - is y-coordinate in dollars
  • color is text color
  • bkcolor is background color
  • yoffset is Y-axis offset (in pixels)
If bkcolor is NOT specified (or equal to colorDefault) text is written with TRANSPARENT background, any other value causes solid background with specified background color.

The function also sets font for all subsequent calls to PlotText().

EXAMPLE Plot(C, "Price", colorDefault );
x = SelectedValue( BarIndex() );
y = Close[ x ];

PlotTextSetFont("E", "Wingdings", 40, x, y, colorGreen, colorDefault, -30 );
PlotText( "C",  BarCount, Close[ BarCount - 1 ], colorRed, colorDefault, -20 ); // will use new font too
SEE ALSO PlotText() function

References:

The PlotTextSetFont function is used in the following formulas in AFL on-line library:

More information:

See updated/extended version on-line.