Fix some types
This commit is contained in:
parent
62110dc2fc
commit
66b77d2f53
@ -711,15 +711,15 @@ class RPC:
|
||||
return self._convert_dataframe_to_dict(self._freqtrade.config['strategy'],
|
||||
pair, timeframe, _data, last_analyzed)
|
||||
|
||||
def _rpc_analysed_history_full(self, config: Dict[str, any], pair: str, timeframe: str,
|
||||
def _rpc_analysed_history_full(self, config, pair: str, timeframe: str,
|
||||
timerange: str) -> Dict[str, Any]:
|
||||
timerange = TimeRange.parse_timerange(timerange)
|
||||
timerange_parsed = TimeRange.parse_timerange(timerange)
|
||||
|
||||
_data = load_data(
|
||||
datadir=config.get("datadir"),
|
||||
pairs=[pair],
|
||||
timeframe=timeframe,
|
||||
timerange=timerange,
|
||||
timerange=timerange_parsed,
|
||||
data_format=config.get('dataformat_ohlcv', 'json'),
|
||||
)
|
||||
from freqtrade.resolvers.strategy_resolver import StrategyResolver
|
||||
|
@ -123,6 +123,8 @@ class IStrategy(ABC):
|
||||
# and wallets - access to the current balance.
|
||||
dp: Optional[DataProvider] = None
|
||||
wallets: Optional[Wallets] = None
|
||||
# container variable for strategy source code
|
||||
__source__: str = ''
|
||||
|
||||
# Definition of plot_config. See plotting documentation for more details.
|
||||
plot_config: Dict = {}
|
||||
|
@ -840,7 +840,7 @@ def test_api_pair_candles(botclient, ohlcv_history):
|
||||
assert len(rc.json['data']) == 0
|
||||
ohlcv_history['sma'] = ohlcv_history['close'].rolling(2).mean()
|
||||
ohlcv_history['buy'] = 0
|
||||
ohlcv_history.iloc[1]['buy'] = 1
|
||||
ohlcv_history.loc[1, 'buy'] = 1
|
||||
ohlcv_history['sell'] = 0
|
||||
|
||||
ftbot.dataprovider._set_cached_df("XRP/BTC", timeframe, ohlcv_history)
|
||||
@ -873,7 +873,7 @@ def test_api_pair_candles(botclient, ohlcv_history):
|
||||
[['2017-11-26 08:50:00', 8.794e-05, 8.948e-05, 8.794e-05, 8.88e-05, 0.0877869,
|
||||
None, 0, 0, 1511686200000, None, None],
|
||||
['2017-11-26 08:55:00', 8.88e-05, 8.942e-05, 8.88e-05,
|
||||
8.893e-05, 0.05874751, 8.886500000000001e-05, 0, 0, 1511686500000, None, None]
|
||||
8.893e-05, 0.05874751, 8.886500000000001e-05, 1, 0, 1511686500000, 8.88e-05, None]
|
||||
])
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user