mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-11 02:33:51 +00:00
Fix historic selection bug
This commit is contained in:
parent
2d6dc674a2
commit
caad7e3ae2
|
@ -85,7 +85,7 @@
|
|||
v-if="btFormMode !== 'visualize' && showLeftBar"
|
||||
:backtest-history="botStore.activeBot.backtestHistory"
|
||||
:selected-backtest-result-key="botStore.activeBot.selectedBacktestResultKey"
|
||||
@selectionChange="setBacktestResult"
|
||||
@selectionChange="botStore.activeBot.setBacktestResultKey"
|
||||
/>
|
||||
</transition>
|
||||
</div>
|
||||
|
@ -411,9 +411,7 @@ export default defineComponent({
|
|||
const pollInterval = ref<number | null>(null);
|
||||
const sliderPosition = ref<ChartSliderPosition>();
|
||||
|
||||
const setBacktestResult = (key: string) => {
|
||||
botStore.activeBot.setBacktestResultKey(key);
|
||||
|
||||
const selectBacktestResult = () => {
|
||||
// Set parameters for this result
|
||||
strategy.value = botStore.activeBot.selectedBacktestResult.strategy_name;
|
||||
selectedTimeframe.value = botStore.activeBot.selectedBacktestResult.timeframe;
|
||||
|
@ -422,6 +420,13 @@ export default defineComponent({
|
|||
timerange.value = botStore.activeBot.selectedBacktestResult.timerange;
|
||||
};
|
||||
|
||||
watch(
|
||||
() => botStore.activeBot.selectedBacktestResultKey,
|
||||
() => {
|
||||
selectBacktestResult();
|
||||
},
|
||||
);
|
||||
|
||||
const clickBacktest = () => {
|
||||
const btPayload: BacktestPayload = {
|
||||
strategy: strategy.value,
|
||||
|
@ -487,7 +492,6 @@ export default defineComponent({
|
|||
formatPercent,
|
||||
hasBacktestResult,
|
||||
timeframe,
|
||||
setBacktestResult,
|
||||
strategy,
|
||||
selectedTimeframe,
|
||||
selectedDetailTimeframe,
|
||||
|
|
Loading…
Reference in New Issue
Block a user