资源加载中... loading...

POSITION_DIRECTION

PD_LONG

PD_LONG is the value of the Type attribute in the {@struct/Position Position} structure, indicating the long position type.

number

The value of PD_LONG is 0. For long positions in the contract market, use exchange.SetDirection(“closebuy”) to set the direction to close the position and close the position of that type.

{@var/POSITION_DIRECTION/PD_SHORT PD_SHORT}

PD_SHORT

PD_SHORT is the value of the Type attribute in the {@struct/Position Position} structure, indicating the short position type.

number

The value of PD_SHORT is 1. For short positions in the contract market, use exchange.SetDirection(“closesell”) to set the direction of closing the position and close the position of that type.

{@var/POSITION_DIRECTION/PD_LONG PD_LONG}

ORDER_TYPE ORDER_OFFSET