how is the code to close at same time with sl-tp

or

any order is necessary to close sl or tp.

I want to learn

order to close anythink else.
can next order close last order?