com.steema.teechart.styles
Class OHLC

java.lang.Object
  extended by com.steema.teechart.TeeBase
      extended by com.steema.teechart.styles.Series
          extended by com.steema.teechart.styles.CustomPoint
              extended by com.steema.teechart.styles.Custom
                  extended by com.steema.teechart.styles.OHLC
All Implemented Interfaces:
ISeries
Direct Known Subclasses:
Candle, PointFigure

public class OHLC
extends Custom

Title: OHLC class

Description: OHLC is an base Series class that maintains lists for Open, Close, High and Low values.

Copyright (c) 2005-2013 by Steema Software SL. All Rights Reserved.

Company: Steema Software SL


Nested Class Summary
 
Nested classes/interfaces inherited from class com.steema.teechart.styles.Series
Series.MarkTextResolver
 
Field Summary
protected  ChartPen linePen
           
protected  boolean treatNans
           
protected  TreatNullsStyle treatnulls
           
protected  ValueList vHighValues
           
protected  ValueList vLowValues
           
protected  ValueList vOpenValues
           
 
Fields inherited from class com.steema.teechart.styles.Custom
bAreaBrush, bClickableLine, bDark3D, drawArea, drawLine, pAreaLines
 
Fields inherited from class com.steema.teechart.styles.CustomPoint
iStacked, point
 
Fields inherited from class com.steema.teechart.styles.Series
AUTODEPTH, AUTOZORDER, bActive, bBrush, bColorEach, calcVisiblePoints, colorMember, customMarkText, drawBetweenPoints, endZ, firstVisible, hasZValues, iColors, iNumSampleValues, iZOrder, labelMember, lastVisible, listenerList, mandatory, manualData, marks, middleZ, notMandatory, percentDecimal, percentFormat, sLabels, startZ, useAxis, useSeriesColor, valueFormat, vxValues, vyValues, yMandatory
 
Fields inherited from class com.steema.teechart.TeeBase
chart, InternalUse
 
Constructor Summary
OHLC()
           
OHLC(IBaseChart c)
           
 
Method Summary
 int add(DateTime aDate, double open, double high, double low, double close)
          Adds new point with specified DateTime x and double open, high, low and close.
 void add(double[] xValues, double[] yValues, boolean append)
           
 int add(double x, double y)
          Adds a new point with specified x and y values.
 int add(double open, double high, double low, double close)
          Adds new point with specified double open, high, low and close.
 int add(double index, double open, double high, double low, double close)
          Adds new point with specified double index and double open, high, low and close.
 int add(int index, double open, double high, double low, double close)
          Adds new point with specified integer index and double open, high, low and close.
protected  void addSampleValues(int numValues)
           
protected  double calcMinMaxValue(boolean isMin)
           
protected  boolean doNotPaintNull()
           
 ValueList getCloseValues()
          All the Stock market Close values.
 ValueList getDateValues()
          All the Stock market Date values.
 ValueList getHighValues()
          All the Stock market High values.
 ChartPen getLinePen()
          Determines pen to draw the line connecting all points.
 ValueList getLowValues()
          All the Stock market Low values.
 double getMaxYValue()
          The Maximum Value of the Series Y Values List.
 double getMinYValue()
          The Minimum Value of the Series Y Values List.
 SeriesOHLCPoint getOHLCPoint(int index)
          Point characteristics
 ValueList getOpenValues()
          All the Stock market Open values.
 boolean getTreatNaNAsNull()
           
 TreatNullsStyle getTreatNulls()
          Defines how null points are treated.
protected  boolean IgnoreNull()
           
 boolean isValidSourceOf(ISeries value)
          Validates Series datasource.
protected  int numSampleValues()
           
 void setCloseValues(ValueList value)
          Sets all Stock market Close values.
 void setDateValues(ValueList value)
          Sets all Stock market Date values.
 void setHighValues(ValueList value)
          Sets all Stock market High values.
 void setLowValues(ValueList value)
          Sets all Stock market Low values.
 void setOpenValues(ValueList value)
          Sets all Stock market Open values.
 void setTreatNaNAsNull(boolean value)
           
 void setTreatNulls(TreatNullsStyle value)
           
 
Methods inherited from class com.steema.teechart.styles.Custom
assign, calcHorizMargins, calcVerticalMargins, clicked, draw, drawHiddenValue, drawLegendShape, drawValue, getAreaBrushColor, getBrush, getClickableLine, getColorEachLine, getDark3D, getInvertedStairs, getLineHeight, getOpacity, getOutLine, getSmoothed, getStairs, getTransparency, readResolve, setChart, setClickableLine, setColor, setColorEachLine, setDark3D, setInvertedStairs, setLineHeight, setOpacity, setSmoothed, setStairs, setTransparency
 
