|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.quinncurtis.chart3djava.ChartObj
com.quinncurtis.chart3djava.GraphObj
com.quinncurtis.chart3djava.ChartPlot
com.quinncurtis.chart3djava.GroupPlot
com.quinncurtis.chart3djava.OHLCBarPlot
public class OHLCBarPlot
The OHLCBarPlot class extends the GroupPlot class and displays stock market data in an open-high-low-close format common in financial technical analysis. Every item of the plot is a vertical bar, representing High and Low values; The bar is divided into three zones. The first zone extends from the High value, to the open or close value, whichever is higher. The second zone extends from the open to the close values.The third zone extends from the Low value, to the open or close value, whichever is lower. The first and third zones are filled using the objects ChartAttribute property, while the middle, second, zones is fill using either the openHighAttributes, or closeHighAttributes property, depending on whether the open is higher, or lower, than the close. The group size of the data set must be four. The Y[0] values of the group dataset represent the values for Open, the Y[1] values for High, the Y[2] values for Low, and the Y[3] values for Close.
Field Summary |
---|
Constructor Summary | |
---|---|
OHLCBarPlot()
The default OHLCBarPlot constructor. |
|
OHLCBarPlot(PhysicalCoordinates transform)
This constructor creates a new OHLCBarPlot object that will reside in the specified coordinate system. |
|
OHLCBarPlot(PhysicalCoordinates transform,
GroupDataset dataset,
double rflagwidth,
ChartAttribute attrib)
This constructor creates a new OHLCBarPlot object that will reside in the specified coordinate system. |
|
OHLCBarPlot(PhysicalCoordinates transform,
GroupDataset dataset,
double rflagwidth,
ChartAttribute attrib,
ChartAttribute openhighattrib,
ChartAttribute closehighattrib)
This constructor creates a new OHLCBarPlot object that will reside in the specified coordinate system. |
Method Summary | |
---|---|
boolean |
checkIntersection(ChartPoint3D testpoint,
NearestPointData np)
Returns true if the test point is near one of the data points. |
java.lang.Object |
clone()
Returns an object that is a clone of this OHLCBarPlot object. |
void |
copy(OHLCBarPlot source)
Copies the source OHLCBarPlot object. |
void |
draw(java.awt.Graphics2D g2)
The draw method for this class. |
int |
errorCheck(int nerror)
Checks the OHLCBarPlot object for common errors. |
void |
SetOHLCPlot(GroupDataset dataset,
double rflagwidth,
ChartAttribute attrib)
Sets the properties of an open-high-low-close plot. |
void |
SetOHLCPlot(GroupDataset dataset,
double rflagwidth,
ChartAttribute attrib,
ChartAttribute openhighattrib,
ChartAttribute closehighattrib)
Sets the properties of an open-high-low-close plot. |
Methods inherited from class com.quinncurtis.chart3djava.GroupPlot |
---|
calcNearestPoint, copy, getDataset, getGroupDataset, getStackMode, polygonBasedCheckIntersection, setDataset, setGroupDataset, stackedCheckIntersection |
Methods inherited from class com.quinncurtis.chart3djava.ChartObj |
---|
copy, getChartObjIDCntr, getChartObjType, getThisChartObjID |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OHLCBarPlot()
public OHLCBarPlot(PhysicalCoordinates transform)
transform
- The coordinate system for the new OHLCBarPlot object.public OHLCBarPlot(PhysicalCoordinates transform, GroupDataset dataset, double rflagwidth, ChartAttribute attrib)
transform
- The coordinate system for the new OHLCBarPlot object.dataset
- The OHLCBarPlot plot will represent the group open-high-low-close values in this
group data set. The group size of the data set must be four. The Y[0] values of the group dataset
represent the values for Open, the Y[1] values for High, the Y[2] values for Low, and the Y[3] values
for Close.rflagwidth
- The width of the open and close markers in units of the independent axis.attrib
- Specifies the attributes (line color and line style) for the open-high-low-close plot.public OHLCBarPlot(PhysicalCoordinates transform, GroupDataset dataset, double rflagwidth, ChartAttribute attrib, ChartAttribute openhighattrib, ChartAttribute closehighattrib)
transform
- The coordinate system for the new OHLCBarPlot object.dataset
- The OHLCBarPlot plot will represent the group open-high-low-close values in this
group data set. The group size of the data set must be four. The Y[0] values of the group dataset
represent the values for Open, the Y[1] values for High, the Y[2] values for Low, and the Y[3] values
for Close.rflagwidth
- The width of the open and close markers in units of the independent axis.attrib
- Specifies the attributes (line and fill color) for the open-high-low-close plot.openhighattrib
- If the open is higher than the close, the central part of the bar is filled using this attribute.closehighattrib
- If the close is higher than the open, the central part of the bar is filled using this attribute.Method Detail |
---|
public int errorCheck(int nerror)
errorCheck
in class GroupPlot
nerror
- Current error state
public void copy(OHLCBarPlot source)
source
- The source OHLCBarPlot object.public java.lang.Object clone()
clone
in class GraphObj
public void SetOHLCPlot(GroupDataset dataset, double rflagwidth, ChartAttribute attrib)
dataset
- The open-high-low-close plot will represent the values in this group data set.
The group size of the data set must be four. The Y[0] values of the group dataset represent the values for
Open, the Y[1] values for High, the Y[2] values for Low, and the Y[3] values for Close.rflagwidth
- The width of the open and close markers in units of the independent axis.attrib
- Specifies the attributes (line color and line style) for the open-high-low-close plot.public void SetOHLCPlot(GroupDataset dataset, double rflagwidth, ChartAttribute attrib, ChartAttribute openhighattrib, ChartAttribute closehighattrib)
dataset
- The open-high-low-close plot will represent the values in this group data set.
The group size of the data set must be four. The Y[0] values of the group dataset represent the values for
Open, the Y[1] values for High, the Y[2] values for Low, and the Y[3] values for Close.rflagwidth
- The width of the open and close markers in units of the independent axis.attrib
- Specifies the attributes (line color and line style) for the open-high-low-close plot.openhighattrib
- If the open is higher than the close, the central part of the bar is filled using this attribute.closehighattrib
- If the close is higher than the open, the central part of the bar is filled using this attribute.public void draw(java.awt.Graphics2D g2)
draw
in class GraphObj
g2
- The graphics context.public boolean checkIntersection(ChartPoint3D testpoint, NearestPointData np)
checkIntersection
in class GroupPlot
testpoint
- The test pointnp
- Nearest point information for data based objects.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |