Enforce maximum holding time per position. No more "holding and hoping."
PipsGuard tracks how long each position has been open. When a trade exceeds your configured maximum duration, it's automatically closed or you're notified. This prevents "holding and hoping" — where traders refuse to close losing positions because "it might come back."
The timer starts from the moment the position opens. A warning is sent when the trade reaches the configured warning threshold, giving you time to manage the exit manually before the auto-close kicks in.
| Parameter | Default | Description |
|---|---|---|
| max_duration_hours | 24 | Maximum time a position can stay open (hours) |
| action | close_position | Action on breach: close_position or notify |
| warning_percent | 80% | Warn at this percentage of max duration |
| grace_period_minutes | 5 | Extra minutes before force-close after max duration |
| exempt_symbols | [] | Symbols excluded from duration limits |
| apply_to_profitable_only | false | Only close profitable trades (take profit enforcement) |