Price-Anchored Futures Grid with Position Rebalancing
Summary
This Binance futures program calculates a target position from the price's percentage move relative to a stored initial or user-defined reference price. A grid interval and position value determine how exposure changes as price moves; the program submits limit orders to adjust holdings toward the target and maintains buy and sell orders around calculated prices. It cancels existing orders before replacing them and checks minimum order size against exchange metadata. The settings also control the target price, reporting mode, update interval, and loop sleep time.
The document is primarily an implementation example, with no backtest results or performance analysis; the code explicitly disallows virtual backtesting. Its account reporting includes balance, margin, unrealized profit, and liquidation price, while trading uses Binance perpetual contracts and sets leverage in the program. The position formula, reliance on a fixed reference price, and use of leveraged futures expose the approach to accumulating directional exposure and liquidation risk during sustained moves. Costs, funding, and risk limits are not analyzed, so the supplied settings do not establish profitability or safety.
Key ideas
- The program maps price movement from a stored or specified reference into a target futures position.
- Grid spacing and a position-value setting determine exposure adjustments as price changes.
- It places limit orders to rebalance exposure and replaces outstanding orders when needed.
- The implementation is designed for Binance perpetual futures and does not support virtual backtesting.
- Leverage, sustained directional moves, funding, and liquidation risk are not addressed through performance evidence.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.