ProtectiveController
StockSharp.Algo.Strategies.Protective
Controlador de protecção.
Herda de: BaseLogReceiver
Métodos
GetController
public IProtectivePositionController GetController(SecurityId securityId, string portfolioName, IProtectiveBehaviourFactory factory, Unit takeValue, Unit stopValue, bool isStopTrailing, TimeSpan takeTimeout, TimeSpan stopTimeout, bool useMarketOrders)
result = protectiveController.GetController(securityId, portfolioName, factory, takeValue, stopValue, isStopTrailing, takeTimeout, stopTimeout, useMarketOrders)
Obter IProtectivePositionController exemplo.
- securityId
- SecurityId
- portfolioName
- PortfolioName
- factory
- IProtectiveBehaviourFactory
- takeValue
- Tirar offset.
- stopValue
- Parar offset.
- isStopTrailing
- Se deve usar uma técnica de rastreamento.
- takeTimeout
- Se a protecção não tiver funcionado até esta data, a posição será encerrada no mercado.
- stopTimeout
- Se a protecção não tiver funcionado até esta data, a posição será encerrada no mercado.
- useMarketOrders
- Se deve utilizar as ordens de mercado.
Retorna: IProtectivePositionController
TryActivate
public IEnumerable<ValueTuple<bool, Sides, decimal, decimal, OrderCondition>> TryActivate(SecurityId securityId, decimal price, DateTime time)
result = protectiveController.TryActivate(securityId, price, time)
Tenta activar a protecção.
- securityId
- SecurityId
- price
- Preço actual.
- time
- Hora actual.
Retorna: Informações da ordem de registo.