Progressive Take Profit for Combo Bots

:pushpin: Context

Currently, Combo Bots in Gainium use (optionally) a fixed Take Profit (TP) to close deals once the total base asset position reaches the configured profit. This works well in stable or bullish conditions, but during significant price drops, the bot can remain stuck in an open deal, even if mini grid profits have been accumulating. Meanwhile, all invested capital remains locked.

:bulb: Proposed Solution

Introduce a feature called Progressive Take Profit, which allows partial closure of the total base asset position, based on available realized mini grid profits.

The bot would:

  1. Split the base asset position into the smallest allowed sell units (e.g., $5 minimum on Binance).
  2. For each unit, compare its original cost (based on the average buy price) to its current market value.
  3. Calculate the deficit and the additional amount needed to reach the configured TP (e.g., 1.5% over cost).
  4. If the grid profit reserve has enough to cover the gap + TP margin, the bot closes the split in profit, using only what’s necessary.
  5. Unused grid profits remain reserved for other units.

:white_check_mark: Advantages

  1. Faster capital recovery, even in bearish markets.
  2. Granular deal exits based on real profitability.
  3. Efficient use of mini grid profits, only where needed.
  4. Optional feature, preserving user strategy flexibility.
  5. Reduces deal stagnation and improves reinvestment cycles.

:warning: Considerations

  1. Increased complexity in internal logic.
  2. Slight rise in trading frequency and fees.
  3. Clear tracking of partial closures required in UI.

:bar_chart: Example Scenario

Pair: BTC/USDT
Invested: 100 USDT
Average Buy Price: 100,000 USDT/BTC
BTC Acquired: 0.001 BTC
Current Price: 70,000 USDT (30% drop)
Grid Profit Available: 3 USDT
Take Profit Target: 1.5%
Exchange: Binance (min sell = $5)

Current Behavior

At 70,000 USDT, 0.001 BTC is worth only 70 USDT + $3 of grid profit = $73. The bot cannot close the deal, as TP (101.5 USDT) is far from being met. All capital remains locked.

Behavior With Progressive Take Profit

Step-by-step:

  1. 0.001 BTC split into 14 units of 0.00007143 BTC (~$5 each at current price).
  2. Each unit originally cost: 0.00007143 Γ— 100,000 = $7.00
  3. Current market value: 0.00007143 Γ— 70,000 = $5.00
  4. Loss per unit: $2.00
  5. Required profit margin (1.5% on $7):
    $7 Γ— 1.015 = $7.105
  6. Total needed from grid profit to close in profit:
    $7.105 - $5.00 = $2.105

:point_right: The bot checks if it has at least $2.105 in available grid profit.
If yes, it closes that unit, uses $2.105 from the reserve, and leaves $0.895 for future partial exits.

This mechanism repeats for other units, maximizing capital rotation and maintaining the TP target logic with precision.

By using Progressive Take Profit the bot can adapt more intelligently to adverse market conditions, gradually unlocking capital without compromising on profitability. It’s a practical and efficient enhancement for all Gainium users, especially in volatile scenarios.

I believe this proposal can offer real strategic value β€” thank you for considering it!