Table of Contents

Class ProtectiveProcessor

Namespace
StockSharp.Algo.Strategies.Protective
Assembly
StockSharp.Algo.dll

Protective strategy processor.

public class ProtectiveProcessor : BaseLogReceiver, IPersistable, ILogReceiver, ILogSource, IDisposable
Inheritance
ProtectiveProcessor
Implements
IPersistable
Inherited Members
Extension Methods

Constructors

ProtectiveProcessor(Sides, decimal, bool, bool, Unit, bool, Unit, TimeSpan)

Initialize ProtectiveProcessor.

public ProtectiveProcessor(Sides protectiveSide, decimal protectivePrice, bool isUpTrend, bool isTrailing, Unit protectiveLevel, bool useMarketOrders, Unit priceOffset, TimeSpan timeout)

Parameters

protectiveSide Sides

Protected position side.

protectivePrice decimal

Protected position price.

isUpTrend bool

To track price increase or falling.

isTrailing bool

Trailing mode.

protectiveLevel Unit

The protective level. If the Type type is equal to Limit, then the given price is specified. Otherwise, the shift value from the protected trade Ticks is specified.

useMarketOrders bool

Whether to use Market for protection.

priceOffset Unit

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 TimeSpan

Properties

ProtectiveSide

Protected position side

public Sides ProtectiveSide { get; }

Property Value

Sides

Methods

GetActivationPrice(decimal?, DateTimeOffset)

The absolute value of the price when the one is reached the protective strategy is activated.

public virtual decimal? GetActivationPrice(decimal? currentPrice, DateTimeOffset currentTime)

Parameters

currentPrice decimal?
currentTime DateTimeOffset

Returns

decimal?

Remarks

If the price is equal to null then the activation is not required.