Net quantity zero not working two positions at same time

I entered conditions in two sets one for Call buy and another for call sell. Two opposite side entries. But paper trade shows frequent buy sell of,options too many number of times resulting later into two positions outstanding one Call long at ATM and another Call short at next strike . I entered Netquantity, traded instrument anme as zero in both the conditions. Still two positions come sometimes. How to rectify this??

Show your code screenshot