PlotShapes
|
Exploration / Indicators |
SYNTAX | PlotShapes( shape, color, layer = 0, yposition = graph0, offset = -12, XShift = 0 ); |
RETURNS | NOTHING |
FUNCTION | Plots arrows and other shapes on any chart pane. Parameters:
shapeNone, shapeUpArrow, shapeDownArrow, shapeHollowUpArrow, shapeHollowDownArrow, shapeSmallUpTriangle, shapeSmallDownTriangle, shapeHollowSmallUpTriangle, shapeHollowSmallDownTriangle, shapeUpTriangle, shapeDownTriangle, shapeHollowUpTriangle, shapeHollowDownTriangle, shapeSmallSquare, shapeHollowSmallSquare, shapeSquare, shapeHollowSquare, shapeSmallCircle, shapeHollowSmallCircle, shapeCircle, shapeHollowCircle, shapeStar, shapeHollowStar, shapeDigit0, shapeDigit1, shapeDigit2, shapeDigit3, shapeDigit4, shapeDigit5, shapeDigit6, shapeDigit7, shapeDigit8, shapeDigit9, shapePositionAbove |
EXAMPLE | Example 1:
Example 2:
|
SEE ALSO | PLOT() function |
Tomasz Janeczko tj --at-- amibroker.com 2003-07-01 09:31:04 | You can position your arrows relative to High/Low too. See the code below for the example: Buy=Cross(MACD(), Signal()); Sell=Cross(Signal(), MACD()); shape = Buy * shapeUpArrow + Sell * shapeDownArrow; Plot( Close, "Price", colorBlack, styleCandle ); PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, Low, High ) ); GraphXSpace = 5; |
Tomasz Janeczko tj --at-- amibroker.com 2006-06-07 17:14:40 | ShapePositionAbove must NOT be used together with shapes that have positions already included (all those which have "Down" or "Up" in the name). All "Down" shapes are positioned ABOVE already and "Up" shapes are positioned BELOW already, so it makes no sense to add those two. So you may only use ShapePosition above to the following shapes: shapeSmallSquare, shapeHollowSmallSquare, shapeSquare, shapeHollowSquare, shapeSmallCircle, shapeHollowSmallCircle, shapeCircle, shapeHollowCircle, shapeStar, shapeHollowStar, shapeDigit0, shapeDigit1, shapeDigit2, shapeDigit3, shapeDigit4, shapeDigit5, shapeDigit6, shapeDigit7, shapeDigit8, shapeDigit9 |
The PlotShapes function is used in the following formulas in AFL on-line library:
See updated/extended version on-line.