Dundas Chart for ASP.NET
FormulaFinancial(FinancialFormula,Series) Method
See Also  Example Send comments on this topic.
Dundas.Charting.WebControl Namespace > DataManipulator Class > FormulaFinancial Method : FormulaFinancial(FinancialFormula,Series) Method


formulaName
A FinancialFormula enumeration value that determines the technical analysis or time series formula to be used.
inputSeries
Series object that has the formula applied to it. The first Y-value of each data point will be used when calculating the formula values, and the first Y-values are also used to store the resulting data.




Applies a financial formula to the first Y-values of a series' data points. The input series is used to store the resulting data.

Syntax

Visual Basic (Declaration)  
Public Overloads Sub FormulaFinancial( _
   ByVal formulaName As FinancialFormula, _
   ByVal inputSeries As Series _
) 
Visual Basic (Usage) Copy Code
Dim instance As DataManipulator
Dim formulaName As FinancialFormula
Dim inputSeries As Series
 
instance.FormulaFinancial(formulaName, inputSeries)
C#  
public void FormulaFinancial( 
   FinancialFormula formulaName,
   Series inputSeries
)

Parameters

formulaName
A FinancialFormula enumeration value that determines the technical analysis or time series formula to be used.
inputSeries
Series object that has the formula applied to it. The first Y-value of each data point will be used when calculating the formula values, and the first Y-values are also used to store the resulting data.

Example

This example demonstrates how to call the EaseOfMovement formula for stock data, storing output values in Series1. We will assume that there is stock data stored in Series1 (i.e. Series1 has data points with 4 Y-values: High, Low, Open and Close values), and that Series1 is a stock chart.
Visual Basic Copy Code
Imports Dundas.Charting.WebControl<CRLF>...<CRLF><CRLF> ' The series that the formula will be applied to.<CRLF> Dim mySeries As Series = chart1.Series["Series1"]<CRLF><CRLF> ' Call the formula.<CRLF> chart1.DataManipulator.FormulaFinancial(FinancialFormula.EaseOfMovement, mySeries)<CRLF><CRLF>...
C# Copy Code
using Dundas.Charting.WebControl; <CRLF>... <CRLF>     <CRLF>    // The series that the formula will be applied to. <CRLF>    Series mySeries = chart1.Series["Series1"]; <CRLF>     <CRLF>    // Call the formula. <CRLF>    chart1.DataManipulator.FormulaFinancial(FinancialFormula.EaseOfMovement, mySeries); <CRLF> <CRLF>...

Remarks

This method applies a formula to the first Y-values of a series' data points, and the input series is used to store the formula data.

This particular function definition cannot be used for those formulas that must:

  • Have multiple data point values for input/output. To use multiple values use another definition that takes a string expression for the input (inputSeriesNames) and/or output (outputSeriesNames).
  • Have a parameter argument specified (use another definition that takes a parameters argument).

Each particular formula has certain requirements, which are listed in the formula topics located in the "Formula Reference" folder.

To apply a formula and preserve the input series use another definition of this function that uses an output series parameter.

Note: If you are applying an averaging formula (e.g. Simple Moving Average) see the StartFromFirst property.

For an overview of how to apply a formula see the Using Financial Formulas  topic. For a detailed discussion on a particular formula see that formula's topic in the "Formula Reference" folder.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

Copyright © 2001 - 2009 Dundas Data Visualization, Inc. and others.