| FUNCTION |
Plots arrows and other shapes on any chart pane.
Parameters:
- shape defines type of the symbol. when shape is zero nothing is plotted values other than zero cause plotting various pre-defined shapes. Odd values plot shape BELOW indicator, even values plot shape ABOVE indicator.
- color defines color of shape
- layer defines layer number on which shapes are plotted
- yposition defines Y-position where shapes are plotted (by default they are plotted 'around' graph0 (first indicator) line)
- offset - (or distance) parameter (by default -12 ), Offset is expressed in SCREEN pixels.
Negative offsets shift symbols down, positive offsets shift symbol up. To place the shape exactly at ypostion, specify 0 as offset
Constants for shapes:
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:
PlotShapes( IIF( buy, shapeDigit9 + shapePositionAbove, shapeNone ), colorGreen );
Example 2:
Graph0=MACD();
Graph1=Signal();
Buy=Cross(Graph0, Graph1);
Sell=Cross(Graph1, Graph0);
PlotShapes( ( Buy OR Sell ) * ( 1 + Cum( Buy OR Sell ) % 52 ), IIf( Buy, colorGreen, colorRed ), 5 );
GraphXSpace = 5;
|