Who know the algorithm of Forcible Closing(Stop out)?

 
I'm confused by the Forcible Closing, who can tell me the details of algorithm ?
 
If margin level is less then StopOutLevel then the order with biggest unfixed loss will be closed. If after this operation margin level still remain less then StopOutLevel=> one more order with biggest loss will be closed, etc.
Reason: