Stop Conditions in China-Built Grid Bots

A grid bot without stop conditions keeps working until it is manually stopped, which means its exposure grows with whatever the market does. The stop conditions are the rules that pause new orders, cancel resting orders, or hold existing inventory when a threshold is crossed, and they are the primary risk controls separating a bounded deployment from an open-ended one. The decision on what to stop rests on three quantities: how far the price has moved outside the configured band, how much inventory or exposure the bot holds, and how reliable the connection and venue state have been. This article sets out those quantities, the market and technical stops they produce, and the geo restriction and venue-access conditions that should also trigger a stop. Grid trading may be prohibited in some jurisdictions; obtain local legal advice before deployment. The article is technical information, not investment advice, and states no profit, yield, or return figure or risk-free guarantee.

The three quantities that decide a stop

The first quantity is price position relative to the band. A grid is configured for a range; when the price reaches the lower or upper bound, or crosses beyond it, the working assumption changes. A stop should define what happens at each edge: pause replenishment, cancel resting orders, or hold inventory for review. The range and spacing that define these edges are set in the parameter review covered in grid bot parameters: range and spacing, and the stop conditions are the companion controls that act when those parameters no longer fit.

The second quantity is held inventory and total exposure. As buy levels fill in a downward move, the bot accumulates the asset; as sell levels fill in an upward move, it may be left without its position. Exposure caps should limit how much inventory the ladder can carry and how much gross notional rests across open orders, and a stop should trigger when either cap is approached or reached. The third quantity is operational state: whether the connection to the venue is alive, whether orders reconcile after reconnect, and whether errors or reverts are repeating. A bot that cannot verify its state should stop sending new orders until reconciliation succeeds.

Market-based stops a grid should carry

Band-edge stops act when the price touches or crosses a configured bound. The bot may halt new orders and leave existing inventory to be reviewed, or cancel resting orders that no longer match the market’s position; the exact behavior should match the design and be written into configuration. A stop that only closes the bot’s dashboard view, without canceling orders or halting replenishment, does not count as a stop condition, because the venue-side orders remain active.

Inventory and exposure stops act on the held position rather than the price. A maximum held quantity, a maximum concurrent notional across the ladder, and a maximum single-order size prevent the grid from accumulating exposure across many small levels. When the cap is reached, the bot stops opening new orders until inventory falls back within limits. These caps are especially important in a dense grid, where many small orders can combine into a large total exposure even when each level looks modest. The sideways-market conditions in which the band fits the price, and the expectations attached to them, are discussed in grid bots in sideways markets: expectations.

Time-based stops offer a third market-side check: the bot stops after a defined observation period if conditions have not matched the configured regime, or if a review is due. Time stops prevent a deployment from running indefinitely without rechecking whether the range still fits current movement. The trigger should produce a review record, not just an automatic restart under the same settings.

Technical stops for disconnects and reconciliation failures

Connection stops respond to operational state. A watchdog that measures time since the last message from the venue stream triggers a reconnect when silence passes a threshold; if the reconnect does not restore a verified state within a defined window, the bot halts new order placement. After reconnect, the bot must reconcile open orders and recent fills against the venue record before resuming; a stop holds until that reconciliation matches. Duplicate-order checks and unknown-state handling belong to this stage, because acting before reconciliation is how redundant exposure appears.

Error-rate stops trigger when repeated rejections, failed orders, or reverts cross a threshold. A circuit breaker halts sending, alerts the buyer, and prevents the bot from continuing to retry against a rejecting venue. The threshold, the halt behavior, and the manual or automatic restart condition should all be configurable and logged. The stop conditions are what the bot does when those failures appear, rather than continuing to retry against a rejecting venue.

The manual kill switch is the stop the buyer holds independently. It should cancel resting orders and halt new orders without requiring the vendor’s involvement, and it should work from the buyer’s own access path rather than only through the vendor’s panel. A buyer who cannot trigger a stop without the vendor’s staff does not hold independent control, and that dependency should be treated as a control gap.

Geo restriction and venue-access stops

Geo restriction and venue policy add another stop layer. Some venues restrict connections or certain products by account region or network signals; if the bot’s hosting region or account verification no longer matches the venue’s access rules, the connection may be refused or the product disabled. The bot should detect access failures that persist rather than transient errors, halt sending, and alert for review rather than retrying through restricted paths. Buyers should not design around venue restrictions through proxies or layered accounts; that conflicts with venue terms and with the buyer’s own compliance position.

Account-level events can also require a stop: verification tier changes, account freezes, maintenance windows announced by the venue, or regional rule changes that affect the products in scope. The deployment should follow the stricter of local law and venue policy, and where local rules prohibit the activity, the bot should not be deployed at all, and no stop condition substitutes for that legal boundary. Venue outages are a separate stop condition: while the venue is unavailable, resting orders cannot be monitored or managed, and the bot should not place new exposure until the service returns and state reconciles.

Stop-condition gaps that appear after handover

The first gap is a stop that only affects the bot’s dashboard, not the venue. The bot may stop displaying new activity while resting orders remain live on the book, so the exposure the stop was meant to bound continues on the venue side. Every stop should be verified against the venue’s own order list after triggering, not against the bot’s panel. The second gap is a threshold set so wide that the stop never triggers before exposure has already grown past the intended bound; caps must be checked against the actual ladder exposure, including combined orders across all levels.

The third gap is an automatic restart with no review. After a stop triggered by a disconnect, reconciliation failure, or exposure cap, the bot resumes placing orders without a recorded check of what changed. Restart should require either a verified reconciliation pass or an explicit buyer action, depending on the configured design, and each restart should leave a log entry. The fourth gap is shared control: the kill switch and stop settings sit in the vendor’s panel, so the buyer cannot act independently when the vendor’s staff are offline. Independent access to halt the bot is a baseline control, not a courtesy.

A fifth gap is missing stop conditions for the product the bot actually trades. A spot grid needs inventory and band-edge stops; a futures or leveraged design also needs margin and liquidation-distance stops, because margin erosion can force a close by the venue before the bot’s own inventory cap acts. Buyers should confirm which product the stop set covers, and add the missing margin conditions before any leveraged deployment.

Configuring, testing, and reviewing stop conditions

Stop conditions should live in readable configuration the buyer can review, with each threshold, the trigger behavior, and the restart path stated explicitly. Every stop event should be logged: trigger time, threshold crossed, orders affected, and whether the stop canceled or only paused. The set should be tested in staging: force a stream drop, push an exposure past the cap, and trigger the manual kill switch, checking that each halt behaves as configured and that orders are accounted for afterward.

Stop conditions should be reviewed whenever parameters, pairs, venues, or exposure limits change, and periodically during operation. The review should check that each threshold still matches the pair’s current movement, that the alert reaches the buyer’s own channel, and that the recorded stop history shows no triggers that were silently cleared without review. A threshold tuned for one pair’s normal movement may not fit another pair or a changed market regime. The loss scenarios where a grid runs beyond its bounds are laid out in when grid bots lose money, and the stop conditions reviewed alongside those scenarios define how each scenario is bounded. The guidance here covers how stops are configured and tested; it does not advise trading, and it makes no claim that any stop prevents losses or that the bot will respond as configured under every live event.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *