BNPoint Class

The BNPoint class is used to define a drawing object point based on a bar number and a price value. Drawing objects positioned with a BNPoint will move along with the bars they are anchored to when the chart is scrolled.

A BNPoint refers to the absolute bar index (zero-based) of the collection of bars in a chart. Note that this is not the same as the CurrentBar reserved word which counts the number of bars available for analysis after MaxBarsBack. This means that if you want to plot a drawing object (such as a VerticalLine) on the 4th plotted bar in a chart, you would specify a BNPoint index of 3.

For example, if MaxBarsBack is 10 and your analysis technique is calculating at current bar 20, the following code snippet will plot a VerticalLine drawing object on the bar with a BNPoint index of 20 from the start of the chart, which is the same as the CurrentBar.

If CurrentBar=20 then Begin

myBNVertLine = VerticalLine.Create(BNPoint.Create(CurrentBar+MaxBarsBack-1,0));

DrawingObjects.Add(myBNVertLine);

End;

Namespace: elsystem.drawingobjects

Properties

   Additional properties, methods, and events are described in the classes listed under Inheritance Hierarchy (see below).

  Name Type Description
Public property BarNumber int Gets or sets an integer representing the absolute bar number.
Methods
  Name Description
Public property Create(BarNumber,Price) Initializes a new instance of the class and sets the location at the specified BarNumber (int) and Price (double).
Public property ToString() Generates a string identifying the point's position.
Inheritance Hierarchy

elsystem.Object

elsystem.DOPoint

elsystem.DrawingObjects.BNPoint