Strategies
3Commas BTCUSDT.P Fixed Geometric Grid, Long Only
Outcome: Abandoned
ThreeCommasBtcBybitFixedGeometricGrid
Outcome Summary
The strategy translated a 3Commas long-only geometric grid for BTCUSDT.BYBIT. After 3 iterations, QA found a restart defect that could leave a filled position without its planned exit. Smoke-test performance metrics also conflicted and were marked unreliable. The run was abandoned during verification; later stages were not reached.
Hypothesis
A faithful trading hypothesis from 3Commas’ Pine strategy for BTCUSDT.BYBIT on 15-minute bars. Defaults: highPrice=83689.23, lowPrice=51629.65, nLevels=50, gridMode="Geometric", investment=10000 USDT. The source sets initial_capital=10000, default cash quantity=250, pyramiding=200, commission=0.055% per side, slippage=3 ticks, process_orders_on_close=true, and calc_on_every_tick=false. Each entry supplies an explicit quantity, so the default cash quantity does not size its grid trades. The platform starts with $100,000; preserving the source’s 10000 USDT investment makes each slot 200 USDT, about 0.2% of starting equity, with at most 9800 USDT across the 49 buyable levels. The default date filter accepts bars whose opening timestamp is from 2025-04-01 00:00 UTC through 2026-12-31 23:59 UTC. Visualization and 3Commas webhook settings do not alter trades. Source: https://www.tradingview.com/script/BR74LOKo-BTCUSDT-P-Grid-Bot-Long-Strategy/
Keeps the translated grid rules and latches each slot’s exit after its first upward crossing. A canceled or partially filled exit is retried for its remaining quantity; an order in another slot no longer prevents the crossing from being recorded. Open sell quantities are reserved against the net long position. The smoke test’s return-on-notional metric remains unreliable and needs trade-ledger reconciliation before performance assessment.
verification_loop: Verification failed (Layer 4 — QA review) [class=code_defect]: - [edge_concern] The smoke-test ledger reports positive average USD PnL but negative average return on notional; metrics_reliable is false. Reconcile fills and notional before assessing performance. - [critical] The paper-state snapshot is published before the bar's orders are processed. Fill callbacks update slot ownership without publishing another snapshot. A restart before the next bar can restore a stale slot ledger alongside a carried position, leaving a filled long without an owned slot and preventing its grid exit. (line 161) — fix: Persist slot state after fills, or reconstruct and validate it from fill records on restart. Test restarts immediately after buy and partial sell fills.
Implementation
Buys downward crossings of the fixed geometric BTC grid and sells each filled slot after price crosses the level above it.
Verification Results
Verification failed (Layer 4 — QA review) [class=code_defect]: - [edge_concern] The smoke-test ledger reports positive average USD PnL but negative average return on notional; metrics_reliable is false. Reconcile fills and notional before assessing performance. - [critical] The paper-state snapshot is published before the bar's orders are processed. Fill callbacks update slot ownership without publishing another snapshot. A restart before the next bar can restore a stale slot ledger alongside a carried position, leaving a filled long without an owned slot and preventing its grid exit. (line 161) — fix: Persist slot state after fills, or reconstruct and validate it from fill records on restart. Test restarts immediately after buy and partial sell fills.
Iteration History
Verification failed (Layer 4 — QA review) [class=code_defect]: - [edge_concern] The sandbox ledger reports positive average USD PnL but negative average return on notional; metrics_reliable is false. Reconcile these figures before assessing performance. - [critical] The code marks a slot bought or sold when it submits an order, before any fill is confirmed. A rejected, delayed, canceled, or partially filled order can leave the slot ledger inconsistent with the actual position. This override also bypasses the base class's in-flight order guard. (line 118) — fix: Track pending orders by slot. Change owned status and lot quantity only on confirmed fills; handle partial fills, rejections, and cancellations, and prevent duplicate submissions.
Verification failed (Layer 4 — QA review) [class=code_defect]: - [edge_concern] The smoke test reports positive average USD PnL but negative average return on notional, with metrics_reliable=false. Reconcile the trade ledger before assessing performance. - [critical] After a partially filled exit closes or is canceled, the remaining slot quantity requires another upward price crossing to trigger a sale. If price stays above the exit level, that quantity remains open indefinitely. (line 148) — fix: Latch the slot's exit intent at the first crossing and retry its remaining quantity until fully closed. - [critical] An open order in one slot blocks evaluation of every other slot for that bar. Another slot can cross its exit level during the blocked bar and never exit unless price recrosses. (line 171) — fix: Evaluate slots independently and retain each slot's exit intent until its order completes.
Outcome Summary
Persist or reconstruct slot ownership after fills and reconcile fill metrics before assessing performance.
After 3 iterations, Layer 4 QA found that a restart after a fill could lose slot ownership, potentially leaving a long position without its grid exit. The run was abandoned before later reviews.
A long-only BTCUSDT.BYBIT geometric grid bought downward crossings of fixed price levels and sold each slot at the next level up.
No backtest report or reliable return, Sharpe, or trade count was provided. Smoke-test metrics showed positive average USD PnL but negative average return on notional and were marked unreliable.
Abandon Reason
verification_loop: Verification failed (Layer 4 — QA review) [class=code_defect]: - [edge_concern] The smoke-test ledger reports positive average USD PnL but negative average return on notional; metrics_reliable is false. Reconcile fills and notional before assessing performance. - [critical] The paper-state snapshot is published before the bar's orders are processed. Fill callbacks update slot ownership without publishing another snapshot. A restart before the next bar can restore a stale slot ledger alongside a carried position, leaving a filled long without an owned slot and preventing its grid exit. (line 161) — fix: Persist slot state after fills, or reconstruct and validate it from fill records on restart. Test restarts immediately after buy and partial sell fills.
Analysis
BTCUSDT.P Grid Bot - Long Strategy by 3Commas
Backtest and paper results are hypothetical. Trading involves risk of loss.