Skip to content

Commit dae5d30

Browse files
authored
Merge pull request #239 from hummingbot/feat/upgrade_dashbaord
Feat/upgrade dashbaord
2 parents 8847db7 + 3e23595 commit dae5d30

File tree

11 files changed

+350
-291
lines changed

11 files changed

+350
-291
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ run:
2626
streamlit run main.py --server.headless true
2727

2828
uninstall:
29-
conda env remove -n dashboard
29+
conda env remove -n dashboard -y
3030

3131
install:
3232
if conda env list | grep -q '^dashboard '; then \

environment_conda.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ channels:
33
- defaults
44
- conda-forge
55
dependencies:
6-
- python=3.10
7-
- sqlalchemy=1.4
6+
- python=3.12
7+
- sqlalchemy
88
- pip
99
- pip:
1010
- hummingbot
11-
- numpy==1.26.4
11+
- pydantic
1212
- streamlit==1.33.0
1313
- watchdog
1414
- python-dotenv
@@ -23,7 +23,6 @@ dependencies:
2323
- st_pages
2424
- streamlit-elements==0.1.*
2525
- streamlit-authenticator==0.3.2
26-
- pydantic==1.10.4
2726
- flake8
2827
- isort
2928
- pre-commit

frontend/components/deploy_v2_with_controllers.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ def launch_new_bot(self):
4040
"markets": {},
4141
"candles_config": [],
4242
"controllers_config": self._controller_config_selected,
43-
"config_update_interval": 20,
4443
"script_file_name": "v2_with_controllers.py",
45-
"time_to_cash_out": None,
4644
}
4745
}
4846

frontend/components/launch_strategy_v2.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ def launch_new_bot(self):
8383
"markets": {},
8484
"candles_config": [],
8585
"controllers_config": self._controller_config_selected,
86-
"config_update_interval": 10,
8786
"script_file_name": "v2_with_controllers.py",
8887
"time_to_cash_out": None,
8988
}

