Class StochasticIndicator
To render a StochasticIndicator, create an instance of its class, and add it to TechnicalIndicators collection property and set the required properties.
Inherited Members
Namespace: Syncfusion.SfChart.XForms
Assembly: Syncfusion.SfChart.XForms.dll
Syntax
public class StochasticIndicator : FinancialTechnicalIndicator, IThemeElement
Remarks
This indicator can be associated to a financial series in SfChart by specifying the name of series using SeriesName property. If the SeriesName is specified, all the required properties such as ItemsSource, XBindingPath, High, Low, Open and Close will be derived from the associated series. In case, the SeriesName is not specified, all those required properties need to be explicitly specified in RSIIndicator.
Examples
SfChart chart = new SfChart();
chart.PrimaryAxis = new NumericalAxis();
chart.SecondaryAxis = new NumericalAxis();
CandleSeries series = new CandleSeries();
series.Name = "series";
ObservableCollection<ChartDataPoint> Data = new ObservableCollection<ChartDataPoint>
{
new ChartDataPoint(1, 30,35,20,25),
new ChartDataPoint(2, 90,100,10,20),
new ChartDataPoint(3, 20,90,10,80),
new ChartDataPoint(5, 10,0,80,70),
new ChartDataPoint(10, 25,20,49,12),
new ChartDataPoint(12, 68,60,30,50)
};
series.ItemsSource = Data;
chart.Series.Add(series);
chart.TechnicalIndicators.Add(new StochasticIndicator(){SeriesName="series"});
Constructors
StochasticIndicator()
Initializes a new instance of the StochasticIndicator class.
Declaration
public StochasticIndicator()
Fields
DPeriodProperty
Gets or sets the DPeriod
property.
Declaration
public static readonly BindableProperty DPeriodProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
KPeriodProperty
Gets or sets the KPeriod
property.
Declaration
public static readonly BindableProperty KPeriodProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
LowerLineColorProperty
Gets or sets the LowerLineColor
property.
Declaration
public static readonly BindableProperty LowerLineColorProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
PeriodLineColorProperty
Gets or sets the PeriodLineColor
property.
Declaration
public static readonly BindableProperty PeriodLineColorProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
PeriodProperty
Gets or sets the Period
property.
Declaration
public static readonly BindableProperty PeriodProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
SignalLineColorProperty
Gets or sets the SignalLineColor
property.
Declaration
public static readonly BindableProperty SignalLineColorProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
UpperLineColorProperty
Gets or sets the UpperLineColor
property.
Declaration
public static readonly BindableProperty UpperLineColorProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Properties
DPeriod
Gets or sets the DPeriod
property defines the DPeriod of the indicator.
Declaration
public int DPeriod { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | This property takes the System.Int32 as its value. |
KPeriod
Gets or sets the KPeriod
property defines the KPeriod of the indicator.
Declaration
public int KPeriod { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | This property takes the System.Int32 as its value. |
LowerLineColor
Gets or sets the fill color for the Lower Line.
Declaration
public Color LowerLineColor { get; set; }
Property Value
Type | Description |
---|---|
Xamarin.Forms.Color | This property takes the Xamarin.Forms.Color as its value. |
Period
Gets or sets the moving average value for the indicator.
Declaration
public int Period { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | This property takes the System.Int32 as its value. |
PeriodLineColor
Gets or sets the fill color for the period line.
Declaration
public Color PeriodLineColor { get; set; }
Property Value
Type | Description |
---|---|
Xamarin.Forms.Color | This property takes the Xamarin.Forms.Color as its value. |
SignalLineColor
Gets or sets the fill color for the Signal Line.
Declaration
public Color SignalLineColor { get; set; }
Property Value
Type | Description |
---|---|
Xamarin.Forms.Color | This property takes the Xamarin.Forms.Color as its value. |
UpperLineColor
Gets or sets the fill color for the Upper Line.
Declaration
public Color UpperLineColor { get; set; }
Property Value
Type | Description |
---|---|
Xamarin.Forms.Color | This property takes the Xamarin.Forms.Color as its value. |