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;
}
}