OptionPositionChart
The chart showing the position and options Greeks regarding to the underlying asset.
Inherits: UserControl
Implements: IOptionPositionChart, IThemeableChart, IAsyncPersistable, IComponentConnector
Constructors
public OptionPositionChart()
optionPositionChart = OptionPositionChart()
Initializes a new instance of the OptionPositionChart.
Properties
public BlackScholesGreeks ChartParam { get; set; }
value = optionPositionChart.ChartParam
optionPositionChart.ChartParam = value
The parameter type in the chart. The default is Premium.
public string ChartTheme { get; set; }
value = optionPositionChart.ChartTheme
optionPositionChart.ChartTheme = value
The name of the graphic theme.
public BasketBlackScholes Model { get; set; }
value = optionPositionChart.Model
optionPositionChart.Model = value
Portfolio model for calculating the values of Greeks by the Black-Scholes formula.
public bool ShowExpiration { get; set; }
value = optionPositionChart.ShowExpiration
optionPositionChart.ShowExpiration = value
To show the position chart at the time of expiration. The default is enabled.
public bool ShowSeparated { get; set; }
value = optionPositionChart.ShowSeparated
optionPositionChart.ShowSeparated = value
To show position charts separately or as a single position. By default, it is displayed as a single position.
public bool UseBlackModel { get; set; }
value = optionPositionChart.UseBlackModel
optionPositionChart.UseBlackModel = value
Whether to use the model Black. By default, the model is not used.
Methods
public void InitializeComponent()
optionPositionChart.InitializeComponent()
InitializeComponent
public Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = optionPositionChart.LoadAsync(storage, cancellationToken)
Load settings.
- storage
- Settings storage.
- cancellationToken
- CancellationToken
Returns: Task
public void Refresh(decimal? assetPrice, DateTime? currentTime, DateTime? expiryDate)
optionPositionChart.Refresh(assetPrice, currentTime, expiryDate)
To redraw the chart.
- assetPrice
- The current price of the underlying asset.
- currentTime
- The current time.
- expiryDate
- The expiration date.
public Task SaveAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = optionPositionChart.SaveAsync(storage, cancellationToken)
Save settings.
- storage
- Settings storage.
- cancellationToken
- CancellationToken
Returns: Task