Update more occurances of ticker_interval
This commit is contained in:
parent
af0f29e6b7
commit
f9bb1a7f22
@ -103,7 +103,7 @@ def load_trades_from_db(db_url: str) -> pd.DataFrame:
|
||||
"open_rate", "close_rate", "amount", "duration", "sell_reason",
|
||||
"fee_open", "fee_close", "open_rate_requested", "close_rate_requested",
|
||||
"stake_amount", "max_rate", "min_rate", "id", "exchange",
|
||||
"stop_loss", "initial_stop_loss", "strategy", "ticker_interval"]
|
||||
"stop_loss", "initial_stop_loss", "strategy", "timeframe"]
|
||||
|
||||
trades = pd.DataFrame([(t.pair,
|
||||
t.open_date.replace(tzinfo=timezone.utc),
|
||||
@ -121,7 +121,7 @@ def load_trades_from_db(db_url: str) -> pd.DataFrame:
|
||||
t.min_rate,
|
||||
t.id, t.exchange,
|
||||
t.stop_loss, t.initial_stop_loss,
|
||||
t.strategy, t.ticker_interval
|
||||
t.strategy, t.timeframe
|
||||
)
|
||||
for t in Trade.get_trades().all()],
|
||||
columns=columns)
|
||||
|
@ -14,7 +14,6 @@ class IHyperOptLoss(ABC):
|
||||
Interface for freqtrade hyperopt Loss functions.
|
||||
Defines the custom loss function (`hyperopt_loss_function()` which is evaluated every epoch.)
|
||||
"""
|
||||
ticker_interval: str
|
||||
timeframe: str
|
||||
|
||||
@staticmethod
|
||||
|
@ -53,7 +53,7 @@ class SampleStrategy(IStrategy):
|
||||
# trailing_stop_positive_offset = 0.0 # Disabled / not configured
|
||||
|
||||
# Optimal ticker interval for the strategy.
|
||||
ticker_interval = '5m'
|
||||
timeframe = '5m'
|
||||
|
||||
# Run "populate_indicators()" only for new candle.
|
||||
process_only_new_candles = False
|
||||
|
@ -286,7 +286,7 @@ def test_backtesting_init(mocker, default_conf, order_types) -> None:
|
||||
assert not backtesting.strategy.order_types["stoploss_on_exchange"]
|
||||
|
||||
|
||||
def test_backtesting_init_no_ticker_interval(mocker, default_conf, caplog) -> None:
|
||||
def test_backtesting_init_no_timeframe(mocker, default_conf, caplog) -> None:
|
||||
patch_exchange(mocker)
|
||||
del default_conf['timeframe']
|
||||
default_conf['strategy_list'] = ['DefaultStrategy',
|
||||
@ -453,7 +453,7 @@ def test_backtest(default_conf, fee, mocker, testdatadir) -> None:
|
||||
t["close_rate"], 6) < round(ln.iloc[0]["high"], 6))
|
||||
|
||||
|
||||
def test_backtest_1min_ticker_interval(default_conf, fee, mocker, testdatadir) -> None:
|
||||
def test_backtest_1min_timeframe(default_conf, fee, mocker, testdatadir) -> None:
|
||||
default_conf['ask_strategy']['use_sell_signal'] = False
|
||||
mocker.patch('freqtrade.exchange.Exchange.get_fee', fee)
|
||||
patch_exchange(mocker)
|
||||
|
@ -197,7 +197,8 @@ def test_hyperoptresolver(mocker, default_conf, caplog) -> None:
|
||||
"Using populate_sell_trend from the strategy.", caplog)
|
||||
assert log_has("Hyperopt class does not provide populate_buy_trend() method. "
|
||||
"Using populate_buy_trend from the strategy.", caplog)
|
||||
assert hasattr(x, "ticker_interval")
|
||||
assert hasattr(x, "ticker_interval") # DEPRECATED
|
||||
assert hasattr(x, "timeframe")
|
||||
|
||||
|
||||
def test_hyperoptresolver_wrongname(mocker, default_conf, caplog) -> None:
|
||||
|
@ -6,7 +6,7 @@ from .strats.default_strategy import DefaultStrategy
|
||||
def test_default_strategy_structure():
|
||||
assert hasattr(DefaultStrategy, 'minimal_roi')
|
||||
assert hasattr(DefaultStrategy, 'stoploss')
|
||||
assert hasattr(DefaultStrategy, 'ticker_interval')
|
||||
assert hasattr(DefaultStrategy, 'timeframe')
|
||||
assert hasattr(DefaultStrategy, 'populate_indicators')
|
||||
assert hasattr(DefaultStrategy, 'populate_buy_trend')
|
||||
assert hasattr(DefaultStrategy, 'populate_sell_trend')
|
||||
|
Loading…
Reference in New Issue
Block a user