Sorry, we don't support your browser.  Install a modern browser

Partial Position Reduction via Telegram Alerts for Futures#695

G

Summary

Add support for reducing an existing (futures) position by a configurable percentage via a Telegram (TG) message that specifies exactly what % (and optionally what size) should be closed. This enables controlled de-risking without needing to fully exit or manually calculate contract amounts.

Problem / Current Limitation
Right now, when running futures strategies, the system effectively treats exits as all-or-nothing:
Either hold the full position, or
Close the full position.
If the strategy wants to de-risk (e.g., take partial profits, cut exposure gradually, trim into volatility), we can’t do that cleanly.

Why This Is Important
Partial position management is a core futures risk tool. This feature matters because it:
Improves risk control
Futures are leveraged; reducing 20–50% can materially lower liquidation risk while keeping a runner.
Allows exposure to be scaled down during regime shifts or volatility spikes.
Enables smarter strategy behavior

Many profitable futures systems rely on:
Partial profit-taking at targets,
Staggered stop-out (e.g., trim first, exit later),
Volatility-based position shaping.
Without partial exits, strategies become more blunt and less robust.
Reduces human error & execution latency
TG alerts that state the exact % to close remove guesswork.
Helps operators execute faster and consistently, especially in fast markets.
Aligns futures with best practices
Professional futures trading rarely exits 100% at once unless stopping out.
This brings our tooling closer to standard risk workflows.

Proposed Behavior / Requirements
Strategy can request a reduction like:
reduce_position_pct = 25 → close 25% of current open position.
Works for both long and short futures positions.
Reduction should respect exchange minimums/step size:
If computed size is below min, either round up to min or skip with warning.
Add a “cooldown/anti-spam” so repeated reductions don’t flood TG.

Acceptance Criteria
✅ Strategy can request a partial reduction by % while position is open by sending a Telegram message
✅ System computes correct close size based on current position.
✅ Reduction request executes as a reduce-only order.
✅ Works on both long and short positions and across supported futures venues.
✅ Edge cases handled (min size, rounding, no position, etc.) with safe fallbacks.

7 days ago