get rid of TICKER_INTERVAL_MINUTES dict, use ccxt's parse_timeframe() instead
This commit is contained in:
@@ -3,11 +3,11 @@ from typing import NamedTuple, List
|
||||
import arrow
|
||||
from pandas import DataFrame
|
||||
|
||||
from freqtrade.misc import timeframe_to_minutes
|
||||
from freqtrade.strategy.interface import SellType
|
||||
from freqtrade.constants import TICKER_INTERVAL_MINUTES
|
||||
|
||||
ticker_start_time = arrow.get(2018, 10, 3)
|
||||
tests_ticker_interval = "1h"
|
||||
tests_ticker_interval = '1h'
|
||||
|
||||
|
||||
class BTrade(NamedTuple):
|
||||
@@ -32,7 +32,7 @@ class BTContainer(NamedTuple):
|
||||
|
||||
|
||||
def _get_frame_time_from_offset(offset):
|
||||
return ticker_start_time.shift(minutes=(offset * TICKER_INTERVAL_MINUTES[tests_ticker_interval])
|
||||
return ticker_start_time.shift(minutes=(offset * timeframe_to_minutes(tests_ticker_interval))
|
||||
).datetime.replace(tzinfo=None)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user