Faithful line-for-line translation of the TradingView Pine v6 script '[3Commas] Static Geometric Grid' by 3Commas (MPL-2.0, https://www.tradingview.com/script/apaoI4Zr-3Commas-Static-Geometric-Grid/). Credit: 3Commas. It is a real tradeable strategy: a long-only static-range spot grid. The source backtested OKX:APEUSDT 15m with a 0.1% commission. Our OKX_SPOT APE history is only days long, so the port runs on APEUSDT.BINANCE_SPOT 15m. That market has continuous 15m history from 2022-03 and the same 0.10% taker fee as the source's commission_value = 0.1. Grid: 64 levels (default Grid Mode = Geometric), level_i = lowPx * (highPx/lowPx)^(i/63) for i = 0..63, with highPx = 0.15466 and lowPx = 0.10591. The rung spacing is (0.15466/0.10591)^(1/63) - 1 = 0.603%. The Arithmetic option (level_i = low + (high-low)*i/63) should be kept as a parameter but is OFF by default. Trailing-up is OFF (trailUp=false). Its inputs (threshold 3.0% above high, shift 50% of range) should be carried as inert parameters. If enabled, the code runs on any bar in the window with close > curHigh*(1+3/100): it shifts curHigh and curLow up by 50% of (curHigh-curLow) and recomputes the levels. Date window (useDates=true by default): trading only when bar time is in [2026-01-12 00:00 UTC, 2026-05-14 00:00 UTC]. Outside the window no grid orders are placed, and lots still open when the window ends are simply held. Sizing: the source uses 24.15 USDT per level on a 2000 USDT account, which is 1.2075% of initial capital. On our $100,000 account that is 1,207.5 USDT per level, qty = amount / level price. With pyramiding = 100 the maximum inventory is 64 lots (about 77% of capital, which fits a CASH account). The 'investment' input (1545.84) is reference only and is not used in the logic. Webhook, alert, stats card, watermark, grid-line drawing and the timeframe warning are display/utility code with no effect on trading, and are not ported. Sanity check on our data: within the window, APE 15m closes ranged 0.0817–0.2527 (11,808 bars) and there are about 1,169 close-based down-crossings of grid levels, which is consistent with the source's 1,026 closed trades. The source's claimed +18.29% / PF 1.95 / DD 26% is unverified; our fee-inclusive backtest decides. Flat state: with no lots filled (price above all filled levels, or outside the window) the strategy is flat. In-window it is expected to hold at least one lot about 85-95% of the time, and outside the window it is idle apart from any stranded lots.