FastQuant.Stop.GetStopPrice C# (CSharp) Méthode

GetStopPrice() protected méthode

protected GetStopPrice ( ) : double
Résultat double
        protected virtual double GetStopPrice()
        {
            this.initPrice = this.trailPrice;
            if (Mode == StopMode.Absolute)
                return Side == PositionSide.Long ? this.trailPrice - Math.Abs(Level) : this.trailPrice + Math.Abs(Level);
            else
                return Position.Side == PositionSide.Long
                    ? this.trailPrice - Math.Abs(this.trailPrice*Level)
                    : this.trailPrice + Math.Abs(this.trailPrice*Level);
        }