public class BaseTrend extends Function
Title: BaseTrend class
Description: Internal use. Base class for different trend functions.
Copyright (c) 2005-2013 by Steema Software SL. All Rights Reserved.
Company: Steema Software SL
canUsePeriod, dPeriod, HideSourceList, noSourceRequired, series, SingleSource, updatingchart, 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, valueListgetChart, invalidate, setBooleanProperty, setChart, setColorProperty, setDoubleProperty, setIntegerProperty, setStringPropertypublic BaseTrend()
public BaseTrend(IBaseChart c)
public TrendStyle getTrendStyle()
public void setTrendStyle(TrendStyle value)
value - TrendStylepublic double calculate(Series s, int firstIndex, int lastIndex)
Functionpublic double calculateMany(java.util.ArrayList sourceSeriesList,
int valueIndex)
FunctioncalculateMany in class FunctionsourceSeriesList - 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 Functionprotected void calculateAllPoints(Series source, ValueList notMandatorySource)
calculateAllPoints in class Functionpublic com.steema.teechart.functions.BaseTrend.CalcTrend calculateTrend(Series s, int firstIndex, int lastIndex)
s - SeriesfirstIndex - intlastIndex - int