|
@@ -682,6 +682,10 @@ class CmBroker |
|
@@ -682,6 +682,10 @@ class CmBroker |
|
682
|
$symbolInfo = $this->symbolInfos[$symbol];
|
682
|
$symbolInfo = $this->symbolInfos[$symbol];
|
|
683
|
$lot = $this->exBroker->getPos($symbolOri, $posSide);
|
683
|
$lot = $this->exBroker->getPos($symbolOri, $posSide);
|
|
684
|
$qty = round($lot * $symbolInfo->ctVal, $symbolInfo->qtyPrec);
|
684
|
$qty = round($lot * $symbolInfo->ctVal, $symbolInfo->qtyPrec);
|
|
|
|
685
|
+ if ($this->posMode != self::MODE_ONE_SIDE) {
|
|
|
|
686
|
+ $qty = abs($qty);
|
|
|
|
687
|
+ $lot = abs($lot);
|
|
|
|
688
|
+ }
|
|
685
|
return $qty;
|
689
|
return $qty;
|
|
686
|
}
|
690
|
}
|
|
687
|
return -1;
|
691
|
return -1;
|