ProtectiveProcessor
StockSharp.Algo.Strategies.Protective
Protective strategy processor.
Конструкторы
ProtectiveProcessor(Sides, decimal, bool, bool, Unit, bool, Unit, TimeSpan, DateTime, ILogReceiver)
Initialize ProtectiveProcessor.
- protectiveSide
- Protected position side.
- protectivePrice
- Protected position price.
- isUpTrend
- To track price increase or falling.
- isTrailing
- Trailing mode.
- protectiveLevel
- The protective level offset from the protected trade Ticks.
- useMarketOrders
- Whether to use Market for protection.
- priceOffset
- The price shift for the registering order. It determines the amount of shift from the best quote (for the buy it is added to the price, for the sell it is subtracted).
- timeout
- Time limit. If protection has not worked by this time, the position will be closed on the market.
- startedTime
- The time when the protective strategy was started.
- logs
- The log source.
Методы
GetActivationPrice(decimal?, DateTime) : decimal?
The absolute value of the price when the one is reached the protective strategy is activated.
- currentPrice
- The current price of the security. If the price is equal to , then the activation is not required.
- currentTime
- The current time.
Возвращает: If the price is equal to then the activation is not required.