2020-06-17 18:38:25 +00:00
|
|
|
<template>
|
2020-06-20 06:52:43 +00:00
|
|
|
<div class="container-fluid">
|
|
|
|
<div class="row mb-2">
|
2020-07-02 17:58:06 +00:00
|
|
|
<div class="col-mb-2">
|
|
|
|
<b-checkbox v-model="historicView">HistoricData</b-checkbox>
|
2020-07-02 18:05:20 +00:00
|
|
|
</div>
|
2020-06-23 18:37:14 +00:00
|
|
|
</div>
|
2020-08-08 13:57:36 +00:00
|
|
|
<div v-if="historicView" class="mt-2 row">
|
|
|
|
<TimeRangeSelect v-model="timerange" class="col-md-4 mr-2"></TimeRangeSelect>
|
|
|
|
<StrategyList v-model="strategy" class="col-md-2"></StrategyList>
|
2020-07-11 15:25:28 +00:00
|
|
|
</div>
|
2020-07-02 05:01:24 +00:00
|
|
|
|
2020-09-14 18:24:24 +00:00
|
|
|
<div class="row chart-row">
|
2020-09-14 17:56:43 +00:00
|
|
|
<CandleChartContainer
|
|
|
|
:available-pairs="historicView ? pairlist : whitelist"
|
|
|
|
:historic-view="historicView"
|
|
|
|
:timeframe="timeframe"
|
|
|
|
:trades="trades"
|
|
|
|
:timerange="historicView ? timerange : ''"
|
|
|
|
:strategy="historicView ? strategy : ''"
|
|
|
|
>
|
2020-08-08 13:37:18 +00:00
|
|
|
</CandleChartContainer>
|
2020-06-20 06:52:43 +00:00
|
|
|
</div>
|
2020-06-17 18:38:25 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2020-06-22 06:05:03 +00:00
|
|
|
<script lang="ts">
|
|
|
|
import { Component, Vue } from 'vue-property-decorator';
|
|
|
|
import { namespace } from 'vuex-class';
|
2020-08-08 13:38:47 +00:00
|
|
|
import CandleChartContainer from '@/components/charts/CandleChartContainer.vue';
|
2020-07-11 17:55:47 +00:00
|
|
|
import TimeRangeSelect from '@/components/ftbot/TimeRangeSelect.vue';
|
2020-07-31 05:17:50 +00:00
|
|
|
import StrategyList from '@/components/ftbot/StrategyList.vue';
|
2020-09-14 17:56:43 +00:00
|
|
|
import { AvailablePairPayload, AvailablePairResult, WhitelistResponse } from '@/types';
|
2020-06-17 18:38:25 +00:00
|
|
|
|
2020-06-22 06:05:03 +00:00
|
|
|
const ftbot = namespace('ftbot');
|
2020-07-31 05:17:50 +00:00
|
|
|
|
2020-06-22 06:05:03 +00:00
|
|
|
@Component({
|
2020-08-08 13:37:18 +00:00
|
|
|
components: { CandleChartContainer, StrategyList, TimeRangeSelect },
|
2020-06-22 06:05:03 +00:00
|
|
|
})
|
|
|
|
export default class Graphs extends Vue {
|
|
|
|
timeframe = '5m';
|
|
|
|
|
2020-07-02 17:58:06 +00:00
|
|
|
historicView = false;
|
|
|
|
|
2020-07-27 05:20:35 +00:00
|
|
|
strategy = '';
|
|
|
|
|
2020-07-11 17:55:47 +00:00
|
|
|
timerange = '';
|
2020-07-11 15:25:28 +00:00
|
|
|
|
2020-08-01 15:39:47 +00:00
|
|
|
@ftbot.State pairlist;
|
|
|
|
|
2020-06-22 06:05:03 +00:00
|
|
|
@ftbot.State whitelist;
|
|
|
|
|
2020-07-13 18:52:29 +00:00
|
|
|
@ftbot.State trades;
|
|
|
|
|
2020-09-12 07:07:20 +00:00
|
|
|
@ftbot.Action public getWhitelist!: () => Promise<WhitelistResponse>;
|
2020-06-22 06:05:03 +00:00
|
|
|
|
2020-09-12 07:04:55 +00:00
|
|
|
@ftbot.Action public getAvailablePairs!: (
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
|
|
payload: AvailablePairPayload,
|
|
|
|
) => Promise<AvailablePairResult>;
|
2020-08-01 15:39:47 +00:00
|
|
|
|
2020-06-17 18:38:25 +00:00
|
|
|
mounted() {
|
2020-09-14 17:56:43 +00:00
|
|
|
this.getWhitelist();
|
|
|
|
// this.refresh();
|
2020-08-24 18:24:16 +00:00
|
|
|
this.getAvailablePairs({ timeframe: this.timeframe }).then((val) => {
|
|
|
|
console.log(val);
|
|
|
|
});
|
2020-06-23 18:37:14 +00:00
|
|
|
}
|
2020-06-22 06:05:03 +00:00
|
|
|
}
|
2020-06-17 18:38:25 +00:00
|
|
|
</script>
|
|
|
|
|
2020-09-14 18:24:24 +00:00
|
|
|
<style scoped>
|
|
|
|
.chart-row {
|
|
|
|
height: 820px;
|
|
|
|
}
|
|
|
|
</style>
|