feat: Update strategy template

This commit is contained in:
Matthias
2025-02-20 07:25:38 +01:00
parent 3b03fae939
commit 25c0036012
@@ -40,7 +40,7 @@ def custom_entry_price(
""" """
return proposed_rate return proposed_rate
def adjust_entry_price( def adjust_order_price(
self, self,
trade: Trade, trade: Trade,
order: Order | None, order: Order | None,
@@ -50,10 +50,11 @@ def adjust_entry_price(
current_order_rate: float, current_order_rate: float,
entry_tag: str | None, entry_tag: str | None,
side: str, side: str,
is_entry: bool,
**kwargs, **kwargs,
) -> float: ) -> float:
""" """
Entry price re-adjustment logic, returning the user desired limit price. Exit and entry order price re-adjustment logic, returning the user desired limit price.
This only executes when a order was already placed, still open (unfilled fully or partially) This only executes when a order was already placed, still open (unfilled fully or partially)
and not timed out on subsequent candles after entry trigger. and not timed out on subsequent candles after entry trigger.
@@ -71,6 +72,7 @@ def adjust_entry_price(
:param current_order_rate: Rate of the existing order in place. :param current_order_rate: Rate of the existing order in place.
:param entry_tag: Optional entry_tag (buy_tag) if provided with the buy signal. :param entry_tag: Optional entry_tag (buy_tag) if provided with the buy signal.
:param side: 'long' or 'short' - indicating the direction of the proposed trade :param side: 'long' or 'short' - indicating the direction of the proposed trade
:param is_entry: True if the order is an entry order, False if it's an exit order.
:param **kwargs: Ensure to keep this here so updates to this won't break your strategy. :param **kwargs: Ensure to keep this here so updates to this won't break your strategy.
:return float: New entry price value if provided :return float: New entry price value if provided