ProtectiveProcessor

StockSharp.Algo.Strategies.Protective

保护策略处理器.

构造函数

ProtectiveProcessor
public ProtectiveProcessor(Sides protectiveSide, decimal protectivePrice, bool isUpTrend, bool isTrailing, Unit protectiveLevel, bool useMarketOrders, Unit priceOffset, TimeSpan timeout, DateTime startedTime, ILogReceiver logs)
protectiveProcessor = ProtectiveProcessor(protectiveSide, protectivePrice, isUpTrend, isTrailing, protectiveLevel, useMarketOrders, priceOffset, timeout, startedTime, logs)

Initialize ProtectiveProcessor.

protectiveSide
保护位置
protectivePrice
保护地价.
isUpTrend
以追踪物价增减.
isTrailing
跟踪模式 。
protectiveLevel
保护级别与保护贸易量相比有所抵消。
useMarketOrders
是否使用市场保护.
priceOffset
登记订单的价格变动,它决定了从最佳报价(购买时加到价格后,出售时减到)的变动幅度。
timeout
限时 保护到此时尚未奏效的,该地站将上市关闭.
startedTime
保护策略开始的时间.
logs
木之源出.

方法

GetActivationPrice
public decimal? GetActivationPrice(decimal? currentPrice, DateTime currentTime)
result = protectiveProcessor.GetActivationPrice(currentPrice, currentTime)

达到保护策略时价格的绝对值被激活.

currentPrice
金融工具的现价。如果价格等于 ,则不需要激活。
currentTime
现相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相

返回值: 如果价格等于,则不需要激活。