Merge pull request #6886 from freqtrade/fix/typing

Fix/typing
This commit is contained in:
Matthias
2022-05-24 19:41:59 +02:00
committed by GitHub
17 changed files with 100 additions and 62 deletions

View File

@@ -1,6 +1,7 @@
# pragma pylint: disable=missing-docstring, invalid-name, pointless-string-statement
from datetime import datetime
from typing import Optional
import talib.abstract as ta
from pandas import DataFrame
@@ -151,7 +152,8 @@ class StrategyTestV2(IStrategy):
return dataframe
def adjust_trade_position(self, trade: Trade, current_time: datetime, current_rate: float,
current_profit: float, min_stake: float, max_stake: float, **kwargs):
current_profit: float,
min_stake: Optional[float], max_stake: float, **kwargs):
if current_profit < -0.0075:
orders = trade.select_filled_orders('buy')

View File

@@ -1,6 +1,7 @@
# pragma pylint: disable=missing-docstring, invalid-name, pointless-string-statement
from datetime import datetime
from typing import Optional
import talib.abstract as ta
from pandas import DataFrame
@@ -185,7 +186,8 @@ class StrategyTestV3(IStrategy):
return 3.0
def adjust_trade_position(self, trade: Trade, current_time: datetime, current_rate: float,
current_profit: float, min_stake: float, max_stake: float, **kwargs):
current_profit: float,
min_stake: Optional[float], max_stake: float, **kwargs):
if current_profit < -0.0075:
orders = trade.select_filled_orders(trade.entry_side)