Tuning: Exits
The Exit stage decides how and when an open position is closed or protected. Its components are buyer dials — tunable for your own account and risk appetite even on a strategy you bought — though adding or removing an exit block from the chain is still a structural change through the evidence gate.
One thing that shapes every exit here: Kalshi does not net positions. A hedge is a real, separately-settling contract with its own cost — not an offset that cancels your original position. That is why the hedge dials below are mostly about buying insurance cheaply enough to be worth it. See Concepts: edge & settlement.
Exit Bracket
Groups Take Profit and Stop Loss — with a Re-entry Cooldown — as one set of dials on the Exit stage (also known as a bracket order, as in Backtrader or a TradingView strategy.exit). Both legs are off at 0, which is the default. Because Kalshi has no native bot take-profit/stop-loss, the bot synthesizes them client-side: a take-profit rests as a reduce-only sell; a stop fires a bounded reduce-only sell ladder. These dials ride the config to the bot and stay dormant fleet-wide until the exit engine is switched on — treat the guidance as "when enabled."
| Dial | Turning it up… | Range |
|---|---|---|
| Take-Profit % — exit_take_profit_pct | Takes profit at a larger gain — holds a winner longer before selling. 0 = off | 0–1 (fraction; 0.05 = 5%) |
| Take-Profit Schedule — exit_roi_table | A take-profit that relaxes as a position is held — overrides the single Take-Profit % with a minutes-held → take-profit-% step schedule (also known as Freqtrade's minimal_roi). Blank = use the single value above | comma-separated minutes:fraction pairs |
| Stop-Loss % — exit_stop_loss_pct | Stops out at a larger loss — a wider stop with more room before it fires. 0 = off | 0–1 (fraction) |
| Stop Slippage — exit_stop_slippage_cents | Lets the stop's sell ladder chase further below the trigger — more likely to complete on a thin book, at a worse price. Only applies when a stop is armed | 1–20 cents |
| Re-Entry Cooldown — exit_reentry_cooldown_minutes | Locks the ticker out for longer after a stop-loss exit — the guard against stop → re-enter → stop churn. Only applies when a stop is armed | 0–1440 minutes |
The Take-Profit Schedule is a duration-scaled take-profit: write it as comma-separated minutes:fraction pairs — for example 0:0.10,40:0.05,120:0 means "require a 10% gain to take profit while the position is young, relax to 5% after 40 minutes held, and turn the take-profit leg off after 120 minutes." Minutes are counted from when the position opened; each fraction is a 0–1 take-profit just like Take-Profit %. Leave it blank to use the single Take-Profit % instead; when it is set, it overrides that single value from the moment the position opens. Time-boxed hourly and daily contracts make minutes-held a natural axis — a schedule lets a target start strict and ease off as settlement approaches.
Tail Hedge
After a confident entry, buys a small, cheap position on the opposite side of the same market as insurance against a violent adverse move (held to settlement). Off by default. On the rare violent day the opposite side pays out and recovers most of the loss; the cost is the small premium paid on every hedged position.
| Dial | Turning it up… | Range |
|---|---|---|
| Tail Hedge Enabled — tail_hedge_enabled | Switches the immediate hedge on | boolean |
| Min Entry Price — tail_hedge_min_entry_price_cents | Only hedges more confident favorites (higher fill price) | 1–99 cents |
| Complement Min / Max — tail_hedge_complement_min_cents, tail_hedge_complement_max_cents | The price band the opposite side must fall in to be worth hedging — skip the sub-nickel penny tail (min) and anything pricier than cheap insurance (max). Min must be ≤ Max | 0–99 cents |
| Max Fill Premium — tail_hedge_max_fill_premium_cents | The cheap opening premium: pay at most this many cents above complement to take the hedge | 0–99 cents |
| Fill Hard Cap — tail_hedge_fill_hard_cap_cents | The most the hedge will ever pay above complement across its bounded fill attempts. Set equal to Max Fill Premium for single-attempt behaviour; raise it to let the fill loop escalate during an adverse move. Must be ≥ Max Fill Premium | 0–99 cents |
Cheap-Fill Lock & shared sizing
A patient second hedge channel: each loop, if a held position's opposite-side ask has decayed to at/below the lock threshold, it buys the remaining unhedged size — locking the position into a near-riskless box for pennies. It runs independently of the immediate Tail Hedge (either channel can be on alone).
| Dial | Turning it up… | Range |
|---|---|---|
| Cheap-Fill Lock Enabled — tail_hedge_lock_enabled | Switches the patient lock channel on | boolean |
| Lock Threshold — tail_hedge_lock_threshold_cents | Fires the lock at a higher opposite-side ask — less patient, fills sooner but pays more. Required when the lock is on | 1–99 cents |
| Hedge Ratio — tail_hedge_ratio | The hedge size as a fraction of the entry's filled contracts (0.5 = half). Shared by both hedge channels; must be > 0 when either is enabled | 0–2 |
A hedge channel enabled with a 0 ratio, or the lock enabled without a threshold, is a silent no-op — the schema rejects both on save so you can't arm empty insurance.
Hedge Ladder
The distinguishing exit of the price-time arbitrage strategy: a laddered set of opposite-side buys at falling price rungs that cap the paired cost of a position. It is a hedge, not a "buy more of the same side" averaging ladder — each filled rung pairs off part of the position below the settlement payout, so the intent is the opposite of averaging down.
| Dial | Turning it up… | Range |
|---|---|---|
| Hedge Ladder Enabled — hedge_ladder_enabled | Switches the ladder on | boolean |
| Rung Count — hedge_ladder_rung_count | Spreads the position across more price levels (finer slices) | 1–10 |
| Top Rung — hedge_ladder_top_cents | The shallowest rung — the first opposite-side ask that triggers a slice buy. A higher top rung triggers earlier | 1–99 cents |
| Bottom Rung — hedge_ladder_bottom_cents | The deepest rung — the lowest price the ladder waits for. Must be ≤ Top Rung | 1–99 cents |
| Max Pair Cost — hedge_ladder_max_pair_cost_cents | A rung only arms when entry price + rung price stays at or below this. At 99, every filled rung pairs off contracts for less than their settlement payout before fees | 1–100 cents |
Enabling the ladder without all four of Rung Count, Top Rung, Bottom Rung, and Max Pair Cost is a silent no-op and is rejected on save.