What exit logic is
Exit logic defines when and how a trade is closed. A trade is considered complete only when an exit condition is met. Without exit logic, a strategy cannot be executed or backtested.Types of exit logic
Exit logic can be based on different mechanisms.Fixed exits
Take profit and stop loss defined as fixed percentages or values.
Indicator-based exits
Exits triggered by indicator conditions.
Time-based exits
Trades close after a defined duration.
Conditional exits
Exits that depend on market context or regime.
Fixed exits (TP / SL)
The most common exit type. Example:- easy to reason about
- deterministic
- comparable across strategies
Indicator-based exits
Indicator exits close a trade when a condition becomes true. Examples:- adapt to market behavior
- can shorten or extend trades
- are evaluated on candle close
Time-based exits
Time-based exits close a trade after a certain duration. Example:- cap exposure time
- prevent very long trades
- are often combined with TP/SL
Multiple exit conditions
A trade may have multiple exit conditions. Example:Direction-specific exits
Exit logic may differ by direction. Example:- asymmetric risk profiles
- adaptation to market behavior
When exits are evaluated
Exit logic is evaluated:- on every candle close
- while a trade is open
- before new entries are considered
Exit conditions always take priority over new entries.
Default behavior
If exit logic is:- missing → strategy is invalid
- partially defined → ATI requests clarification
- clearly implied → ATI may infer conservatively
What Trinigence fills automatically
See how missing exit details are handled.
Common mistakes
Relying only on take profit
Relying only on take profit
Strategies without stop loss usually produce misleading results.
Conflicting exit conditions
Conflicting exit conditions
Multiple exits may interact in unexpected ways.
Expecting intrabar exits
Expecting intrabar exits
Exits are evaluated on candle close by default.
Best practices
- Always define both TP and SL
- Inspect exit timing visually
- Use time-based exits for safety
- Keep exits simpler than entries
Risk management
Learn how exits and risk work together.
What to read next
Risk management
How losses are controlled.
Entry logic
How trades are opened.
Direction: long & short
Direction-specific exits.
Strategy overview
Return to the big picture.
Entries decide if you trade.
Exits decide how you perform.
Exits decide how you perform.