PositionProtectDiagramElement

StockSharp.Diagram.Elements

The element is used to automatically protect opened positions using stop loss and take-profit.

Inherits: DiagramElement

Constructors

PositionProtectDiagramElement()

Initializes a new instance of the PositionProtectDiagramElement.

Properties

IconName : string

Icon resource name.

IsTrailingStopLoss : bool

Whether to use a trailing technique.

StopLossTimeOut : TimeSpan

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

StopValue : Unit

The protective level for the stop loss. The default level is 0, which means the disabled.

TakeProfitTimeOut : TimeSpan

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

TakeValue : Unit

The protective level for the take profit. The default level is 0, which means the disabled.

TypeId : Guid

Type id.

UseMarketOrders : bool

Whether to use market orders.

UseServer : bool

Try use server-side stop orders if underlying connector provide it.

Methods

OnPrepare()

To prepare for starting the diagram element algorithm.

OnReseted()

It is called from the Reset method.