Position Balancer

What it does
Automatically increases CLOSE order size when your position is large, unbalanced, and profitable. The larger the imbalance, the bigger the close orders become. When conditions ease, close orders return to normal size. OPEN orders are never changed, so the grid keeps building the position at normal size while CLOSE orders are enlarged to reduce it faster.

When it activates

All three conditions must be true at the same time:
  • Utilization above threshold: the excess on one side that is not offset by the other side must reach at least the lowest configured tier (see Utilization below).
  • Position is profitable: ROE (Return on Equity) must be at or above minProfitPct. ROE is your unrealized profit on a position as a percentage of what you seeded. A $500 long worth $507 has an ROE of 1.4%.
  • No rebalancing in progress: if the bot is already fixing an inventory imbalance, Position Balancer pauses to avoid competing.
Once all three pass, the bot selects the highest matching tier and applies its multiplier to every CLOSE order until conditions change.
The Position Balancer panel on the GridBT dashboard. It shows current utilization on each side, the active tier, and whether the CLOSE order multiplier is applied.

Utilization

Utilization measures how much excess exposure one side is carrying that is not offset by the other side, relative to your net exposure limit.
The side that is larger than its counterpart carries excess. Only the larger side produces non-zero utilization and can trigger the balancer.
The side that is smaller than its counterpart always shows zero utilization and will never trigger.
Example: HYPEUSDT anchored at $30.00. Long $760, Short $200, maxNetExposureUsd = $1,000.
  • Long excess: $760 - $200 = $560. Utilization: $560 / $1,000 = 56%
  • Short excess: $0 (short is smaller). Utilization: 0%

Default tiers

Utilization at or aboveMultiplierEffect on a $10 CLOSE order
50%1.25x$12.50 per fill
75%1.50x$15.00 per fill
90%2.00x$20.00 per fill
You can customise tiers in Config Reference.

Worked example

Settings: orderSizeUsd = $10, maxNetExposureUsd = $1,000, minProfitPct = 1.0, default tiers.
Snapshot: HYPEUSDT anchored at $30.00. Your long has grown to $760 and your short is at $200. Price has moved above anchor, so your long ROE is 1.4%.

Long side

StepCalculationResult
Excessmax(0, $760 - $200)$560
Utilization$560 / $1,00056%
Tier match56% is above 50% but below 75%50% tier
Multiplier1.25x
Profit check1.4% ≥ 1.0%Pass
Close order size$10 x 1.25$12.50

Short side (same snapshot)

StepCalculationResult
Excessmax(0, $200 - $760)$0
Utilization$0 / $1,0000%
Does it trigger?0% is below all tiersNo
If long excess grows to $920 (92% utilization) and profit is still above 1%, the 90% tier applies and close orders become $10 × 2.0 = $20.

Tuning guide

GoalSetting to changeSuggested value
Trigger less oftenRaise minProfitPct2.0 or 3.0
Finer step controlAdd tiers between existing onese.g. threshold 0.625 at 1.375x
Attack near the capAdd a high-threshold tier0.90 at 2.0x or 0.95 at 2.5x
Start earlierLower the first tier threshold0.40 at 1.25x
For all available config fields see Config Reference. For the ROE formula see Formulas.