Individual skill

dsl-exit-engine

Use when designing or tuning exit logic for a Freqtrade strategy — ratcheting trailing stop, two-phase exit, ALO-aware exit, dynamic stoploss DSL, ROI ladder, take-profit ladder, exit engine. Defines a three-phase exit that strategies compose: Phase 0 ROI ladder, Phase 1 hard stop, Phase 2 ratcheting trail.

skills/dsl-exit-engine/SKILL.md

Read pinned source

Source commit 9d41db54b231f77e35610a73230eaeffcb456215

What was checked

Matches the observed repository HEAD
Yes
Scanner rules are current
No
Repository scan complete
No
Skill scan complete
No
Observed behavior
Not checked yet
Last checked
Nov 11, 2026

These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.

Install this skill

Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.

An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.

Repository context

Repository stars (not skill ratings)
232
Repository last updated
Sep 10, 2026
License
MIT

Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.

Files and excerpt

File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.

Browse files
Read excerpt

# DSL Exit Engine — Three-Phase Exit Primitive

A reusable exit primitive that any strategy skill can compose. Replaces the ad-hoc trailing-stop logic currently duplicated inside `breakout` with a single, declarative spec.

Other names this is searchable under: **ratcheting trailing stop**, **two-phase exit**, **ALO-aware exit**, **dynamic stoploss DSL**, **ROI ladder**.

---

## Why a DSL

The Freqtrade `IStrategy` lifecycle gives you `stoploss`, `trailing_stop`, `trailing_stop_positive`, `minimal_roi`, and `custom_exit`. Each strategy ends up reimplementing the same three-phase shape:

1. **Phase 0 — Take-profit ladder (`minimal_roi`).** Cash out winners at known target tiers, decaying over time. For mean-reversion / scalper strategies, this is the primary profit mechanism.
2. **Phase 1 — Survival (`stoploss`).** A hard max-loss cutoff while the trade is underwater or barely above breakeven.
Back to top