I only want two orders at any time but after the below output I'm winding up with 3. I see (bolded below) two close calls and one close position call executed. But there were only 2 short positions to begin with. Now after the 2 long opens I have 3 longs.
exit for SO1K2 at 81.21
EXECUTE; orderId='853514790' account='356213' name='SP' orderState=Filled instrument='MCL 05-23' orderAction=BuyToCover orderType='Market' limitPrice=0 stopPrice=0 quantity=1 tif=Gtc oco='' filled=1 averageFillPrice=81.24 onBehalfOf='' id=829 time='2023-04-17 09:28:46' gtd='2099-12-01' statementDate='2023-04-17'
--- long ---
4/17/2023 9:28:46 AM Strategy 'AzlOptimistic/293151166': Entered internal SubmitOrderManaged() method at 4/17/2023 9:28:46 AM: BarsInProgress=2 Action=Buy OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='LO1K1' FromEntrySignal=''
4/17/2023 9:28:46 AM Strategy 'AzlOptimistic/293151166': Entered internal SubmitOrderManaged() method at 4/17/2023 9:28:46 AM: BarsInProgress=2 Action=Buy OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='LO1K2' FromEntrySignal=''
EXECUTE; orderId='853578839' account='356213' name='SP' orderState=Filled instrument='MCL 05-23' orderAction=BuyToCover orderType='Market' limitPrice=0 stopPrice=0 quantity=1 tif=Gtc oco='' filled=1 averageFillPrice=81.24 onBehalfOf='' id=830 time='2023-04-17 09:28:46' gtd='2099-12-01' statementDate='2023-04-17'
EXECUTE; orderId='853564136' account='356213' name='Close position' orderState=Filled instrument='MCL 05-23' orderAction=BuyToCover orderType='Market' limitPrice=0 stopPrice=0 quantity=1 tif=Gtc oco='' filled=1 averageFillPrice=81.24 onBehalfOf='' id=831 time='2023-04-17 09:28:46' gtd='2099-12-01' statementDate='2023-04-17'
EXECUTE; orderId='853529571' account='356213' name='LO1K1' orderState=Filled instrument='MCL 05-23' orderAction=Buy orderType='Market' limitPrice=0 stopPrice=0 quantity=1 tif=Gtc oco='' filled=1 averageFillPrice=81.24 onBehalfOf='' id=832 time='2023-04-17 09:28:46' gtd='2099-12-01' statementDate='2023-04-17'
Entry Price for LO1K1 : 81.24
Stop for order: 1 : 81.08
EXECUTE; orderId='853573825' account='356213' name='LO1K2' orderState=Filled instrument='MCL 05-23' orderAction=Buy orderType='Market' limitPrice=0 stopPrice=0 quantity=1 tif=Gtc oco='' filled=1 averageFillPrice=81.24 onBehalfOf='' id=833 time='2023-04-17 09:28:46' gtd='2099-12-01' statementDate='2023-04-17'

Comment