Check if candles exist

This commit is contained in:
Matthias 2020-09-27 09:37:07 +02:00
parent 218212e301
commit 6379aa669a
2 changed files with 6 additions and 2 deletions

View File

@ -90,7 +90,7 @@ export default class CandleChart extends Vue {
return {}; return {};
} }
console.log(`Available Columns: ${this.dataset.columns}`); // console.log(`Available Columns: ${this.dataset.columns}`);
// Find default columns (sequence might be different, depending on the strategy) // Find default columns (sequence might be different, depending on the strategy)
const colDate = this.dataset.columns.findIndex((el) => el === '__date_ts'); const colDate = this.dataset.columns.findIndex((el) => el === '__date_ts');
const colOpen = this.dataset.columns.findIndex((el) => el === 'open'); const colOpen = this.dataset.columns.findIndex((el) => el === 'open');

View File

@ -17,7 +17,7 @@
<div class="col-mb-2 ml-2 mr-2"> <div class="col-mb-2 ml-2 mr-2">
<b-button :disabled="!!!pair" size="sm" @click="refresh">&#x21bb;</b-button> <b-button :disabled="!!!pair" size="sm" @click="refresh">&#x21bb;</b-button>
</div> </div>
<div class="col-mb-2 ml-2 mr-2"> <div v-if="hasDataset" class="col-mb-2 ml-2 mr-2">
<small>Buysignals: {{ dataset.buy_signals }}</small> <small>Buysignals: {{ dataset.buy_signals }}</small>
<small class="ml-2">SellSignals: {{ dataset.sell_signals }}</small> <small class="ml-2">SellSignals: {{ dataset.sell_signals }}</small>
</div> </div>
@ -118,6 +118,10 @@ export default class CandleChartContainer extends Vue {
return this.dataset ? this.dataset.columns : []; return this.dataset ? this.dataset.columns : [];
} }
get hasDataset(): boolean {
return !!this.dataset;
}
mounted() { mounted() {
this.plotConfigName = getPlotConfigName(); this.plotConfigName = getPlotConfigName();
this.plotConfig = getCustomPlotConfig(this.plotConfigName); this.plotConfig = getCustomPlotConfig(this.plotConfigName);