i had some check and i knew there is code allow to loop thru all open order and select the type of order to close , delete however this is time confusing (i.e around 6 txn will took about 3 second) where its not feasible for me i had see some example
1st time buy signal here the one providing the trade obvious place heavy trade against the trend , hence i close it manually the poistion fml , it get 'synchronized' and automatically open another batch of heavy position after i manual close it