mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-13 03:33:50 +00:00
Use strategy list
This commit is contained in:
parent
870fd53d7b
commit
963fe902d2
|
@ -59,6 +59,7 @@ export interface StrategyBacktestResult {
|
||||||
stake_amount: number;
|
stake_amount: number;
|
||||||
stake_currency: string;
|
stake_currency: string;
|
||||||
max_open_trades: number;
|
max_open_trades: number;
|
||||||
|
timeframe: string;
|
||||||
total_trades: number;
|
total_trades: number;
|
||||||
trades_per_day: number;
|
trades_per_day: number;
|
||||||
winner_holding_avg: number;
|
winner_holding_avg: number;
|
||||||
|
|
|
@ -2,17 +2,9 @@
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<h2>Backtesting</h2>
|
<h2>Backtesting</h2>
|
||||||
<div class="row ml-1">
|
<div class="row ml-1">
|
||||||
<div class="col-mb-12">
|
<div class="row col-mb-6 mr-2">
|
||||||
<TimeRangeSelect v-model="timerange"></TimeRangeSelect>
|
<TimeRangeSelect v-model="timerange"></TimeRangeSelect>
|
||||||
</div>
|
<StrategyList v-model="strategy" class="col-md-2"></StrategyList>
|
||||||
<div class="col-mb-12">
|
|
||||||
<b-form-group
|
|
||||||
label="Strategy"
|
|
||||||
label-for="strategyName"
|
|
||||||
invalid-feedback="Strategy is required"
|
|
||||||
>
|
|
||||||
<b-form-input id="strategyName" v-model="strategy"></b-form-input>
|
|
||||||
</b-form-group>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@ -55,7 +47,8 @@ import { Component, Vue, Watch } from 'vue-property-decorator';
|
||||||
import { namespace } from 'vuex-class';
|
import { namespace } from 'vuex-class';
|
||||||
import TimeRangeSelect from '@/components/ftbot/TimeRangeSelect.vue';
|
import TimeRangeSelect from '@/components/ftbot/TimeRangeSelect.vue';
|
||||||
import BacktestResultView from '@/components/ftbot/BacktestResultView.vue';
|
import BacktestResultView from '@/components/ftbot/BacktestResultView.vue';
|
||||||
import CandleChart from '@/components/charts/CandleChart.vue';
|
import CandleChart from '@/components/charts/CandleChartContainer.vue';
|
||||||
|
import StrategyList from '@/components/ftbot/StrategyList.vue';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
BacktestPayload,
|
BacktestPayload,
|
||||||
|
@ -69,15 +62,13 @@ import { getCustomPlotConfig, getPlotConfigName } from '@/shared/storage';
|
||||||
|
|
||||||
const ftbot = namespace('ftbot');
|
const ftbot = namespace('ftbot');
|
||||||
@Component({
|
@Component({
|
||||||
components: { BacktestResultView, TimeRangeSelect, CandleChart },
|
components: { BacktestResultView, TimeRangeSelect, CandleChart, StrategyList },
|
||||||
})
|
})
|
||||||
export default class Backtesting extends Vue {
|
export default class Backtesting extends Vue {
|
||||||
pair = 'XRP/USDT';
|
pair = 'XRP/USDT';
|
||||||
|
|
||||||
pollInterval: number | null = null;
|
pollInterval: number | null = null;
|
||||||
|
|
||||||
timeframe = '5m';
|
|
||||||
|
|
||||||
timeframems = 300000;
|
timeframems = 300000;
|
||||||
|
|
||||||
strategy = 'BinHV45';
|
strategy = 'BinHV45';
|
||||||
|
@ -108,6 +99,14 @@ export default class Backtesting extends Vue {
|
||||||
return this.backtestResult.strategy[this.strategy] || {};
|
return this.backtestResult.strategy[this.strategy] || {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get timeframe(): string {
|
||||||
|
try {
|
||||||
|
return this.backtestResult.strategy[this.strategy].timeframe;
|
||||||
|
} catch (err) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
get dataset() {
|
get dataset() {
|
||||||
return this.history[`${this.pair}__${this.timeframe}`];
|
return this.history[`${this.pair}__${this.timeframe}`];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user