Welcome Features News Download Registration Support FAQ Wish list Links
Advanced stock charting and analysis program

A-Z Index | Category Index |

PLOTTEXT
- write text on the chart

Indicators
(AFL 2.80)


SYNTAX PlotText( ''text'', x, y, color, bkcolor = colorDefault )
RETURNS NOTHING
FUNCTION This function writes text in specified co-ordinates.

where:

  • x - is x-coordinate in bars (like in LineArray)
  • y - is y-coordinate in dollars
  • color is text color
  • bkcolor is background color

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.

EXAMPLE Plot(C,"Price", colorBlack, styleLine );
Plot(MA(C,20),"MA20", colorRed );

Buy=Cross( C, MA(C,20 ) );
Sell= Cross( MA( C, 20 ), C );

dist =
1.5*ATR(10);

for( i = 0; i < BarCount; i++ )
{
if( Buy[i] ) PlotText( "Buy\n@" + C[ i ], i, L[ i ]-dist[i], colorGreen );
if( Sell[i] ) PlotText( "Sell\n@" + C[ i ], i, H[ i ]+dist[i], colorRed, colorYellow );
}

PlotShapes( Buy * shapeUpArrow + Sell * shapeDownArrow, IIf( Buy, colorGreen, colorRed ) );
SEE ALSO PLOT() function

References:

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


 


About | Privacy | Terms of Use | Contact information
Copyright © 2003 AMIBROKER.COM