Skip to main content

Gridbots Spot Trading Strategy

The Gridbot strategy in Gunbot focuses on automating trading through a grid of limit buy and sell orders. This approach is designed within a defined price range, offering a systematic method for executing trades.

Gridbots in action

Key Configuration Settings​

The Gridbot strategy offers several configuration options to tailor the trading approach:

  1. Invest per Buy Order: This setting controls the investment amount for each buy order within the grid. Users can fine-tune their exposure to market conditions by adjusting this value, making it suitable for both conservative and aggressive trading styles.

  2. Max Orders per Side: It defines the maximum number of orders that can be open on each side of the trade. For instance, a setting of 5 allows for up to 5 buy and 5 sell orders simultaneously. This feature is crucial for managing risk and ensuring that the bot does not overextend its trading operations.

  3. Rebalance: Activating this feature triggers the purchase of assets equal to the value of 'max orders' multiplied by 'invest per order' when the bot lacks sufficient assets to sell. This ensures that the bot has enough inventory to complete sell orders as the market moves, providing liquidity without manual intervention.

  4. Steps % for Gridbots: This option sets the percentage interval for creating the grid. If disabled, the grid size is automatically adjusted based on ATR (Average True Range). By defaulting to ATR, Gridbot adapts to market volatility, ensuring that the grid remains relevant to current price fluctuations.

Gridbots settings

Behavioral Overview of the Gridbot Strategy​

Initialization​

At the start, the Gridbot strategy performs a balance check. If the rebalance option is enabled and the asset balance is low, the bot conducts a market purchase to ensure enough assets for the desired number of sell grids. This automatic balance adjustment helps traders maintain their grid structure without having to monitor their portfolio continuously.

Interval Calculation​

The strategy calculates trading intervals using either a user-specified percentage or based on market volatility indicators like ATR. This flexibility allows users to customize the grid according to their preferences or to allow Gridbot to automatically adjust to market conditions.

Price Range Filtering​

Gridbot identifies the lower and higher price points around the current market bid to establish the grid's boundaries. This dynamic adjustment ensures that the bot covers a relevant range of price action, maximizing the potential for profit during both upward and downward trends.

Interval Adjustment​

In response to significant market price movements, Gridbot recalculates intervals to maintain an effective grid structure. This prevents gaps in the grid and ensures that the bot continues to operate efficiently even as the market trends shift over time.

Chart Target Management​

The strategy provides a visual representation of bid and ask prices within the grid, enabling easy tracking on custom chart targets. This feature is especially useful for traders who want to visualize the gridbot's operations in real-time, helping them make more informed decisions.

Order Execution and Management​

Gridbot systematically places and manages buy and sell orders. It adheres to the set investment limit and adjusts orders as necessary, aligning with the grid's structure. When a buy order is filled, the corresponding sell order is placed automatically, ensuring that the strategy continuously takes advantage of market fluctuations.

Advanced Features for Gridbot Users​

Auto Step Size Adjustment​

Gridbot can automatically adjust the grid step size based on market conditions, ensuring that the grid remains effective during periods of high volatility or low liquidity. This feature reduces the need for manual configuration and allows the bot to maintain optimal performance in different market environments.

Partial Sell and Profit Taking​

The bot supports partial sell orders, enabling users to take profits gradually as the market moves in their favor. This feature allows for a more controlled exit strategy, minimizing the risk of sudden reversals wiping out profits.

Risk Management Tools​

Gridbot includes various risk management options, such as stop-loss orders and trailing stop features. These tools help limit potential losses and lock in profits as the market moves, providing an extra layer of security for automated trading.

Gridbot settings​

LabelConfig ParameterDefault ValueDetailed Description
Invest per buy orderTRADING_LIMIT20The base amount to invest for each individual buy order. For instance, setting this to 10 in a USDT-BTC pair means you will spend 10 USDT on each buy order.

This setting is crucial for managing how much you are willing to allocate to new positions.
Max invested baseMAX_INVESTMENT999999999999999Limits the total investment in the base currency. For example, setting 1000 in a USDT-BTC pair would limit the maximum investment to 1000 USDT.

This helps you cap your exposure to a single trading pair and manage risk effectively.
Funds reserveFUNDS_RESERVE0The amount of base currency that will not be traded. No more buy orders will be allowed once your available funds drop below this value.

This reserve acts as a buffer to ensure liquidity for other activities or to maintain a minimal balance.
Use rebalanceUSE_REBALANCEfalseWhen enabled, this feature triggers the purchase of assets equal to the value of 'max orders' multiplied by 'invest per order' if the bot lacks sufficient assets to sell. If disabled, the bot will only operate with the available balance.

This can be useful for maintaining trading activity and taking advantage of market conditions.
Steps %gbIntervalautoThis setting adjusts the percentage interval for creating the grid. For example, setting it to 1.2% establishes grids every 1.2%. If set to 'auto', the grid size is automatically adjusted based on the Average True Range (ATR) of the market.

This automatic adjustment helps optimize your grid strategy according to market volatility.
Max grid ordersMAX_GRID_ORDERS5Defines the maximum number of orders that can be open on each side of the trade. A setting of 5, for example, allows up to 5 buy and 5 sell orders simultaneously.

This setting helps manage the intensity of your trading activity and control the number of concurrent positions.
Stop lossSTOP_LIMIT99999Defines when to take losses. Setting this to 10 means all assets would be sold if their current value falls to 10% below the break-even price.

This setting is critical for managing risk and preventing significant losses during unfavorable market movements.
PeriodPERIOD15Sets which candles are used to display the chart and calculate ATR. This could be based on a time period like 15 minutes, 1 hour, etc.

Choosing the right period is essential for aligning your strategy with the intended trading frequency and market analysis.