BaseProtectiveBehaviour

StockSharp.Algo.Strategies.Protective

Base implementation of IProtectiveBehaviour.

Inherits: BaseLogReceiver

Implements: IProtectiveBehaviour, ILogSource, IDisposable

Constructors

BaseProtectiveBehaviour(Unit, Unit, bool, TimeSpan, TimeSpan, bool)

Initializes a new instance of the BaseProtectiveBehaviour.

takeValue
Take offset.
stopValue
Stop offset.
isStopTrailing
Whether to use a trailing technique.
takeTimeout
Time limit. If protection has not worked by this time, the position will be closed on the market.
stopTimeout
Time limit. If protection has not worked by this time, the position will be closed on the market.
useMarketOrders
Whether to use market orders.

Properties

IsStopTrailing : bool

Whether to use a trailing technique.

Position : decimal

Current position value.

StopTimeout : TimeSpan

Time limit. If protection has not worked by this time, the position will be closed on the market.

StopValue : Unit

Stop offset.

TakeTimeout : TimeSpan

Time limit. If protection has not worked by this time, the position will be closed on the market.

TakeValue : Unit

Take offset.

UseMarketOrders : bool

Whether to use market orders.

Methods

TryActivate(decimal, DateTime) : ValueTuple?<bool, Sides, decimal, decimal, OrderCondition>

Try activate protection.

price
Current price.
time
Current time.

Returns: Registration order info.

Update(decimal, decimal, DateTime) : ValueTuple?<bool, Sides, decimal, decimal, OrderCondition>

Update position difference.

price
Position difference price.
value
Position difference value.
time
Current time.

Returns: Registration order info.