Synthetic

StockSharp.Algo.Derivatives

合成位置的建造者.

构造函数

Synthetic
public Synthetic(Security security, ISecurityProvider provider)
synthetic = Synthetic(security, provider)

合成位置的建造者.

security
工具(期权或基础资产)。
provider
提供各种文书的信息。

方法

BuyAsync
public ValueTask<ValueTuple<Security, Sides>[]> BuyAsync(CancellationToken cancellationToken)
result = synthetic.BuyAsync(cancellationToken)

To get the synthetic position to buy the option.

cancellationToken
CancellationToken

返回值: The synthetic position.

BuyAsync
public ValueTask<ValueTuple<Security, Sides>[]> BuyAsync(decimal strike, CancellationToken cancellationToken)
result = synthetic.BuyAsync(strike, cancellationToken)

To get the option position for the underlying asset synthetic buy.

strike
Strike.
cancellationToken
CancellationToken

返回值: The option position.

BuyAsync
public ValueTask<ValueTuple<Security, Sides>[]> BuyAsync(decimal strike, DateTime expiryDate, CancellationToken cancellationToken)
result = synthetic.BuyAsync(strike, expiryDate, cancellationToken)

To get the option position for the underlying asset synthetic buy.

strike
Strike.
expiryDate
The date of the option expiration.
cancellationToken
CancellationToken

返回值: The option position.

PositionAsync
public ValueTask<ValueTuple<Security, Sides>[]> PositionAsync(Sides side, CancellationToken cancellationToken)
result = synthetic.PositionAsync(side, cancellationToken)

To get the synthetic position for the option.

side
The main position direction.
cancellationToken
CancellationToken

返回值: The synthetic position.

PositionAsync
public ValueTask<ValueTuple<Security, Sides>[]> PositionAsync(decimal strike, DateTime expiryDate, Sides side, CancellationToken cancellationToken)
result = synthetic.PositionAsync(strike, expiryDate, side, cancellationToken)

To get the option position for the synthetic base asset.

strike
Strike.
expiryDate
The date of the option expiration.
side
The main position direction.
cancellationToken
CancellationToken

返回值: The option position.

SellAsync
public ValueTask<ValueTuple<Security, Sides>[]> SellAsync(CancellationToken cancellationToken)
result = synthetic.SellAsync(cancellationToken)

To get the synthetic position to sale the option.

cancellationToken
CancellationToken

返回值: The synthetic position.

SellAsync
public ValueTask<ValueTuple<Security, Sides>[]> SellAsync(decimal strike, CancellationToken cancellationToken)
result = synthetic.SellAsync(strike, cancellationToken)

To get the option position for synthetic sale of the base asset.

strike
Strike.
cancellationToken
CancellationToken

返回值: The option position.

SellAsync
public ValueTask<ValueTuple<Security, Sides>[]> SellAsync(decimal strike, DateTime expiryDate, CancellationToken cancellationToken)
result = synthetic.SellAsync(strike, expiryDate, cancellationToken)

To get the option position for synthetic sale of the base asset.

strike
Strike.
expiryDate
The date of the option expiration.
cancellationToken
CancellationToken

返回值: The option position.