The exit_rules.conditions list accepts the same conditions you'd
put in entry rules. Any fire = close the position. Use this for
non-stop, non-target exits like "RSI hit 80, take the profit before
the stop trails through."
Shape
"exit_rules": {
"conditions": [
{ "type": "comparison", "indicator": "rsi", "operator": ">", "value": 80 }
]
}Interaction with native SL/TP
Custom exit conditions emit a signal exit reason. When an entry
has already attached native SL/TP to the exchange, the engine
suppresses interpreter stop and target signals to avoid
fighting the native fills. Custom signal exits still fire - they're
in a different category.
Usage
- RSI extreme exit: cap a trend trade when momentum gets parabolic.
- Time-based exit: combine with
in_sessionto close before a session boundary. - Indicator divergence detection via custom conditions.
Pitfalls
- Multiple custom exits OR each other. Any single fire closes the position.
- They don't override stops or targets that have already filled
- by then the position is already closed.
