From 225a740cc93f03e0c491f305fe4ef2d74388b130 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 10 Apr 2023 18:20:09 +0200 Subject: [PATCH] Allow requests without timerange --- src/stores/ftbot.ts | 2 +- src/views/Backtesting.vue | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stores/ftbot.ts b/src/stores/ftbot.ts index f0a44ac6..87837b72 100644 --- a/src/stores/ftbot.ts +++ b/src/stores/ftbot.ts @@ -356,7 +356,7 @@ export function createBotSubStore(botId: string, botName: string) { }); }, getPairHistory(payload: PairHistoryPayload) { - if (payload.pair && payload.timeframe && payload.timerange) { + if (payload.pair && payload.timeframe) { this.historyStatus = LoadingStatus.loading; return api .get('/pair_history', { diff --git a/src/views/Backtesting.vue b/src/views/Backtesting.vue index 147c8e24..dcfa162e 100644 --- a/src/views/Backtesting.vue +++ b/src/views/Backtesting.vue @@ -379,6 +379,7 @@ const selectBacktestResult = () => { botStore.activeBot.getStrategy(strategy.value); selectedTimeframe.value = botStore.activeBot.selectedBacktestResult.timeframe; selectedDetailTimeframe.value = botStore.activeBot.selectedBacktestResult.timeframe_detail || ''; + // TODO: maybe this should not use timerange, but the actual backtest start/end results instead? timerange.value = botStore.activeBot.selectedBacktestResult.timerange; };