mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-03 02:23:05 +00:00
docs: update more typing wordings
This commit is contained in:
@@ -226,7 +226,7 @@ In `VolumePairList`, this implements different methods of sorting, does early va
|
||||
##### sample
|
||||
|
||||
``` python
|
||||
def filter_pairlist(self, pairlist: List[str], tickers: Dict) -> List[str]:
|
||||
def filter_pairlist(self, pairlist: list[str], tickers: dict) -> List[str]:
|
||||
# Generate dynamic whitelist
|
||||
pairs = self._calculate_pairlist(pairlist, tickers)
|
||||
return pairs
|
||||
|
||||
@@ -393,7 +393,7 @@ Here we create a `PyTorchMLPRegressor` class that implements the `fit` method. T
|
||||
|
||||
For example, if you are using a binary classifier to predict price movements as up or down, you can set the class names as follows:
|
||||
```python
|
||||
def set_freqai_targets(self, dataframe: DataFrame, metadata: Dict, **kwargs) -> DataFrame:
|
||||
def set_freqai_targets(self, dataframe: DataFrame, metadata: dict, **kwargs) -> DataFrame:
|
||||
self.freqai.class_names = ["down", "up"]
|
||||
dataframe['&s-up_or_down'] = np.where(dataframe["close"].shift(-100) >
|
||||
dataframe["close"], 'up', 'down')
|
||||
|
||||
@@ -835,7 +835,7 @@ class DigDeeperStrategy(IStrategy):
|
||||
current_entry_rate: float, current_exit_rate: float,
|
||||
current_entry_profit: float, current_exit_profit: float,
|
||||
**kwargs
|
||||
) -> Union[float | None, tuple[float | None, str | None]]:
|
||||
) -> float | None | tuple[float | None, str | None]:
|
||||
"""
|
||||
Custom trade adjustment logic, returning the stake amount that a trade should be
|
||||
increased or decreased.
|
||||
|
||||
@@ -329,7 +329,7 @@ After:
|
||||
`order_time_in_force` attributes changed from `"buy"` to `"entry"` and `"sell"` to `"exit"`.
|
||||
|
||||
``` python
|
||||
order_time_in_force: Dict = {
|
||||
order_time_in_force: dict = {
|
||||
"buy": "gtc",
|
||||
"sell": "gtc",
|
||||
}
|
||||
@@ -338,7 +338,7 @@ After:
|
||||
After:
|
||||
|
||||
``` python hl_lines="2 3"
|
||||
order_time_in_force: Dict = {
|
||||
order_time_in_force: dict = {
|
||||
"entry": "GTC",
|
||||
"exit": "GTC",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user