2020-08-17 19:16:27 +00:00
|
|
|
<template>
|
|
|
|
<div>
|
2020-08-31 15:43:44 +00:00
|
|
|
<DailyChart v-if="dailyStats.data" :daily-stats="dailyStats" />
|
2020-08-24 17:28:46 +00:00
|
|
|
<CumProfitChart :trades="closedTrades" />
|
2020-08-17 19:16:27 +00:00
|
|
|
<HourlyChart :trades="closedTrades" />
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { Component, Vue } from 'vue-property-decorator';
|
|
|
|
import { namespace } from 'vuex-class';
|
|
|
|
|
|
|
|
import DailyChart from '@/components/charts/DailyChart.vue';
|
|
|
|
import HourlyChart from '@/components/charts/HourlyChart.vue';
|
2020-08-24 17:28:46 +00:00
|
|
|
import CumProfitChart from '@/components/charts/CumProfitChart.vue';
|
2020-08-17 19:16:27 +00:00
|
|
|
|
2020-08-29 09:23:39 +00:00
|
|
|
import { Trade, DailyReturnValue } from '@/types';
|
2020-08-17 19:16:27 +00:00
|
|
|
|
|
|
|
const ftbot = namespace('ftbot');
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
components: {
|
|
|
|
DailyChart,
|
|
|
|
HourlyChart,
|
2020-08-24 17:28:46 +00:00
|
|
|
CumProfitChart,
|
2020-08-17 19:16:27 +00:00
|
|
|
},
|
|
|
|
})
|
|
|
|
export default class Trading extends Vue {
|
2020-08-29 15:47:05 +00:00
|
|
|
@ftbot.Getter closedTrades!: Trade[];
|
2020-08-17 19:16:27 +00:00
|
|
|
|
|
|
|
@ftbot.State dailyStats!: DailyReturnValue;
|
|
|
|
|
|
|
|
@ftbot.Action getDaily;
|
|
|
|
|
|
|
|
@ftbot.Action getTrades;
|
|
|
|
|
|
|
|
mounted() {
|
|
|
|
this.getDaily();
|
|
|
|
this.getTrades();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped></style>
|