docs: update more typing wordings

This commit is contained in:
Matthias
2024-11-15 07:18:41 +01:00
parent a6d513a0e6
commit 6d9ab5e9ff
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -226,7 +226,7 @@ In `VolumePairList`, this implements different methods of sorting, does early va
##### sample ##### sample
``` python ``` 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 # Generate dynamic whitelist
pairs = self._calculate_pairlist(pairlist, tickers) pairs = self._calculate_pairlist(pairlist, tickers)
return pairs return pairs
+1 -1
View File
@@ -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: 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 ```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"] self.freqai.class_names = ["down", "up"]
dataframe['&s-up_or_down'] = np.where(dataframe["close"].shift(-100) > dataframe['&s-up_or_down'] = np.where(dataframe["close"].shift(-100) >
dataframe["close"], 'up', 'down') dataframe["close"], 'up', 'down')
+1 -1
View File
@@ -835,7 +835,7 @@ class DigDeeperStrategy(IStrategy):
current_entry_rate: float, current_exit_rate: float, current_entry_rate: float, current_exit_rate: float,
current_entry_profit: float, current_exit_profit: float, current_entry_profit: float, current_exit_profit: float,
**kwargs **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 Custom trade adjustment logic, returning the stake amount that a trade should be
increased or decreased. increased or decreased.
+2 -2
View File
@@ -329,7 +329,7 @@ After:
`order_time_in_force` attributes changed from `"buy"` to `"entry"` and `"sell"` to `"exit"`. `order_time_in_force` attributes changed from `"buy"` to `"entry"` and `"sell"` to `"exit"`.
``` python ``` python
order_time_in_force: Dict = { order_time_in_force: dict = {
"buy": "gtc", "buy": "gtc",
"sell": "gtc", "sell": "gtc",
} }
@@ -338,7 +338,7 @@ After:
After: After:
``` python hl_lines="2 3" ``` python hl_lines="2 3"
order_time_in_force: Dict = { order_time_in_force: dict = {
"entry": "GTC", "entry": "GTC",
"exit": "GTC", "exit": "GTC",
} }