AddChartSquare()

Description

AddChartSquare() draws a square:

See AddChartArrowUp(), AddChartArrowDown(), AddChartDiamond(), AddChartDot(), AddChartTriangleUp(), AddChartTriangleDown().

Usage

DrawSqare(string name, bool autoScale, int barsAgo, double y, Color color)
DrawSqare(string name, bool autoScale, DateTime time, double y, Color color)

Return Value

A drawing object of the type ISquare (interface)

Parameter

name

A clearly identifiable name for the drawing object

autoScale

Adjusts the scale of the y-axis so that drawing objects can be viewed in their entirety

barsAgo

Sets the preceding bar at which the square should be drawn (0 = current bar)

Time

Date/time of the bar at which the square should be drawn

Y

y-value for the square

color

Color of the drawing object

Example

// Draws a dark red square at the current bar 10 ticks above the high
AddChartSquare("MySquare-" + ProcessingBarIndex, true, 0, High[0] + 10*TickSize, Color.DarkRed);

Last updated