How Many Grids to Use:
The Optimal Formula
for Your Bot
The number of grids is the most critical technical decision in your setup. Too many, and fees eat your profits. Too few, and performance drags. This guide gives you the exact formula and calculator to find the perfect number.
What Determines the Number of Grids?
Each grid is a price level within your bot's range where a buy and sell order is placed. If you set 20 grids in a $55,000 to $65,000 range, the bot divides that range into 20 equal intervals and places an order at each one.
The grid count dictates three things simultaneously: your profit per trade, your trading frequency, and the capital required per level. These three factors are in direct tension with each other.
The Formula for the Optimal Grid Count
Base Formula — Number of Grids
The target profit per grid must be at least 3× the exchange fee (0.1% total) → minimum 0.3% per grid
The range amplitude is calculated as: ((max_price - min_price) / min_price) × 100
The minimum viable profit per grid must easily cover your trading fees. With Pionex's ultra-low 0.05% fee per trade (0.1% total for a full buy+sell cycle), your profit per grid should be at least 0.3% to be genuinely profitable after fees.
Optimal Grid Calculator
🧮 Optimal Grid Calculator
What Happens If You Use Too Many or Too Few Grids?
- More daily trades → higher trading fees
- Profit per trade drops below the profitable threshold
- Capital per grid gets too small → minimum order limits fail
- The bot might operate at a net loss despite market swings
- Market spread can consume the entire profit margin
- Very few trades → underutilized capital
- Price oscillates without completing full cycles
- Most of your capital sits idle in unexecuted orders
- It can take weeks to see visible yield
- Each trade is highly profitable, but they rarely trigger
Practical Examples & Configurations
| Scenario | Range | Grids | Capital | Profit/Grid | Capital/Grid | Rating |
|---|---|---|---|---|---|---|
| Conservative BTC | 55K–65K (18%) | 18 | 500 USDT | ~1.0% | ~27 USDT | ✓ Optimal |
| Aggressive BTC | 55K–65K (18%) | 60 | 500 USDT | ~0.3% | ~8 USDT | ✗ Fees > Profit |
| Balanced ETH | 2.800–3.400 (21%) | 25 | 300 USDT | ~0.85% | ~12 USDT | ✓ Optimal |
| Volatile Altcoin | ±30% amplitude | 30 | 200 USDT | ~1.0% | ~6 USDT | ⚠ Min. Capital limit |
| Ultra-tight Range | ±5% amplitude | 20 | 500 USDT | ~0.25% | ~25 USDT | ✗ Insufficient profit |
Always calculate your profit per grid first. If it's below 0.3%, the bot won't be profitable after Pionex fees. If it exceeds 0.3%, the grid count is acceptable. If it exceeds 0.5%, it's good. If it's over 1.0%, your configuration is excellent.
If you prefer not to calculate manually, Pionex's "AI Strategy" mode analyzes the past 7 days of price action and automatically determines the optimal grid count for your selected pair. It's a fantastic starting point for your first bot — you can always tweak it manually later using this formula.
Test the calculator on your next bot
Once you have found your optimal grid number, launch it on Pionex for free.