
#idea
A grid bot that is “always on” is essentially: a passive liquidity provider with no macro/micro veto layer.
A grid bot with regime gatekeeping is: a permissioned liquidity provider with stateful circuit breakers, change-point detection, and microstructure toxicity filters.
BASIC DEFINITIONS (GRID GEOMETRY)
Let:
P[i] = price at event i (tick, trade, or price update) L = grid lower bound U = grid upper bound A = grid anchor (center) K = number of grid levels per side DeltaG = grid step size = (U - L) / (2 * K)
FEATURES (PRICE-ONLY)
NRP = (P_current - L) / (U - L)
Range: 0.0 = at lower bound 0.5 = center 1.0 = upper bound
-statistics about what worth Risk/bennefit and Path Efficiency Ratio (PER) [directionality]
PER = abs(P_end - P_start) / sum_over_i( abs(P[i] - P[i-1]) )
Range: ~0.0 = oscillatory / chop ~1.0 = straight-line trend
-statistics and also.. Monotonic Run Length (MRL) [trend ignition]
Define grid_index(i) = floor( (P[i] - L) / DeltaG )
MRL = maximum number of consecutive grid_index moves in the same direction without reversal
Example: +1 +1 +1 +1 => MRL = 4 +1 +1 -1 => MRL = 2
Statistical and. Grid Skip Ratio (GSR) [jump / gap proxy]
GSR = max_over_i( abs(P[i] - P[i-1]) ) / DeltaG
Interpretation: ~1 = orderly move
=3 = jump / cascade / vacuum
Traversal Velocity in Grid Units (TVG)
TVG = sum_over_i( abs(P[i] - P[i-1]) ) / DeltaG
Interpretation: large value = violent traversal of grid levels (no time component)
distance_inside = sum_over_i( abs(P[i] - P[i-1]) where L <= P[i] <= U )
distance_total = sum_over_i( abs(P[i] - P[i-1]) )
RDR = distance_inside / distance_total
Range: ~1.0 = price lives inside grid ~0.0 = price dragged outside
Define failed_excursion if: abs(P[i] - P[i-1]) >= DeltaG AND sign(P[i] - P[i-1]) != sign(P[i+1] - P[i])
WDR = number_of_failed_excursions / number_of_total_excursions
High WDR = thin liquidity, snapbacks
-Range Edge Pressure (REP)
edge_distance = sum_over_i( abs(P[i] - P[i-1]) where P[i] <= L + 2DeltaG or P[i] >= U - 2DeltaG )
REP = edge_distance / distance_total
High REP = grinding edges, breakout risk
And
NORMALIZATION (ROBUST, PRICE-ONLY)
For any feature X:
median_X = rolling median of X mad_X = rolling median( abs(X - median_X) )
Z_X = (X - median_X) / (1.4826 * mad_X + epsilon)
Clamp Z_X to [-6, +6]
And
SIGMOID FUNCTION
sigmoid(x) = 1 / (1 + exp(-x))
And
REGIME SCORES (PRICE-ONLY)
Liquidation Cascade Score (LC_p)
LC_p = sigmoid( 1.4 * Z_GSR
1.2 * Z_TVG
1.0 * Z_PER
0.6 * Z_WDR )
Also
Volatility Vacuum Score (VV_p)
VV_p = sigmoid( 1.3 * Z_GSR
1.0 * Z_WDR
0.8 * Z_REP )
-
Trend Initiation Score (TI_p)
TI_p = sigmoid( 1.4 * Z_PER
1.1 * Z_MRL
0.8 * Z_REP )
Also
Compression / Grid-Safe Score (C_p)
C_p = sigmoid( 1.4 * (-Z_PER)
1.0 * (-Z_MRL)
0.9 * (-Z_GSR)
0.7 * Z_RDR
0.6 * (1 - abs(NRP - 0.5)) )
Statistical and
PERMISSION LOGIC (HARD GATE)
If LC_p > 0.65: STATE = PANIC permit_grid = FALSE
Else if VV_p > 0.65: STATE = OFF permit_grid = FALSE
Else if TI_p > 0.60: STATE = OFF permit_grid = FALSE
Else: If C_p > 0.70: permit_grid = TRUE If C_p < 0.50: permit_grid = FALSE
Statistical and
HYSTERESIS (PRICE-EVENT BASED)
Require condition to hold for N interactions:
ON if C_p > 0.70 for >= N_on grid events OFF if C_p < 0.50 for >= N_off grid events
Typical: N_on = 10 to 20 grid crossings N_off = 5 to 10 grid crossings
Statistical and
EXECUTION RULES (STRICT)
Re-anchor allowed only if: PER < 0.35 GSR < 2 REP < 0.4 permit_grid = TRUE
Re-anchor trigger: abs(P_current - A) > 1.0 to 1.5 * DeltaG
PANIC recovery allowed only if: PER < 0.30 GSR < 1.5 REP < 0.35

Grid works when price oscillates….
Grid dies when price travels…..
Grid kills you when price teleports.
Bitsgap can become the best existing grid bots with real results not bot results
I totally agree, plus as a filter to the ai grid bots so they don’t keep buying junk coins.