InMemoryPositionStorage
StockSharp.Algo.Storages
In memory implementation of IPositionStorage.
Implementa: IPositionStorage, IPositionProvider, IPortfolioProvider
Constructores
InMemoryPositionStorage()
Initializes a new instance of the InMemoryPositionStorage.
InMemoryPositionStorage(IPortfolioProvider)
Initializes a new instance of the InMemoryPositionStorage.
- underlying
- Underlying provider.
Propiedades
Portfolios : IEnumerable<Portfolio>
The list of portfolios.
Positions : IEnumerable<Position>
The list of positions.
Métodos
GetPosition(Portfolio, Security, string, Sides?, string, string, TPlusLimits?) : Position
To get the position by portfolio and instrument.
- portfolio
- The portfolio on which the position should be found.
- security
- The instrument on which the position should be found.
- strategyId
- Strategy ID.
- side
- Side.
- clientCode
- The client code.
- depoName
- The depository name where the stock is located physically. By default, an empty string is passed, which means the total position by all depositories.
- limit
- Limit type for Т+ market.
Devuelve: Position.
LookupByPortfolioName(string) : Portfolio
To get the portfolio by the code name.
- name
- Portfolio code name.
Devuelve: The got portfolio. If there is no portfolio by given criteria, is returned.
Eventos
NewPortfolio : Action<Portfolio>
New portfolio received.
NewPosition : Action<Position>
New position received.
PortfolioChanged : Action<Portfolio>
Portfolio changed.
PositionChanged : Action<Position>
Position changed.