Methods inherited from class com.steema.teechart.styles.CustomPoint
addSeriesMouseListener, calcXPos, calcYPos, calcZOrder, clickedPointer, drawMark, drawPointer, getMaxXValue, getMinXValue, getOriginPos, getPointer, getStacked, onGetPointerStyle, removePointerStyleResolver, removeSeriesMouseListener, sameClassOrigin, setPointerStyleResolver, setStacked
 
Methods inherited from class com.steema.teechart.styles.Series
add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, addChartValue, added, addedValue, addNull, addNullXY, addSeriesPaintListener, addValues, assignDispose, assignValues, associatedToAxis, beginUpdate, calcFirstLastVisibleIndex, calcPercentSt, calcPosValue, calculateMarkPosition, calcXPosValue, calcXSizeValue, calcYPosValue, calcYSizeValue, canAddRandomPoints, changeType, checkDataSource, checkMouse, checkOrder, checkOtherSeries, clear, clearLists, clicked, clone, cloneSeries, convertArray, countLegendItems, createNewSeries, createNewSeries, createNewSeries, createSubGallery, dataSourceArray, delete, delete, delete, dispose, doAfterDrawValues, doBeforeDrawChart, doBeforeDrawValues, doClick, doClickPointer, doDoubleClick, drawLegend, drawLegend, drawMarks, drawMarksSeries, drawSeries, drawSeriesForward, drawValuesForward, endUpdate, fillSampleValues, fillSampleValues, fireSeriesMouseEvent, fireSeriesPaint, firstDisplayed, galleryChanged3D, getActive, getAllowSinglePoint, getColor, getColorEach, getColorMember, getColors, getCount, getCountLegendItems, getCursor, getCustomHorizAxis, getCustomVertAxis, getDataSource, getDefaultColor, getDefaultNullValue, getDepth, getDescription, getEndZ, getFields, getFirstVisible, getFunction, getHasZValues, getHorizAxis, getHorizontalAxis, getLabelMember, getLabels, getLastVisible, getLegendString, getMandatory, getMandatoryAxis, getMarks, getMarkText, getMarkValue, getMaxZValue, getMiddleZ, getMinZValue, getNotMandatory, getNumGallerySeries, getNumSampleValues, getOriginValue, getPercentFormat, getPoint, getSeriesColor, getShowInLegend, getStartZ, getTitle, getUseAxis, getValueColor, getValueFormat, getValueIndexSwapper, getValueList, getValueList, getValueMarkText, getValuesLists, getVertAxis, getVerticalAxis, getVisible, getXValues, getYMandatory, getYValueList, getYValues, getZOrder, hasClickEvents, hasDataSource, hasListenersOf, hasNoMandatoryValues, isNull, isPointInChartRect, isValidSeriesSource, isValidSourceOf, lastDisplayed, lastVisibleMark, legendItemColor, legendToValueIndex, maxMarkWidth, moreSameZOrder, mouseEvent, newFromType, onDisposing, prepareForGallery, prepareLegendCanvas, randomBounds, recalcGetAxis, refreshSeries, removeMarkTextResolver, removeSeriesPaintListener, repaint, sameClass, setActive, setColorEach, setColorMember, setColors, setCursor, setCustomHorizAxis, setCustomHorizAxis, setCustomVertAxis, setCustomVertAxis, setDataSource, setDefaultNullValue, setDepth, setEndZ, setFunction, setHorizontal, setHorizontalAxis, setLabelMember, setLabels, setMarks, setMarkTextResolver, setMiddleZ, setNull, setNull, setPercentFormat, setSeriesColor, setShowInLegend, setStartZ, setSubGallery, setTitle, setValueFormat, setValueList, setVerticalAxis, setVisible, setXValues, setYValues, setZOrder, setZPositions, sortByLabels, sortByLabels, swapValueIndex, titleOrName, toString, valueListOfAxis, valuesListAdd, xScreenToValue, yScreenToValue
 
Methods inherited from class com.steema.teechart.TeeBase
getChart, invalidate, setBooleanProperty, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.steema.teechart.styles.ISeries
getChart, invalidate
 

Field Detail

vHighValues

protected ValueList vHighValues

vLowValues

protected ValueList vLowValues

vOpenValues

protected ValueList vOpenValues

linePen

protected ChartPen linePen

treatnulls

protected TreatNullsStyle treatnulls

treatNans

protected boolean treatNans
Constructor Detail

