Ensure buy/sell signals are recalculated when timeframe changes

This commit is contained in:
Matthias 2020-06-25 06:55:41 +02:00
parent 812a509472
commit 6cdb3394d7

View File

@ -7,7 +7,7 @@
</template>
<script lang="ts">
import { Component, Vue, Prop } from 'vue-property-decorator';
import { Component, Vue, Prop, Watch } from 'vue-property-decorator';
import ECharts from 'vue-echarts';
// import { EChartOption } from 'echarts';
import * as echarts from 'echarts';
@ -43,6 +43,21 @@ export default class CandleChart extends Vue {
sellData = [] as Array<number>[];
@Watch('pair')
pairChanged() {
this.signalsCalculated = false;
}
@Watch('timeframe')
timeframeChanged() {
this.signalsCalculated = false;
}
@Watch('dataset')
datasetChanged() {
this.signalsCalculated = false;
}
get hasData() {
return this.dataset !== null && typeof this.dataset === 'object';
}