Class OptionVolatilitySmileChart
- Namespace
- StockSharp.Xaml.Charting
- Assembly
- StockSharp.Xaml.Charting.dll
Options volatility smile chart.
public class OptionVolatilitySmileChart : UserControl, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IAddChild, IThemeableChart, IPersistable, IComponentConnector
- Inheritance
-
OptionVolatilitySmileChart
- Implements
-
IPersistable
- Inherited Members
- Extension Methods
Constructors
OptionVolatilitySmileChart()
Initializes a new instance of the OptionVolatilitySmileChart.
public OptionVolatilitySmileChart()
Fields
SmileStepProperty
Step size for volatility smile calculation.
public static readonly DependencyProperty SmileStepProperty
Field Value
Properties
ChartTheme
The name of the graphic theme.
public string ChartTheme { get; set; }
Property Value
Elements
Elements.
public IEnumerable<KeyValuePair<ICollection<LineData<double>>, IChartVolatilitySmileElement>> Elements { get; }
Property Value
SmileStep
Volatility smile draw step.
public double SmileStep { get; set; }
Property Value
Methods
Clear()
To remove yield curves from the chart.
public void Clear()
CreateSmile(string, Color, DrawStyles, Guid)
To create new smile.
public ICollection<LineData<double>> CreateSmile(string title, Color color, DrawStyles style = 0, Guid id = default)
Parameters
title
stringThe line title.
color
ColorThe line color.
style
DrawStylesThe line drawing style. The default is Ecng.Drawing.DrawStyles.Line.
id
GuidUnique ID.
Returns
- ICollection<LineData<double>>
The collection of data that should be filled for the line drawing.
CreateSmile(string, Color, Color, DrawStyles, Guid)
To create new smile.
public ICollection<LineData<double>> CreateSmile(string title, Color color, Color secondColor, DrawStyles style = 0, Guid id = default)
Parameters
title
stringThe line title.
color
ColorThe line color.
secondColor
ColorThe additional line color. It is used to draw Ecng.Drawing.DrawStyles.Area.
style
DrawStylesThe line drawing style. The default is Ecng.Drawing.DrawStyles.Line.
id
GuidUnique ID.
Returns
- ICollection<LineData<double>>
The collection of data that should be filled for the line drawing.
InitializeComponent()
InitializeComponent
public void InitializeComponent()
Load(SettingsStorage)
Load settings.
public void Load(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.
RemoveSmile(ICollection<LineData<double>>)
To remove the yield curve from the chart.
public void RemoveSmile(ICollection<LineData<double>> items)
Parameters
items
ICollection<LineData<double>>The collection of data obtained from the method CreateSmile(string, Color, DrawStyles, Guid).
Save(SettingsStorage)
Save settings.
public void Save(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.