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

method_1() private méthode

private method_1 ( ) : void
Résultat void
        private void method_1()
        {
            if (this.currPrice == 0)
                return;

            switch (Side)
            {
                case PositionSide.Long:
                    if (this.currPrice <= this.stopPrice)
                    {
                        Disconnect();
                        this.method_8(StopStatus.Executed);
                        return;
                    }
                    if (Type == StopType.Trailing && this.trailPrice > this.initPrice)
                    {
                        this.stopPrice = GetStopPrice();
                        return;
                    }
                    break;
                case PositionSide.Short:
                    if (this.currPrice >= this.stopPrice)
                    {
                        this.Disconnect();
                        this.method_8(StopStatus.Executed);
                        return;
                    }
                    if (Type == StopType.Trailing && this.trailPrice < this.initPrice)
                    {
                        this.stopPrice = this.GetStopPrice();
                    }
                    break;
                default:
                    return;
            }
        }