mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-27 05:25:17 +00:00
Load from strategy should be part of plotconfig
This commit is contained in:
parent
c78dc26aba
commit
3a6786b39d
|
@ -60,6 +60,10 @@
|
|||
Add
|
||||
</b-button>
|
||||
<b-button class="mx-1" variant="primary" @click="loadPlotConfig" size="sm">Load</b-button>
|
||||
<b-button class="mx-1" variant="primary" @click="loadPlotConfigFromStrategy" size="sm">
|
||||
Load from strategy
|
||||
</b-button>
|
||||
|
||||
<b-button
|
||||
class="mx-1"
|
||||
variant="primary"
|
||||
|
@ -121,6 +125,10 @@ export default class PlotConfigurator extends Vue {
|
|||
return this.plotConfig;
|
||||
}
|
||||
|
||||
@ftbot.Action getPlotConfig;
|
||||
|
||||
@ftbot.State strategyPlotConfig;
|
||||
|
||||
plotConfig: PlotConfig = EMPTY_PLOTCONFIG;
|
||||
|
||||
plotOption = 'main_plot';
|
||||
|
@ -231,6 +239,11 @@ export default class PlotConfigurator extends Vue {
|
|||
this.emitPlotConfig();
|
||||
}
|
||||
}
|
||||
|
||||
async loadPlotConfigFromStrategy() {
|
||||
await this.getPlotConfig();
|
||||
this.plotConfig = this.strategyPlotConfig;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ export default {
|
|||
detailTradeId: null,
|
||||
candleData: {},
|
||||
history: {},
|
||||
plotConfig: {},
|
||||
strategyPlotConfig: {},
|
||||
customPlotConfig: { ...EMPTY_PLOTCONFIG },
|
||||
},
|
||||
getters: {
|
||||
|
@ -105,7 +105,7 @@ export default {
|
|||
state.history = { [`${pair}__${timeframe}`]: data };
|
||||
},
|
||||
updatePlotConfig(state, plotConfig: PlotConfig) {
|
||||
state.plotConfig = plotConfig;
|
||||
state.strategyPlotConfig = plotConfig;
|
||||
},
|
||||
saveCustomPlotConfig(state, plotConfig: PlotConfig) {
|
||||
state.customPlotConfig = plotConfig;
|
||||
|
|
Loading…
Reference in New Issue
Block a user