public class BaseTrend extends Function
Title: BaseTrend class
Description: Internal use. Base class for different trend functions.
Copyright (c) 2005-2019 by Steema Software SL. All Rights Reserved.
Company: Steema Software SL
canUsePeriod, dPeriod, HideSourceList, noSourceRequired, series, SingleSource, updating
chart, InternalUse
Constructor and Description |
---|
BaseTrend() |
BaseTrend(IBaseChart c) |
Modifier and Type | Method and Description |
---|---|
double |
calculate(Series s,
int firstIndex,
int lastIndex)
Performs function operation on SourceSeries series.
First and Last parameters are ValueIndex of first and last point used in calculation. |
protected void |
calculateAllPoints(Series source,
ValueList notMandatorySource) |
double |
calculateMany(java.util.ArrayList sourceSeriesList,
int valueIndex)
Performs function operation on list of series (SourceSeriesList).
The ValueIndex parameter defines ValueIndex of point in each Series in list. |
protected void |
calculatePeriod(Series source,
double tmpX,
int firstIndex,
int lastIndex) |
com.steema.teechart.functions.BaseTrend.CalcTrend |
calculateTrend(Series s,
int firstIndex,
int lastIndex)
Calculates trend line parameters m and b, where y=m*x+b
|
protected double |
coefficient(Series s,
int firstIndex,
int lastIndex)
Calculates trendline first order parameter
|
TrendStyle |
getTrendStyle()
Method used for calculating trendline.
Default value: TrendStyle.Normal |
void |
setTrendStyle(TrendStyle value)
Defines different methods for calculating trendline.
Default value: TrendStyle.Normal |
addFunctionXY, addPoints, calculateByPeriod, clear, dispose, doCalculation, getDescription, getPeriod, getPeriodAlign, getPeriodStyle, getSeries, newInstance, readResolve, recalculate, setPeriod, setPeriodAlign, setPeriodStyle, setSeries, valueList
getChart, invalidate, setBooleanProperty, setChart, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty
public BaseTrend()
public BaseTrend(IBaseChart c)
public TrendStyle getTrendStyle()
public void setTrendStyle(TrendStyle value)
value
- TrendStylepublic double calculate(Series s, int firstIndex, int lastIndex)
Function
public double calculateMany(java.util.ArrayList sourceSeriesList, int valueIndex)
Function
calculateMany
in class Function
sourceSeriesList
- ArrayListvalueIndex
- intprotected double coefficient(Series s, int firstIndex, int lastIndex)
s
- SeriesfirstIndex
- intlastIndex
- intprotected void calculatePeriod(Series source, double tmpX, int firstIndex, int lastIndex)
calculatePeriod
in class Function
protected void calculateAllPoints(Series source, ValueList notMandatorySource)
calculateAllPoints
in class Function
public com.steema.teechart.functions.BaseTrend.CalcTrend calculateTrend(Series s, int firstIndex, int lastIndex)
s
- SeriesfirstIndex
- intlastIndex
- int