OKX AI Grid Parameters Come from 7-Day Backtest: How to Secondarily Adjust the Oscillation Range?

 / 
OKX
 / 
1

The AI-recommended grid parameters are based on a backtest of the past 7 days' market conditions. Those parameters are "suitable for recent market trends" at that moment, but they won't automatically follow market changes. The oscillation range needs a secondary adjustment because, essentially, the market has moved to a new level from where it was 7 days ago, and the old AI-recommended parameters no longer fit the current oscillation range.

OKX Exchange
A leading global cryptocurrency platform,suitable for both beginners and experienced traders.
New user benefit: 20% off trading fees upon registration!!

Here are the 3 steps to determine whether adjustment is needed and how to do it.

Step 1: Determine if the current price has gone "out of bounds"

The AI-recommended range is based on historical data from 7 days ago. If the current price is already approaching or even exceeding the boundaries of that range, it means the market has moved beyond the "oscillation range" defined at that time.

What to do: Check the relative position of the current price within the AI-recommended range (lowest price ~ highest price).

How to do it:

  • Go to the OKX strategy page, check your running grid bot under [Current Strategies], and find the system-recommended "range lowest price" and "range highest price".

  • Compare with the current market price:

    • Case A (price is in the middle of the range, far from upper and lower boundaries): No adjustment needed for now; continue observing.

    • Case B (price is already close to the range's highest or lowest price, within 5% difference): This is a warning signal. If the price continues moving toward the boundary, the grid will soon stop placing orders beyond the boundary, and the entire strategy will become ineffective.

  • If the price has already broken through the range's highest or lowest price, it means the "recent market" used for the AI backtest is completely outdated, and immediate adjustment is required.

When this step is complete: You have confirmed the relative position of the current market price to the AI-recommended range, and determined whether it has entered the "adjustment needed" warning zone.

Common failure reason: Believing the AI-recommended range is "absolutely safe," while ignoring that the AI recommendation is a static parameter based on a 7-day backtest, not a prediction of future market movements.

Step 2: Decide whether to "modify parameters" or "stop and recreate"

There are two operational paths to adjust the grid's oscillation range. The difference lies in whether you modify the existing bot or stop it and restart.

What to do: Choose the adjustment method based on your situation.

How to do it:

  • Case A (the original grid is running, and you want to fine-tune the range or number of grids): OKX allows directly modifying the price range and grid quantity of a running grid. Find the [Modify Parameters] entry on the strategy management page, and adjust maxPx (highest price), minPx (lowest price), and gridNum (number of grids). This way does not require stopping the strategy, but after the adjustment, the system will recalculate and re-place grid orders; original grid orders will be canceled and rebuilt.

  • Case B (you want to make significant parameter changes or switch to a different parameter combination): First stop the current grid, then recreate a new grid. When stopping, you have two options:

    • stopType = 1 (default): Market-close all positions, and assets return to the trading account.

    • stopType = 2: Keep current positions, only cancel grid orders. Which one to choose depends on your attitude toward the current position.

  • Case C (you want to obtain new AI-recommended parameters): You can call the OKX AI parameter recommendation interface (getGridAIParameter) to get recommended parameters based on the current market again. The duration (backtest period) parameter supports options like 7D, 30D, 180D. It is recommended to choose at least 7 days for reference.

When this step is complete: You have determined which method to use for this adjustment and have executed the corresponding action (modify parameters or stop and recreate).

Risk reminder: Adjusting grid parameters will cancel all currently unfilled grid orders and re-place them. If the market is experiencing rapid fluctuations during the adjustment, some trading opportunities may be missed while orders are being re-placed.

Step 3: Redefine the "effective range" based on market conditions

The core of secondary adjustment is not just arbitrarily changing two numbers; it is about redefining the oscillation boundaries based on the current market state.

What to do: Before adjusting parameters, quickly determine the current market state, and then decide whether to narrow or widen the range.

How to do it:

  • If current market volatility has decreased (oscillation narrows): The old AI range may be too wide, the grid density is diluted over an overly broad range, and each grid's spacing is too large, making it hard to get filled. In this case, you should narrow the range and concentrate around the current price activity. You can refer to the AI's recommended grid density logic: the denser the grid, the more frequent the trades, but the higher the fee ratio.

  • If current market volatility has increased (oscillation expands): The old range may be too narrow, and the price frequently hits the boundaries, causing the strategy to stall. In this case, you should widen the range to allow the grid to cover a larger oscillation scope.

  • If the price has clearly deviated (unilateral trend): At this point, the grid strategy itself may no longer be suitable for the current market. The core of grid trading is "oscillation arbitrage"; it will continuously suffer losses in a unilateral decline. If the price has broken through the upper or lower boundary of the AI range and the trend hasn't stopped, it is recommended to directly stop the grid, wait for the price to enter a new oscillation range, and then recreate it.

When this step is complete: You have set new range parameters based on the current market state and confirmed that the new range can cover the reasonable oscillation scope of the current price.

OKX Exchange
A leading global cryptocurrency platform,suitable for both beginners and experienced traders.
New user benefit: 20% off trading fees upon registration!!

How to confirm the operation is correct?

After completing the adjustment, check the status of the new grid on the [Strategy] page:

  1. Check the new range: Confirm that the modified price range covers the current market price, and that the upper and lower boundaries maintain a safe distance of at least 5%-10% from the market price.

  2. Check the grid order status: Confirm that the new grid orders have been successfully placed, and the status is "Running" rather than "Paused" or "Stopped".

  3. Observe the first few trades: If the adjusted grid has no trades for several consecutive hours or the trading frequency is obviously abnormal (too fast or too slow), it means the range or grid number setting is unreasonable, and further fine-tuning is needed.

If all three items above are normal, the secondary adjustment has taken effect. It is advisable to record the new range parameters and use the logic of this adjustment as a reference for judgment the next time there is a significant market change.