diff --git a/src/components/ftbot/BacktestHistoryLoad.vue b/src/components/ftbot/BacktestHistoryLoad.vue index b54d34cb..d88201a5 100644 --- a/src/components/ftbot/BacktestHistoryLoad.vue +++ b/src/components/ftbot/BacktestHistoryLoad.vue @@ -18,7 +18,7 @@ :key="idx" class="d-flex justify-content-between align-items-center py-1 mb-1" button - @click="getBacktestHistoryResult(res.filename)" + @click="getBacktestHistoryResult(res)" > {{ res.strategy }} backtested on: {{ timestampms(res.backtest_start_time * 1000) }} diff --git a/src/store/modules/ftbot/index.ts b/src/store/modules/ftbot/index.ts index 8a333645..e36ebb49 100644 --- a/src/store/modules/ftbot/index.ts +++ b/src/store/modules/ftbot/index.ts @@ -1067,9 +1067,9 @@ export function createBotSubStore(botId: string, botName: string) { const result = await api.get('/backtest/history'); commit('setBacktestHistory', result.data); }, - async [BotStoreActions.getBacktestHistoryResult]({ commit }, filename: string) { + async [BotStoreActions.getBacktestHistoryResult]({ commit }, payload: BacktestHistoryEntry) { const result = await api.get('/backtest/history/result', { - params: { filename: filename }, + params: { filename: payload.filename, strategy: payload.strategy }, }); if (result.data.backtest_result) { commit('updateBacktestResult', result.data.backtest_result);