Store Heikin Ashi setting

This commit is contained in:
Matthias 2022-07-11 16:33:47 +02:00
parent 5a6a88fc9b
commit 667456b725
3 changed files with 10 additions and 5 deletions

View File

@ -41,7 +41,9 @@
>
</div>
<div class="ml-auto d-flex align-items-center">
<b-form-checkbox v-model="heikinAshi">Heikin Ashi</b-form-checkbox>
<b-form-checkbox v-model="settingsStore.useHeikinAshiCandles"
>Heikin Ashi</b-form-checkbox
>
<div class="ml-2">
<b-select
@ -66,7 +68,7 @@
:dataset="dataset"
:trades="trades"
:plot-config="plotConfig"
:heikin-ashi="heikinAshi"
:heikin-ashi="settingsStore.useHeikinAshiCandles"
:use-u-t-c="settingsStore.timezone === 'UTC'"
:theme="settingsStore.chartTheme"
>
@ -120,7 +122,6 @@ export default defineComponent({
const pair = ref('');
const plotConfig = ref<PlotConfig>({ ...EMPTY_PLOTCONFIG });
const plotConfigName = ref('');
const heikinAshi = ref(false);
const showPlotConfig = ref(props.plotConfigModal);
const dataset = computed((): PairHistory => {
@ -233,7 +234,6 @@ export default defineComponent({
isLoadingDataset,
noDatasetText,
hasDataset,
heikinAshi,
plotConfigChanged,
showPlotConfig,
showConfigurator,

View File

@ -26,9 +26,9 @@ export const useSettingsStore = defineStore('uiSettings', {
openTradesInTitle: OpenTradeVizOptions.showPill as string,
timezone: 'UTC',
backgroundSync: true,
// TODO: needs proper migration ...
currentTheme: getCurrentTheme(),
uiVersion: 'dev',
useHeikinAshiCandles: false,
};
},
getters: {

View File

@ -32,6 +32,11 @@
<b-form-group description="Keep background sync running while other bots are selected.">
<b-checkbox v-model="settingsStore.backgroundSync">Background sync</b-checkbox>
</b-form-group>
<b-form-group description="Use Heikin Ashi candles in your charts">
<b-checkbox v-model="settingsStore.useHeikinAshiCandles"
>Use Heikin Ashi candles.</b-checkbox
>
</b-form-group>
</div>
</b-card>
</div>