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