Thursday, September 09, 2010

Vertical Line [VLINE]

Descripton
Summary:
The drawing script is used to draw a vertical line between two points.


Variables
TypeIdentifierDescription

OnInitialize
Function Parameters
TypeIdentifierDescription
SymbolsymbolIndexUse for the underlying symbol index on which to draw the Vertical Line.
Implementation
	 ' Initialize the Vertical Line.
	DrawingInitialize(symbolIndex, 2)

OnDraw
Function Parameters
TypeIdentifierDescription
Implementation
	 ' Get the X value of core point 0.
	Define x1 As Integer = DrawingCorePointBarIndex(0)
	 ' Get the Y value of core point 0.
	Define y1 As Number = DrawingCorePointValue(0)
	 ' Get the X value of core point 1.
	Define x2 As Integer = DrawingCorePointBarIndex(0)
	 ' Get the Y value of core point 1.
	Define y2 As Number = DrawingCorePointValue(1)
	 ' Reset core point 1 with the X value of core point 0.
	DrawingSetCorePoint(1, x2, y2)
	DrawingSetLine(0, x1, y1, "", x2, y2, "")

Copyright © 2010 IQBroker, LLC. All rights reserved.