update trade object as optional parameter

This commit is contained in:
Axel-CH
2023-09-17 03:13:40 -04:00
parent d81fdeb3ed
commit 224213840d
3 changed files with 4 additions and 4 deletions

View File

@@ -271,7 +271,7 @@ New string argument `side` - which can be either `"long"` or `"short"`.
``` python hl_lines="3"
class AwesomeStrategy(IStrategy):
def custom_entry_price(self, pair: str, trade: 'Trade', current_time: datetime, proposed_rate: float,
def custom_entry_price(self, pair: str, current_time: datetime, proposed_rate: float,
entry_tag: Optional[str], **kwargs) -> float:
return proposed_rate
```
@@ -280,7 +280,7 @@ After:
``` python hl_lines="3"
class AwesomeStrategy(IStrategy):
def custom_entry_price(self, pair: str, trade: 'Trade', current_time: datetime, proposed_rate: float,
def custom_entry_price(self, pair: str, trade: Optional[Trade], current_time: datetime, proposed_rate: float,
entry_tag: Optional[str], side: str, **kwargs) -> float:
return proposed_rate
```