-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Open
Labels
enhancementUpgrade or improvement to an existing hummingbot featureUpgrade or improvement to an existing hummingbot feature
Description
Feature Suggestion
Currently, the PositionExecutor class only supports market orders for stop loss execution. This means stop loss orders are always filled as taker orders, which generally incur higher exchange fees and provide less control over execution price.
It would be highly beneficial to add support for limit orders for stop loss, similar to how take profit orders can be configured. This would give users more control over fees and execution.
Impact
The desired behavior allows to:
- Reduce trading fees by utilizing maker (limit) orders for stop loss.
- Gain more control over stop loss execution price, especially on volatile or illiquid markets.
- Use the same flexible order type configuration for both take profit and stop loss, making position management more consistent and customizable.
Additional context
Currently, the following code in PositionExecutor.__init__
enforces only market orders for stop loss:
if config.triple_barrier_config.time_limit_order_type != OrderType.MARKET or \
config.triple_barrier_config.stop_loss_order_type != OrderType.MARKET:
error = "Only market orders are supported for time_limit and stop_loss"
self.logger().error(error)
raise ValueError(error)
emkman
Metadata
Metadata
Assignees
Labels
enhancementUpgrade or improvement to an existing hummingbot featureUpgrade or improvement to an existing hummingbot feature