I've implemented my own trigger order system with LEAN that places both a stop and a target order when an entry condition is met, and cancels with OCO logic when one is filled.

Crypto assets only allow sell orders up to a max of the position held, so the position can't end up short. This means I can't have both a stop order and a target order active, since that is selling 2x the total position held.

How can I have both orders active at the same time?

Author