Stop Loss and Take Profit
Protecting downside and locking in profits with on-chain close orders.
When creating a STOP_LOSS_LONG or TAKE_PROFIT_LONG order via BrokexRouter.createCloseOrder:
- Your position shares are reserved (
reservedCloseShares) and tagged with your currentpositionEpoch. - Keepers monitor
BrokexRegistry.getRiskPrice18(asset)and execute the close when the trigger condition is met. - If you manually close your position first,
positionEpochincrements and the stale close order can be cancelled by anyone.