StopOrderManager
Остановить внедрение менеджера ордеров.
Реализует: IStopOrderManager
Методы
public bool Cancel(long transactionId, StopOrderInfo info)
result = stopOrderManager.Cancel(transactionId, info)
Отменить стоп-ордер.
- transactionId
- Идентификатор транзакции стоп-ордера.
- info
- Информация об отмененном стоп-приказе.
Возвращает: если стоп-приказ был найден и отменен.
public IReadOnlyList<StopOrderTrigger> CheckPrice(SecurityId securityId, decimal price, DateTime time)
result = stopOrderManager.CheckPrice(securityId, price, time)
Проверьте цену по всем зарегистрированным стоп-ордерам для данного финансового инструмента.
- securityId
- идентификатор финансового инструмента.
- price
- Текущая рыночная цена.
- time
- Текущее время.
Возвращает: Список сработавших стоп-ордеров с результирующими ордерами для отправки.
public void Clear()
stopOrderManager.Clear()
Очищает все состояния адаптера и сбрасывает текущее состояние на «Отключено».
public static OrderRegisterMessage CreateResultingOrder(StopOrderInfo info, DateTime time)
result = StopOrderManager.CreateResultingOrder(info, time)
Builds the order a stop places when it fires: a limit order at the price its condition asks for, resolving a percentage against the level it fired at, or a market order when it names no price at all.
- info
- The stop that fired.
- time
- When it fired.
Возвращает: The order to place.
public IReadOnlyList<long> GetStopIds(SecurityId securityId)
result = stopOrderManager.GetStopIds(securityId)
Get the stop orders resting on the given security.
- securityId
- Security ID.
Возвращает: Transaction IDs of the stop orders registered for the security, empty when none rest on it.
public void Register(StopOrderInfo info)
stopOrderManager.Register(info)
Зарегистрируйте новый стоп-приказ.
public bool Replace(long origTransactionId, StopOrderInfo newInfo)
result = stopOrderManager.Replace(origTransactionId, newInfo)
Атомически замените существующий стоп-приказ новым.
- origTransactionId
- Идентификатор транзакции стоп-приказа для замены.
- newInfo
- Информация о новом стоп-приказе.
Возвращает: если старый стоп-приказ был найден и заменен.