FastQuant.Stop.GetStopPrice C# (CSharp) Method

GetStopPrice() protected method

protected GetStopPrice ( ) : double
return 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);
        }