Class ChartIndicator
Defines the technical indicator, that are used in financial markets.
Inherited Members
Namespace: Syncfusion.Blazor.Charts
Assembly: Syncfusion.Blazor.dll
Syntax
public class ChartIndicator : ChartSubComponent, ISubcomponentTracker, IChartElement
Constructors
ChartIndicator()
Declaration
public ChartIndicator()
Properties
Animation
Gets or sets an instance of ChartIndicatorAnimation
which controls the options to configure the animation for the indicator.
Declaration
public ChartIndicatorAnimation Animation { get; set; }
Property Value
Type | Description |
---|---|
ChartIndicatorAnimation | An instance of ChartIndicatorAnimation. |
Remarks
Use this property to control the behavior of the animation associated with the indicator.
BandColor
Gets or sets the color of the Bollinger Band indicator area.
Declaration
public string BandColor { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string value specifying the color of the Bollinger Band indicator. The default value is rgba(211,211,211,0.25). |
Remarks
Use valid hex or rgba CSS color strings for the color value.
Close
Gets or sets the close value of the indicator.
Declaration
public string Close { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string value specifying the close value of the indicator. The default value is string.Empty. |
DashArray
Gets or sets the dash array of the indicator.
Declaration
public string DashArray { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string value specifying the dash array of the indicator. The default value is "0". |
Remarks
Use this property to specify a custom dash pattern, enhancing the appearance of the indicator on the chart.
DataSource
Gets or sets defines the data source for the indicator.
Declaration
public object DataSource { get; set; }
Property Value
Type | Description |
---|---|
System.Object | An object representing the data source for the indicator. |
Remarks
This property allows you to specify the data source for the indicator, defining the dataset from which the indicator will derive its values. Ensure that the provided data source contains the required information for the specific indicator type.
DPeriod
Gets or sets the period over which price changes will define the %D value in stochastic indicators.
Declaration
public double DPeriod { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double value representing the DPeriod value in stochastic indicators. The default value is 3. |
Remarks
This property determines the period over which price changes are considered to calculate the %D value in stochastic indicators.
EnableComplexProperty
Enables the complex property data binding for the indicator.
Declaration
public bool EnableComplexProperty { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if complex property data binding is enabled; otherwise, false. The default value is false. |
Remarks
Set the "EnableComplexProperty" property to true to enable complex property data binding which controls the indicator's appearance and behavior based on complex data structures.
FastPeriod
Gets or sets the fast period used to define the MACD line.
Declaration
public double FastPeriod { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double representing the fast period for defining the MACD line. The default value is 26. |
Remarks
This property is applicable only for the MACD (Moving Average Convergence Divergence) indicator. It is used to customize the MACD period, influencing the calculation of the MACD line.
Field
Gets or sets the field to compare the current value with previous values.
Declaration
public FinancialDataFields Field { get; set; }
Property Value
Type | Description |
---|---|
FinancialDataFields | One of the FinancialDataFields enumeration that specifies the financial data fields to compare the current value with previous values. The options include:
|
Fill
gets or sets the fill color of the indicator line.
Declaration
public string Fill { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string value specifying the fill color of the indicator line. |
Remarks
Use valid hex or rgba CSS color strings for the color value.
High
Gets or sets the high value of the indicator.
Declaration
public string High { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the high value of the indicator. The default value is an empty string. |
Remarks
This property is typically used to provide the upper bound or maximum value for the indicator.
KPeriod
Gets or sets the look-back period over which price changes will define the %K value in stochastic indicators.
Declaration
public double KPeriod { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double representing the look-back period. The default value is 14. |
Remarks
This property determines the period over which price changes are considered to calculate the %K value in stochastic indicators.
Low
Gets or sets the low value of the indicator.
Declaration
public string Low { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the low value of the indicator. The default value is an empty string. |
Remarks
This property is typically used to provide the lower bound or minimum value for the indicator.
LowerLine
Gets or sets an instance of ChartIndicatorLowerLine which defines the appearance of the lower line in technical indicators.
Declaration
public ChartIndicatorLowerLine LowerLine { get; set; }
Property Value
Type | Description |
---|---|
ChartIndicatorLowerLine | An instance of ChartIndicatorLowerLine. |
Remarks
This property provides options to visually enhance and distinguish the lower line in technical indicators by customizing the color and width.
MacdLine
Gets or sets an instance of ChartIndicatorMacdLine which defines the appearance of the MacdLine in the Macd indicator.
Declaration
public ChartIndicatorMacdLine MacdLine { get; set; }
Property Value
Type | Description |
---|---|
ChartIndicatorMacdLine | An instance of ChartIndicatorMacdLine. |
Remarks
This property provides options to visually enhance and distinguish the Macd line in technical indicators by customizing the color and width.
Note: It is only applicable for Macd Indicator.
MacdNegativeColor
Gets or sets the color of the negative bars in Macd indicators.
Declaration
public string MacdNegativeColor { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the color of the negative bars. The default value is "#e74c3d". |
Remarks
It accepts values in hex and rgba as a valid CSS color string. This property is only applicable for Macd indicators.
MacdPositiveColor
Gets or sets the color of the positive bars in Macd indicators.
Declaration
public string MacdPositiveColor { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the color of the positive bars. The default value is "#2ecd71". |
Remarks
It accepts values in hex and rgba as a valid CSS color string. This property is only applicable for Macd indicators.
MacdType
Gets or sets the type of the Macd indicator.
Declaration
public MacdType MacdType { get; set; }
Property Value
Type | Description |
---|---|
MacdType | One of the MacdType enumeration that specifies the type of Macd indicator. The default value is MacdType.Both. |
Remarks
This property is only applicable for Macd indicators.
Open
Gets or sets the open value of the indicator.
Declaration
public string Open { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the open value of the indicator. The default value is an empty string. |
OverBought
Gets or sets the over-bought (threshold) values.
Declaration
public double OverBought { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double representing the over-bought threshold values. The default value is 80. |
Remarks
This property is only applicable to RSI and stochastic indicators.
OverSold
Gets or sets the over-sold (threshold) values.
Declaration
public double OverSold { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double representing the over-sold threshold values. The default value is 20. |
Remarks
This property is only applicable to RSI and stochastic indicators.
Period
Gets or sets the period over which price changes will be considered to predict the trend.
Declaration
public double Period { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double representing the period. The default value is 14. |
Remarks
This property defines the time span over which price changes are taken into account for trend prediction. Adjusting this value can impact the sensitivity of trend analysis.
PeriodLine
Gets or sets an instance of ChartIndicatorPeriodLine which defines the appearance of the Period Line in technical indicators.
Declaration
public ChartIndicatorPeriodLine PeriodLine { get; set; }
Property Value
Type | Description |
---|---|
ChartIndicatorPeriodLine | An instance of ChartIndicatorPeriodLine. |
Remarks
This property provides options to visually enhance and distinguish the period line in technical indicators by customizing the color and width.
RendererKey
Declaration
public string RendererKey { get; set; }
Property Value
Type |
---|
System.String |
RendererType
Declaration
public Type RendererType { get; set; }
Property Value
Type |
---|
System.Type |
SeriesName
Gets or sets the name of the series whose data has to be depicted as an indicator.
Declaration
public string SeriesName { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the series name. The default value is an empty string. |
Remarks
Ensure that the provided series name corresponds to an existing data series in the chart.
ShowZones
Gets or sets a value indicating whether to show over-bought and over-sold regions.
Declaration
public bool ShowZones { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true to show over-bought and over-sold regions; otherwise, false. The default value is true. |
Remarks
This property is only applicable to RSI and stochastic indicators.
SlowPeriod
Gets or sets the slow period used to define the MACD line.
Declaration
public double SlowPeriod { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double representing the slow period for defining the MACD line. The default value is 12. |
Remarks
This property is applicable only for the MACD (Moving Average Convergence Divergence) indicator. It is used to customize the MACD period, influencing the calculation of the MACD line.
StandardDeviation
Gets or sets the standard deviation values used to define the upper and lower Bollinger Bands.
Declaration
public double StandardDeviation { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double representing the standard deviation values. The default value is 2. |
Remarks
This property is applicable only for the Bollinger Bands indicator type. It determines the number of standard deviations to be used in calculating the upper and lower bands.
Type
Gets or sets the type of the technical indicator.
Declaration
public TechnicalIndicators Type { get; set; }
Property Value
Type | Description |
---|---|
TechnicalIndicators | One of the TechnicalIndicators enumerations that specifies the type of technical indicators. The options include:
|
UpperLine
Gets or sets an instance of ChartIndicatorUpperLine which defines the appearance of the upper line in technical indicators.
Declaration
public ChartIndicatorUpperLine UpperLine { get; set; }
Property Value
Type | Description |
---|---|
ChartIndicatorUpperLine | An instance of ChartIndicatorUpperLine. |
Remarks
This property can be used to customize the Width and Color of the upper line of indicator.
Visible
Gets or sets a value indicating whether the indicator is visible.
Declaration
public bool Visible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the indicator is visible; otherwise, false. The default value is true. |
Volume
Gets or sets the volume value of the indicator.
Declaration
public string Volume { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the volume value of the indicator. The default value is an empty string. |
Width
Gets or sets the width of the indicator.
Declaration
public double Width { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double representing the width of the indicator. The default value is 1. |
XAxisName
Gets or sets the name of the corresponding horizontal axis on which the indicator is to be plotted.
Declaration
public string XAxisName { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the name of the horizontal axis. The default value is an empty string. |
XName
Gets or sets the xValue of the indicator.
Declaration
public string XName { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the xValue of the indicator. The default is an empty string. |
YAxisName
Gets or sets the name of the corresponding vertical axis on which the indicator is to be plotted.
Declaration
public string YAxisName { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the name of the vertical axis. The default value is an empty string. |
Methods
OnInitialized()
Declaration
protected override void OnInitialized()