drawLineRelative() |
Top Previous Next |
drawLineRelative( x1, y1, x2, y2, style, thickness, color [, tagID] )
The drawLineRelative function allows you to draw line objects at any location on your chart. Any line object created with drawlineRelative will 'stick' to the location where it was originally anchored. So, a line object originally created at a bar index of -10 will be at a bar index of -20 after 10 new bars come in.
Parameters
Pen Styles
Usage
//draw a line from the high 20 bars ago to the high 5 bars ago. draw it as a solid //line with a thickness of 2 and a color of teal. assign a tagID of 105 so we can //identify it later if we need to remove it. drawLineRelative( -20, high(-20), -5, high(-5), PS_SOLID, 2, Color.teal, 105 );
|