BollingerBandsIndicator Class
Definition
A technical indicator that displays Bollinger Bands, consisting of a simple moving average (middle band) and two standard deviation bands (upper and lower).
public class BollingerBandsIndicator
Constructors
| Name | Description |
|---|---|
| BollingerBandsIndicator | No summary available. |
BollingerBandsIndicator Constructor
public BollingerBandsIndicator()
Methods
| Name | Description |
|---|---|
| Compute | Called when the target series data updates to recalculate the indicator values. |
| GetLegendItems | Gets the legend items that represent this indicator. |
| Render | Renders the indicator into the specified plot area. |
| Bind (8 overloads) | Binds a Avalonia.AvaloniaProperty to an Avalonia.Data.BindingBase. Inherited from AvaloniaObject. |
| CheckAccess | Returns a value indicating whether the current thread is the UI thread. Inherited from AvaloniaObject. |
| ClearValue (4 overloads) | Clears a Avalonia.AvaloniaProperty's local value. Inherited from AvaloniaObject. |
| CoerceValue | Coerces the specified Avalonia.AvaloniaProperty. Inherited from AvaloniaObject. |
| Equals | Compares two objects using reference equality. Inherited from AvaloniaObject. |
| GetBaseValue | Inherited from AvaloniaObject. |
| GetHashCode | Gets the hash code for the object. Inherited from AvaloniaObject. |
| GetValue (3 overloads) | Gets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject. |
| IsAnimating | Checks whether a Avalonia.AvaloniaProperty is animating. Inherited from AvaloniaObject. |
| IsSet | Checks whether a Avalonia.AvaloniaProperty is set on this object. Inherited from AvaloniaObject. |
| SetCurrentValue (2 overloads) | Sets the value of a dependency property without changing its value source. Inherited from AvaloniaObject. |
| SetValue (3 overloads) | Sets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject. |
| VerifyAccess | Checks that the current thread is the UI thread and throws if not. Inherited from AvaloniaObject. |
Compute Method
Called when the target series data updates to recalculate the indicator values.
public void Compute()
GetLegendItems Method
Gets the legend items that represent this indicator.
public System.Collections.Generic.IEnumerable<Avalonia.Controls.Charts.ChartLegendItem> GetLegendItems(int indicatorIndex)
Parameters
indicatorIndex int
The indicator index within its owner chart legend.
Returns
System.Collections.Generic.IEnumerable<Avalonia.Controls.Charts.ChartLegendItem>
The legend items for this indicator.
Render Method
Renders the indicator into the specified plot area.
public void Render(Avalonia.Media.DrawingContext context, Avalonia.Rect plotArea)
Parameters
context Avalonia.Media.DrawingContext
The drawing context for the current render pass.
plotArea Avalonia.Rect
The plot area in chart coordinates.
Properties
| Name | Description |
|---|---|
| BandFill | Gets or sets the fill brush between the upper and lower bands. |
| LowerBandStroke | Gets or sets the stroke brush for the lower band. |
| Period | Gets or sets the period used for the moving average calculation. |
| StandardDeviations | Gets or sets the number of standard deviations for the bands. |
| UpperBandStroke | Gets or sets the stroke brush for the upper band. |
| IsVisible | Gets or sets a value indicating whether this indicator is visible. Inherited from ChartTechnicalIndicator. |
| Stroke | Gets or sets the brush used for the main indicator line. Inherited from ChartTechnicalIndicator. |
| StrokeDashStyle | Gets or sets the dash style for the indicator line. Inherited from ChartTechnicalIndicator. |
| StrokeLineCap | Gets or sets the line cap style for the indicator line. Inherited from ChartTechnicalIndicator. |
| StrokeLineJoin | Gets or sets the line join style for the indicator line. Inherited from ChartTechnicalIndicator. |
| StrokeThickness | Gets or sets the thickness of the indicator stroke. Inherited from ChartTechnicalIndicator. |
| TargetSeries | Gets or sets the target series this indicator is based on. Inherited from ChartTechnicalIndicator. |
| Title | Gets or sets the title shown in the legend and tooltips. Inherited from ChartTechnicalIndicator. |
| Dispatcher | Returns the Avalonia.AvaloniaObject.Dispatcher that this Avalonia.AvaloniaObject is associated with. Inherited from AvaloniaObject. |
| Item | Inherited from AvaloniaObject. |
BandFill Property
Gets or sets the fill brush between the upper and lower bands.
public Avalonia.Media.IBrush BandFill { get; set; }
LowerBandStroke Property
Gets or sets the stroke brush for the lower band.
public Avalonia.Media.IBrush LowerBandStroke { get; set; }
Period Property
Gets or sets the period used for the moving average calculation.
public int Period { get; set; }
StandardDeviations Property
Gets or sets the number of standard deviations for the bands.
public double StandardDeviations { get; set; }
UpperBandStroke Property
Gets or sets the stroke brush for the upper band.
public Avalonia.Media.IBrush UpperBandStroke { get; set; }
Fields
BandFillProperty Field
Identifies the Avalonia.Controls.Charts.BollingerBandsIndicator.BandFill Avalonia property.
public Avalonia.StyledProperty<Avalonia.Media.IBrush> BandFillProperty
LowerBandStrokeProperty Field
Identifies the Avalonia.Controls.Charts.BollingerBandsIndicator.LowerBandStroke Avalonia property.
public Avalonia.StyledProperty<Avalonia.Media.IBrush> LowerBandStrokeProperty
PeriodProperty Field
Identifies the Avalonia.Controls.Charts.BollingerBandsIndicator.Period Avalonia property.
public Avalonia.StyledProperty<int> PeriodProperty
StandardDeviationsProperty Field
Identifies the Avalonia.Controls.Charts.BollingerBandsIndicator.StandardDeviations Avalonia property.
public Avalonia.StyledProperty<double> StandardDeviationsProperty
UpperBandStrokeProperty Field
Identifies the Avalonia.Controls.Charts.BollingerBandsIndicator.UpperBandStroke Avalonia property.
public Avalonia.StyledProperty<Avalonia.Media.IBrush> UpperBandStrokeProperty
Events
| Name | Description |
|---|---|
| PropertyChanged | Raised when a Avalonia.AvaloniaProperty value changes on this object. Inherited from AvaloniaObject. |