consideredPositionsClosedIfOffsetByIndependentPositions

In by OptionStackLeave a Comment

By default, once a position is opened, it is considered open unless it has expired or has been explicitly closed by an accompanying order with matching OrderID.  This allows multiple positions to be managed and tracked separately, without worrying about one trade interfering / offsetting another trade unintentionally.

For example, the following example below has two separate trades that offset each other:

OrderId=”SellPut1

  • Sell Put @ Strike = 100

OrderID = “BuyPut1″

  • Buy Put @ Strike = 100

By default, since both  positions (SellPut1 and BuyPut1) have different OrderIds, they are both considered open and tracked as two separate positions, even though one position effectively offsets / closes the other position.

But if you set the consideredPositionsClosedIfOffsetByIndependentPositions setting, both positions will be considered closed, since they offset each other and result in a net zero position.

The consideredPositionsClosedIfOffsetByIndependentPositions setting is often used with the netOpenQuantity method to determine if a position is considered closed when another independent trade with overlapping strikes has closed all the open legs / contracts.

Leave a Comment