OHLC

public OHLC(IBaseChart c)

OHLC

public OHLC()
Method Detail

getDateValues

public ValueList getDateValues()
All the Stock market Date values.
You can access Date values in the same way you can access X or Y values.

Returns:
ValueList

setDateValues

public void setDateValues(ValueList value)
Sets all Stock market Date values.
You can access Date values in the same way you can access X or Y values.

Parameters:
value - ValueList

getCloseValues

public ValueList getCloseValues()
All the Stock market Close values.
You can access Close values in the same way you can access X or Y values.

Returns:
ValueList

setCloseValues

public void setCloseValues(ValueList value)
Sets all Stock market Close values.
You can access Close values in the same way you can access X or Y values.

Parameters:
value - ValueList

getOpenValues

public ValueList getOpenValues()
All the Stock market Open values.
You can access Open values in the same way you can access X or Y values.

Returns:
ValueList

setOpenValues

public void setOpenValues(ValueList value)
Sets all Stock market Open values.
You can access Open values in the same way you can access X or Y values.

Parameters:
value - ValueList

getHighValues

public ValueList getHighValues()
All the Stock market High values.
You can access High values in the same way you can access X or Y values.

Returns:
ValueList

setHighValues

public void setHighValues(ValueList value)
Sets all Stock market High values.
You can access High values in the same way you can access X or Y values.

Parameters:
value - ValueList

getLowValues

public ValueList getLowValues()
All the Stock market Low values.
You can access High values in the same way you can access X or Y values.

Returns:
ValueList

setLowValues

public void setLowValues(ValueList value)
Sets all Stock market Low values.
You can access High values in the same way you can access X or Y values.

Parameters:
value - ValueList

add

public int add(int index,
               double open,
               double high,
               double low,
               double close)
Adds new point with specified integer index and double open, high, low and close.

Parameters:
index - int
open - double
high - double
low - double
close - double
Returns:
int index of added point

add

public int add(double index,
               double open,
               double high,
               double low,
               double close)
Adds new point with specified double index and double open, high, low and close.

Parameters:
index - double
open - double
high - double
low - double
close - double
Returns:
int index of added point

add

public int add(double open,
               double high,
               double low,
               double close)
Adds new point with specified double open, high, low and close.

Parameters:
open - double
high - double
low - double
close - double
Returns:
int index of added point

add

public int add(DateTime aDate,
               double open,
               double high,
               double low,
               double close)
Adds new point with specified DateTime x and double open, high, low and close.

Parameters:
aDate - DateTime
open - double
high - double
low - double
close - double
Returns:
int index of added point

isValidSourceOf

public boolean isValidSourceOf(ISeries value)
Validates Series datasource.

Parameters:
value - ISeries the series to validate.
Returns:
boolean true if value can be a Series data source.

getMaxYValue

public double getMaxYValue()
The Maximum Value of the Series Y Values List.

Overrides:
getMaxYValue in class CustomPoint
Returns:
double

getMinYValue

public double getMinYValue()
The Minimum Value of the Series Y Values List.
As some Series have more than one Y Values List, this Minimum Value is the "Minimum of Minimums" of all Series Y Values lists.

Overrides:
getMinYValue in class CustomPoint
Returns:
double

calcMinMaxValue

protected double calcMinMaxValue(boolean isMin)

numSampleValues

protected int numSampleValues()
Overrides:
numSampleValues in class Series

addSampleValues

protected void addSampleValues(int numValues)
Overrides:
addSampleValues in class Series

getOHLCPoint

public SeriesOHLCPoint getOHLCPoint(int index)
Point characteristics

Parameters:
index - int
Returns:
SeriesOHLCPoint

getLinePen

public ChartPen getLinePen()
Determines pen to draw the line connecting all points.

Returns:
ChartPen

getTreatNulls

public TreatNullsStyle getTreatNulls()
Defines how null points are treated.

Returns:
TreatNullsStyle

setTreatNulls

public void setTreatNulls(TreatNullsStyle value)

add

public void add(double[] xValues,
                double[] yValues,
                boolean append)
Overrides:
add in class Series

add

public int add(double x,
               double y)
Description copied from class: Series
Adds a new point with specified x and y values.

Specified by:
add in interface ISeries
Overrides:
add in class Series
Parameters:
x - double
y - double
Returns:
int

IgnoreNull

protected boolean IgnoreNull()

doNotPaintNull

protected boolean doNotPaintNull()

getTreatNaNAsNull

public boolean getTreatNaNAsNull()

setTreatNaNAsNull

public void setTreatNaNAsNull(boolean value)