Discussion: Multiple entry or exit orders strategy management stategy interface
Describe the enhancement
For the moment, freqtrade give users the possibility to enter or exit a trade at customized price. The framework also provide the possibility to adjust the trade position size during the trade. However it is not yet possible to split entries or exits between multiple orders on exchange.
As freqtrade base code is getting more mature, now allowing management of multiple orders. It could be the moment to discuss about: An interface that will provide more flexibility to users for entry or exit strategy, at an order level, like splitting entries between multiple order prices and quantity or event type.
As orders are already on exchange, this entry and exit method give multiple benefits: The users will benefits of lower trading fees (market maker) The orders have more chances to be filled, even in case of quick market move.
Explain the enhancement you would like
Multiple entry or exit orders strategy management strategy interface
custom_entry_method and custom_exit_method Return an array of dictionaries containing orders with custom type, price and quantity.
Using it potentially disable "custom_entry_price" of "custom_exit_price" and "adjust_trade_position".
! Warning! Make sure that total order quantity is equal or lower than what stake and leverage allow from strategy.
def custom_entry_method(trade, stake, leverage, proposed_price, enter_tag):
[
{"order_type": "limit", "price": 23.45, "quantity": 2},
{"order_type": "limit", "price": 23.40, "quantity": 4},
]
def custom_exit_method(trade, proposed_price, exit_tag):
[
{"order_type": "limit", "price": 26.45, "quantity": 2},
{"order_type": "limit", "price": 30.40, "quantity": 4},
]
Order type will be limited to "limit" first, other types like "conditional" (stop entry) may be available in future updates.
Solve: #7499
Source: freqtrade/freqtrade