Hypotheses
Hummingbot GridStrike port: long-side static grid of 190 post-only buy levels from 0.38 to 0.75, each closed by a post-only take-profit 0.1% above its fill, whole grid flattened at market if mid falls to 0.35, re-armed when price is back in the band (WLDUSDT.OKX USDT swap, 1-MINUTE, net position, 2x margin, 35% of equity grid budget)
Faithful port of "GridStrike" by hummingbot (hummingbot/hummingbot, controllers/generic/grid_strike.py, commit 9af100d, Apache-2.0), together with the GridExecutor it creates. The strategy and its default values are…
Strategies
- HummingbotWldOkxSwapGridStrike Abandoned
Hypothesis
Faithful port of "GridStrike" by hummingbot (hummingbot/hummingbot, controllers/generic/grid_strike.py, commit 9af100d, Apache-2.0), together with the GridExecutor it creates. The strategy and its default values are the author's. Any performance the author claims is unverified; our backtest with real OKX fees decides. Market: the source defaults are connector 'okx', pair WLD-USDT, leverage 20, HEDGE position mode. We trade the OKX USDT perpetual swap WLDUSDT.OKX (MARGIN account, long-capable, 1-MINUTE bars from……Show moreShow less
Faithful port of "GridStrike" by hummingbot (hummingbot/hummingbot, controllers/generic/grid_strike.py, commit 9af100d, Apache-2.0), together with the GridExecutor it creates. The strategy and its default values are the author's. Any performance the author claims is unverified; our backtest with real OKX fees decides. Market: the source defaults are connector 'okx', pair WLD-USDT, leverage 20, HEDGE position mode. We trade the OKX USDT perpetual swap WLDUSDT.OKX (MARGIN account, long-capable, 1-MINUTE bars from 2023-07). A previous attempt froze leverage 20 and HEDGE mode on WLDUSDT.OKX_SPOT, a 1x CASH venue with netting accounts, and failed Layer 1.5. This version fixes that. (1) Position mode: the controller sets side=BUY, so every grid level opens a long and every level's take-profit is a reduce-only sell. No opposing short leg ever exists, so the NET position (the sum of the filled, not yet closed levels) is exactly what HEDGE mode would hold on the long side. Substitution named: netting account instead of hedge mode, no economic difference for a one-sided grid. (2) Leverage: the source's 20x only sets margin. Exposure is set by total_amount_quote. We run the account at leverage 2.0, within the conservative profile's 5x cap, and set exposure through the grid budget below. (3) Sizing: the source's total_amount_quote=1000 USDT is an account-specific example. We set total_amount_quote = 35% of account equity, measured when each grid executor is created (~$35,000 on $100k). With every level filled, notional is 0.35x equity. The worst case is the grid filled all the way from 0.75 down to 0.38 (average entry ~0.565) and then flattened at the 0.35 limit_price, a ~38% loss on 0.35x notional, so ~13% of equity. That keeps the worst trade under the profile's 15% cap. WLD 1x volatility is ~110-130%/yr, so 0.35x contributes ~40-45%. min_order_amount_quote is scaled with the budget, as 0.5% of total_amount_quote (the source's 5/1000), so the grid has the source's geometry: 190 levels. CONTROLLER RULE (determine_executor_actions, every bar): mid = bar close (stand-in for the mid price). If no grid executor is active AND start_price <= mid <= end_price (inclusive), create a new grid executor with the config below. Otherwise do nothing. Only one executor is ever active. GRID GENERATION (GridExecutor._generate_grid_levels, at executor creation, using the mid at that moment): min_quote = min_order_amount_quote x 1.05 (the source's 5% margin over the minimum notional; size rounded up to the venue's size increment). grid_range = (end_price - start_price) / start_price. min_step = max(min_spread_between_orders, price_increment / mid). max_possible_levels = floor(total_amount_quote / min_quote). n_levels = min(max_possible_levels, floor(grid_range / min_step)). base_per_level = max(min_base, total_amount_quote / (mid x n_levels)), quantized to the size increment. quote_per_level = base_per_level x mid, and n_levels = min(n_levels, floor(total_amount_quote / quote_per_level)), at least 1. Level prices are linear from start_price to end_price inclusive (numpy-style linspace of n_levels points). If n_levels == 1, the single level is at (start+end)/2. Each level gets amount quote_per_level, side BUY and take_profit = triple_barrier take_profit 0.001 (coerce_tp_to_step defaults to False, so the TP is not widened to the step). With the defaults this gives 190 levels ~0.00196 apart (0.26% to 0.52% of price). LEVEL STATES: NOT_ACTIVE -> OPEN_ORDER_PLACED -> OPEN_ORDER_FILLED -> CLOSE_ORDER_PLACED -> COMPLETE. A COMPLETE level resets to NOT_ACTIVE, so the grid keeps recycling. A level whose open order is cancelled or rejected also returns to NOT_ACTIVE. Execution is all-limit and post-only (LIMIT_MAKER = maker fee 0.02% on OKX) except the limit_price flatten, which is a market order (taker 0.05%). Bar-level adaptation of the seconds-based throttle: the source lets one open order be placed every order_frequency=3 s, max_orders_per_batch=1, and never more than max_open_orders=2 resting open orders at once. On 1-minute bars (20 throttle periods per bar) this becomes: on each bar, top up resting buy orders until 2 are open, filling the nearest eligible levels. Named substitution.
Analysis
GridStrike
Backtest and paper results are hypothetical. Trading involves risk of loss.