Assume a $10 wide debit spread is opened for $1. Its Maximum Profit would be $900 = (($10 - $1) * 100).
Now further assume that at some time before expiration, the position can be closed for a profit of $895. That's 99% of its potential Maximum Profit.
Does not make much sense to keep the position open, hoping to capture the remaining $5 of potential profit while risking $895!
So... I suggest implementing an Exit instruction that can be set to trigger when a position or leg group achieves NN% of its Maximum Profit.