Skip to content
All library documents

A Range-Triggered Bitcoin Swap Strategy with Repeated Offset Orders

Article Strategy library · Author: kongbai979

Summary

This Bitcoin swap strategy chooses an initial direction by comparing the latest daily candle’s high-low range with a fixed threshold: it opens long above that threshold and short otherwise. It uses a configurable order size, leverage, and price offset. After opening, it repeatedly places orders to reduce or add to a position around prices derived from the entry price and offset, and checks available balance before continuing.

The code also tracks order fills and cancels competing orders, with a position-size threshold that triggers a full close. It reports account balance changes, but the document provides no backtest results or evidence of profitability. Its behavior depends on exchange-specific order and position fields, and the strategy’s large configurable leverage and repeated position adjustments can create substantial exposure. The daily-range rule is not itself evidence that the selected direction predicts subsequent price movement.

Key ideas

  • The initial long or short direction depends on whether the latest daily range exceeds a fixed threshold.
  • Order size, leverage, price offsets, and a position-size close threshold are configurable.
  • The strategy places offset orders and cancels competing orders as fills arrive.
  • The document reports no performance evidence, and its range rule does not establish directional predictive power.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.