mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-26 21:15:15 +00:00
Allow setting Protections dynamically
This commit is contained in:
parent
6d99f2ee8a
commit
b8b58b885c
|
@ -8,11 +8,6 @@
|
|||
<b-table class="table-sm" :items="backtestResultStats" :fields="backtestResultFields">
|
||||
</b-table>
|
||||
</b-card>
|
||||
<b-card header="Results per pair" class="mt-2">
|
||||
<b-table class="table-sm" :items="backtestResult.results_per_pair" :fields="perPairFields">
|
||||
</b-table>
|
||||
</b-card>
|
||||
|
||||
<b-card header="Results per Sell-reason" class="mt-2">
|
||||
<b-table
|
||||
class="table-sm"
|
||||
|
@ -21,6 +16,10 @@
|
|||
>
|
||||
</b-table>
|
||||
</b-card>
|
||||
<b-card header="Results per pair" class="mt-2">
|
||||
<b-table class="table-sm" :items="backtestResult.results_per_pair" :fields="perPairFields">
|
||||
</b-table>
|
||||
</b-card>
|
||||
|
||||
<TradeList
|
||||
class="trade-history mt-2"
|
||||
|
|
|
@ -6,6 +6,7 @@ export interface BacktestPayload {
|
|||
timeframe?: string;
|
||||
max_open_trades?: number;
|
||||
stake_amount?: number;
|
||||
enable_protections?: boolean;
|
||||
}
|
||||
|
||||
export interface PairResult {
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
label-cols-sm="5"
|
||||
label="Timeframe:"
|
||||
label-align-sm="right"
|
||||
label-for="timeframeSelect"
|
||||
label-for="timeframe-select"
|
||||
>
|
||||
<b-form-select
|
||||
id="timeframe-select"
|
||||
|
@ -96,6 +96,19 @@
|
|||
></b-form-input>
|
||||
</b-form-group>
|
||||
|
||||
<b-form-group
|
||||
label-cols-sm="5"
|
||||
label="Enable Protections:"
|
||||
label-align-sm="right"
|
||||
label-for="enable-protections"
|
||||
>
|
||||
<b-form-checkbox
|
||||
id="enable-protections"
|
||||
v-model="enableProtections"
|
||||
:options="availableTimeframes"
|
||||
></b-form-checkbox>
|
||||
</b-form-group>
|
||||
|
||||
<!-- <b-form-group label-cols-sm="5" label="Fee:" label-align-sm="right" label-for="fee">
|
||||
<b-form-input
|
||||
id="fee"
|
||||
|
@ -232,6 +245,14 @@ export default class Backtesting extends Vue {
|
|||
|
||||
strategy = '';
|
||||
|
||||
timerange = '';
|
||||
|
||||
enableProtections = false;
|
||||
|
||||
maxOpenTrades = '';
|
||||
|
||||
stakeAmount = '';
|
||||
|
||||
btFormMode = 'run';
|
||||
|
||||
selectedPlotConfig: PlotConfig = getCustomPlotConfig(getPlotConfigName());
|
||||
|
@ -245,12 +266,6 @@ export default class Backtesting extends Vue {
|
|||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
@ftbot.Action public getPairHistory!: (payload: PairHistoryPayload) => void;
|
||||
|
||||
timerange = '';
|
||||
|
||||
maxOpenTrades = '';
|
||||
|
||||
stakeAmount = '';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
@ftbot.Action startBacktest!: (payload: BacktestPayload) => void;
|
||||
|
||||
|
@ -283,6 +298,8 @@ export default class Backtesting extends Vue {
|
|||
const btPayload: BacktestPayload = {
|
||||
strategy: this.strategy,
|
||||
timerange: this.timerange,
|
||||
// eslint-disable-next-line @typescript-eslint/camelcase
|
||||
enable_protections: this.enableProtections,
|
||||
};
|
||||
const openTradesInt = parseInt(this.maxOpenTrades, 10);
|
||||
if (openTradesInt) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user