drawShape( shape, location [, fgColor] )
The drawShape() function is a simplified shape drawing function that was introduced in EFS2. It accepts no barIndex parameter so it can only be used to draw shapes at the current bar offset.
Parameters
shape
|
see Shape Objects below
|
location
|
see Location Flags below
|
fgColor
|
optional. the foreground color to use
|
Location Flags
TopRow1
|
draws at the upper margin of the chart
|
TopRow2
|
draws one row down from TopRow1
|
TopRow3
|
draws one row down from TopRow2
|
TopRow4
|
draws one row down from TopRow3
|
AboveBar1
|
draws directly above the high of the bar
|
AboveBar2
|
draws one row above AboveBar1
|
AboveBar3
|
draws one row above AboveBar2
|
AboveBar4
|
draws one row above AboveBar3
|
BelowBar1
|
draws directly below the low of the bar
|
BelowBar2
|
draws one row below BelowBar1
|
BelowBar3
|
draws one row below BelowBar2
|
BelowBar4
|
draws one row below BelowBar3
|
BottomRow1
|
draws at the lower margin of the chart
|
BottomRow2
|
draws one row above BottomRow1
|
BottomRow3
|
draws one row above BottomRow2
|
BottomRow4
|
draws one row above BottomRow3
|
Shape Objects
Shape.CIRCLE
|
draws a circle
|
Shape.SQUARE
|
draws a square
|
Shape.TRIANGLE
|
draws a triangle
|
Shape.DIAMOND
|
draws a diamond
|
Shape.LEFTARROW
|
draws a left arrow
|
Shape.RIGHTARROW
|
draws a right arrow
|
Shape.UPARROW
|
draws a up arrow
|
Shape.DOWNARROW
|
draws a down arrow
|
Shape.LEFTTRIANGLE
|
draws a left-pointing triangle
|
Shape.RIGHTTRIANGLE
|
draws a right-pointing triangle
|
Shape.UPTRIANGLE
|
draws a upward-pointing triangle
|
Shape.DOWNTRIANGLE
|
draws a downward-pointing triangle
|
Usage
//draw a circle above the high of the current bar
drawShape( Shape.CIRCLE, AboveBar1 );
//draw a square below the low of the current bar and color it red
drawShape( Shape.SQUARE, BelowBar1, Color.red );
drawShapeRelative()
drawShapeAbsolute()
|