Added candle_type to a lot of methods, wrote some tests
This commit is contained in:
@@ -160,10 +160,9 @@ class VolumePairList(IPairList):
|
||||
f"{self._lookback_timeframe}, starting from {format_ms_time(since_ms)} "
|
||||
f"till {format_ms_time(to_ms)}", logger.info)
|
||||
needed_pairs = [
|
||||
(p, self._lookback_timeframe) for p in
|
||||
[
|
||||
s['symbol'] for s in filtered_tickers
|
||||
] if p not in self._pair_cache
|
||||
(p, self._lookback_timeframe, '') for p in
|
||||
[s['symbol'] for s in filtered_tickers]
|
||||
if p not in self._pair_cache
|
||||
]
|
||||
|
||||
# Get all candles
|
||||
@@ -174,8 +173,8 @@ class VolumePairList(IPairList):
|
||||
)
|
||||
for i, p in enumerate(filtered_tickers):
|
||||
pair_candles = candles[
|
||||
(p['symbol'], self._lookback_timeframe)
|
||||
] if (p['symbol'], self._lookback_timeframe) in candles else None
|
||||
(p['symbol'], self._lookback_timeframe, '')
|
||||
] if (p['symbol'], self._lookback_timeframe, '') in candles else None
|
||||
# in case of candle data calculate typical price and quoteVolume for candle
|
||||
if pair_candles is not None and not pair_candles.empty:
|
||||
pair_candles['typical_price'] = (pair_candles['high'] + pair_candles['low']
|
||||
|
||||
Reference in New Issue
Block a user