PositionSnapshotHolder
StockSharp.Messages
PositionChangeMessage snapshots holder.
Inherits: BaseLogReceiver
Constructors
PositionSnapshotHolder
public PositionSnapshotHolder()
positionSnapshotHolder = PositionSnapshotHolder()
Initializes a new instance of the PositionSnapshotHolder.
Methods
GetAllSnapshots
public IEnumerable<PositionChangeMessage> GetAllSnapshots()
result = positionSnapshotHolder.GetAllSnapshots()
Get cloned copies of all current position snapshots.
Process
public PositionChangeMessage Process(PositionChangeMessage posMsg)
result = positionSnapshotHolder.Process(posMsg)
Process PositionChangeMessage change.
- posMsg
- PositionChangeMessage change.
Returns: Position snapshot copy.
ResetSnapshot
public void ResetSnapshot(string portfolioName, SecurityId securityId, string strategyId, Sides? side, string clientCode, string depoName, TPlusLimits? limitType)
positionSnapshotHolder.ResetSnapshot(portfolioName, securityId, strategyId, side, clientCode, depoName, limitType)
Reset snapshot for the specified position key.
- portfolioName
- Portfolio name. Use to clear all snapshots.
- securityId
- Security ID.
- strategyId
- Strategy ID.
- side
- Side.
- clientCode
- Client code.
- depoName
- Depo name.
- limitType
- Limit type.
TryGetSnapshot
public bool TryGetSnapshot(string portfolioName, SecurityId securityId, string strategyId, Sides? side, string clientCode, string depoName, TPlusLimits? limitType, PositionChangeMessage snapshot)
result = positionSnapshotHolder.TryGetSnapshot(portfolioName, securityId, strategyId, side, clientCode, depoName, limitType, snapshot)
Try get snapshot for the specified position key.
- portfolioName
- Portfolio name.
- securityId
- Security ID.
- strategyId
- Strategy ID.
- side
- Side.
- clientCode
- Client code.
- depoName
- Depo name.
- limitType
- Limit type.
- snapshot
- Snapshot if exists, otherwise .
Returns: true if snapshot exists; otherwise false.
TryGetSnapshot
public bool TryGetSnapshot(PositionChangeMessage posMsg, PositionChangeMessage snapshot)
result = positionSnapshotHolder.TryGetSnapshot(posMsg, snapshot)
Try get snapshot for the specified position message.
- posMsg
- Position message to extract key from.
- snapshot
- Snapshot if exists, otherwise .
Returns: true if snapshot exists; otherwise false.