# Survival Analysis for Trade Exits

Uses survival analysis to dynamically decide when to exit trades based on real-time market conditions.

Canonical: https://prismaticalgos.com/compendium/algo/4250-survival-analysis-for-trade-exits
Record ID: 4250
Catalog rank: 1797 (reading order, not performance)
Snapshot: 2026-10-31 15:46 UTC
Family: Trend Following & Directional (A)
Source: https://www.mql5.com/en/articles/24106
Evidence label (unverified): backtest_shown

## Scope and limitations

These are machine-extracted research records, not verified trading systems. Catalog rank measures specification detail and claimed evidence, not profitability. The catalog extraction pipeline did not independently backtest these records. Its separate selected testing ledger does not validate the wider corpus. Rules, labels and parameters can be incomplete or wrong; consult the original source and its reuse terms.

No endorsement, ownership claim or source-code reuse permission is implied.

## Extraction warnings

No automated warnings recorded; this is not validation.

## Recorded profile

- symbols: EURUSD, GBPUSD, USDJPY, XAUUSD
- timeframes: M30
- sessions: Not specified
- market_regime: any

## Indicators

- ATR: {"period": 14}; applied to: close
- EMA: {"period": 50}; applied to: close

## Recorded long-entry rules

- Not specified.

## Recorded short-entry rules

- Not specified.

## Recorded exit rules

- Roll forward hazards from the current bar to the time stop, accumulating cumulative incidence for each cause and the residual probability of still being open at the end.
- Close early when the expected value of holding is less than the expected value of closing minus a margin.
- Close when the stop-loss hazard runs well above the take-profit hazard on a position in profit.

## Recorded filters

- SYMBOL_TRADE_TICK_VALUE can be wrong for JPY-quoted pairs

## Risk controls

- Stop loss: Fixed at 1 R
- Take profit: Fixed at R_TP
- Position sizing: Sized based on risk percentage and hypothetical trade profit
