Continuous Grid Trading with Replenishing Buy Levels
Summary
This strategy divides a user-defined price range into evenly spaced levels and maintains a separate inventory flag for each buy tier. Once activated by a close inside the range, it monitors crossings at each level. A downward move through a level can open a fixed-size long position if that tier is empty; an upward crossing of the next level closes the matching position and makes the tier available for another cycle. The grid spacing follows directly from the range limits and number of levels.
An optional stop loss cancels orders, closes positions, resets the tier flags, and deactivates the bot when the close reaches its configured floor. The script specifies commission and position settings, but supplies no performance study. Grid accumulation can build substantial long exposure during a sustained decline, especially below the operating range, while trading costs and actual fill behavior can alter results. The approach depends on repeated oscillations within the chosen band.
Key ideas
- The price band is split into evenly spaced levels, with a fixed order size assigned to each buy tier.
- A tier may open a long position on a downward crossing when its inventory flag is clear.
- The matching position closes when price crosses upward through the next grid level, after which the tier can replenish.
- An optional floor stop closes positions, cancels orders, and resets the bot's tracked state.
- The document gives no performance evidence, and sustained declines can leave the strategy holding losing inventory.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.