frontend/pages/config/dman_maker_v2/user_inputs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def user_inputs():
1919
config = {
2020
"controller_name": "dman_maker_v2",
2121
"controller_type": "market_making",
22-
"manual_kill_switch": None,
22+
"manual_kill_switch": False,
2323
"candles_config": [],
2424
"connector_name": connector_name,
2525
"trading_pair": trading_pair,
Lines changed: 98 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
1-
# Grid Strike Configuration Tool
1+
# Grid Strike Grid Component Configuration Tool
22

3-
Welcome to the Grid Strike Configuration Tool! This tool allows you to create, modify, visualize, and save configurations for the Grid Strike trading strategy. Here's how you can make the most out of it.
3+
Welcome to the Grid Strike Grid Component Configuration Tool! This tool allows you to create, modify, visualize, and save configurations for the Grid Strike Grid Component trading strategy, which is a simplified version of the Grid Strike strategy focused on a single grid.
44

55
## Features
66

7-
- **Start from Default Configurations**: Begin with a default configuration or use the values from an existing configuration.
8-
- **Dynamic Price Range Defaults**: Automatically sets grid ranges based on current market conditions.
9-
- **Visual Grid Configuration**: See your grid ranges directly on the price chart.
10-
- **Multiple Grid Ranges**: Configure up to 5 different grid ranges with different sides (BUY/SELL).
7+
- **Simple Grid Configuration**: Configure a single grid with start, end, and limit prices.
8+
- **Dynamic Price Range Defaults**: Automatically sets price ranges based on current market conditions.
9+
- **Visual Grid Configuration**: See your grid settings directly on the price chart.
10+
- **Triple Barrier Risk Management**: Configure take profit, stop loss, and time limit parameters.
1111
- **Save and Deploy**: Once satisfied, save the configuration to deploy it later.
1212

1313
## How to Use
1414

1515
### 1. Basic Configuration
1616

1717
Start by configuring the basic parameters:
18+
- **ID Prefix**: Prefix for the strategy ID (default: "grid_").
19+
- **Trading Pair**: Choose the cryptocurrency trading pair (e.g., "BTC-FDUSD").
1820
- **Connector Name**: Select the trading platform or exchange (e.g., "binance").
19-
- **Trading Pair**: Choose the cryptocurrency trading pair (e.g., "BTC-USDT").
20-
- **Leverage**: Set the leverage ratio (use 1 for spot trading).
21+
- **Leverage**: Set the leverage ratio for margin/futures trading.
2122

2223
### 2. Chart Configuration
2324

@@ -26,69 +27,111 @@ Configure how you want to visualize the market data:
2627
- **Interval**: Choose the timeframe for the candlesticks (1m to 1d).
2728
- **Days to Display**: Select how many days of historical data to show.
2829

29-
### 3. Grid Ranges
30+
### 3. Grid Configuration
3031

31-
Configure up to 5 grid ranges with different parameters:
32-
- **Number of Grid Ranges**: Select how many ranges you want to configure (1-5).
33-
- **Side**: Choose BUY or SELL for each range.
34-
- **Start Price**: The price where the range begins.
35-
- **End Price**: The price where the range ends.
36-
- **Amount %**: Percentage of total amount allocated to this range.
32+
Configure your grid parameters:
33+
- **Side**: Choose BUY or SELL for the grid.
34+
- **Start Price**: The price where the grid begins.
35+
- **End Price**: The price where the grid ends.
36+
- **Limit Price**: A price limit that will stop the strategy.
37+
- **Min Spread Between Orders**: Minimum price difference between orders.
38+
- **Min Order Amount (Quote)**: Minimum size for individual orders.
39+
- **Maximum Open Orders**: Maximum number of active orders in the grid.
3740

38-
### 4. Advanced Configuration
41+
### 4. Order Configuration
3942

40-
Fine-tune your strategy with advanced parameters:
41-
- **Position Mode**: Choose between HEDGE or ONE-WAY.
42-
- **Time Limit**: Maximum duration for orders (in hours).
43+
Fine-tune your order placement:
44+
- **Max Orders Per Batch**: Maximum number of orders to place at once.
45+
- **Order Frequency**: Time between order placements in seconds.
4346
- **Activation Bounds**: Price deviation to trigger updates.
44-
- **Min Spread Between Orders**: Minimum price difference between orders.
45-
- **Min Order Amount**: Minimum size for individual orders.
46-
- **Max Open Orders**: Maximum number of active orders per range.
47-
- **Grid Range Update Interval**: How often to update grid ranges (in seconds).
4847

49-
## Understanding Grid Strike Strategy
48+
### 5. Triple Barrier Configuration
49+
50+
Set up risk management parameters:
51+
- **Open Order Type**: The type of order to open positions (e.g., MARKET, LIMIT).
52+
- **Take Profit**: Price movement percentage for take profit.
53+
- **Stop Loss**: Price movement percentage for stop loss.
54+
- **Time Limit**: Time limit for orders in hours.
55+
- **Order Type Settings**: Configure order types for each barrier.
56+
57+
### 6. Advanced Configuration
58+
59+
Additional settings:
60+
- **Position Mode**: Choose between HEDGE or ONE-WAY.
61+
- **Strategy Time Limit**: Maximum duration for the entire strategy in hours.
62+
- **Manual Kill Switch**: Option to enable manual kill switch.
63+
64+
## Understanding Grid Strike Grid Component
5065

51-
The Grid Strike strategy creates a grid of orders within specified price ranges. Here's how it works:
66+
The Grid Strike Grid Component strategy creates a single grid of orders within a specified price range. Here's how it works:
5267

53-
### Grid Range Mechanics
54-
- Each grid range defines a price zone where the strategy will place orders
55-
- BUY ranges place buy orders from higher to lower prices
56-
- SELL ranges place sell orders from lower to higher prices
57-
- Multiple ranges can work simultaneously with different configurations
68+
### Grid Mechanics
69+
- The strategy places orders uniformly between the start and end prices
70+
- BUY grids place buy orders from start (higher) to end (lower) prices
71+
- SELL grids place sell orders from start (lower) to end (higher) prices
72+
- The limit price serves as an additional safety boundary
5873

5974
### Order Placement
60-
- Orders are placed within each range based on the min spread between orders
61-
- The amount per order is calculated based on the range's allocation percentage
75+
- Orders are placed within the grid based on the min spread between orders
76+
- The amount per order is calculated based on the total amount specified
6277
- Orders are automatically adjusted when price moves beyond activation bounds
6378

6479
### Visual Indicators
65-
- Green lines represent BUY ranges
66-
- Red lines represent SELL ranges
67-
- Different dash patterns distinguish multiple ranges of the same side
68-
- Horizontal lines show the start and end prices of each range
80+
- Green lines represent the start and end prices
81+
- Red line represents the limit price
82+
- Candlestick chart shows the market price action
6983

70-
## Best Practices
84+
## Example Configuration
7185

72-
1. **Range Placement**
73-
- Place BUY ranges below current price
74-
- Place SELL ranges above current price
75-
- Avoid overlapping ranges of the same side
86+
Here's a sample configuration for a BTC-FDUSD grid:
87+
88+
```yaml
89+
id: grid_btcfdusd
90+
controller_name: grid_strike
91+
controller_type: generic
92+
total_amount_quote: 200
93+
manual_kill_switch: null
94+
candles_config: []
95+
leverage: 75
96+
position_mode: HEDGE
97+
connector_name: binance
98+
trading_pair: BTC-FDUSD
99+
side: 1
100+
start_price: 84000
101+
end_price: 84300
102+
limit_price: 83700
103+
min_spread_between_orders: 0.0001
104+
min_order_amount_quote: 5
105+
max_open_orders: 40
106+
max_orders_per_batch: 1
107+
order_frequency: 2
108+
activation_bounds: 0.01
109+
triple_barrier_config:
110+
open_order_type: 3
111+
stop_loss: null
112+
stop_loss_order_type: 1
113+
take_profit: 0.0001
114+
take_profit_order_type: 3
115+
time_limit: 21600
116+
time_limit_order_type: 1
117+
time_limit: 172800
118+
```
76119
77-
2. **Amount Allocation**
78-
- Distribute amounts across ranges based on your risk preference
79-
- Ensure total allocation across all ranges doesn't exceed 100%
80-
- Consider larger allocations for ranges closer to current price
120+
## Best Practices
81121
82-
3. **Spread Configuration**
83-
- Set min spread based on the asset's volatility
84-
- Larger spreads mean fewer, more profitable orders
85-
- Smaller spreads mean more frequent, less profitable orders
122+
1. **Grid Placement**
123+
- For BUY grids, set start price above end price
124+
- For SELL grids, set end price above start price
125+
- Set limit price as a safety boundary where you want to stop the strategy
86126
87-
4. **Risk Management**
88-
- Use appropriate leverage (1 for spot)
89-
- Set reasonable time limits for orders
90-
- Monitor and adjust activation bounds based on market conditions
127+
2. **Amount Management**
128+
- Set total amount based on your risk tolerance
129+
- Configure min order amount to ensure meaningful trade sizes
91130
92-
## Example Configuration
131+
3. **Grid Density**
132+
- Adjust min spread between orders based on the asset's volatility
133+
- Set max open orders to control grid density
93134
94-
Here's a sample configuration for a BTC-USDT grid:
135+
4. **Risk Management**
136+
- Use triple barrier parameters to manage risk for individual positions
137+
- Set appropriate time limits for both positions and the overall strategy

0 commit comments

Comments
 (0)