Allow setting identifier via UI

This commit is contained in:
Matthias 2022-12-20 19:44:14 +01:00
parent b649adf0cf
commit 4a730bb515
2 changed files with 19 additions and 0 deletions

View File

@ -13,6 +13,9 @@ export interface BacktestPayload {
enable_protections?: boolean;
backtest_cache?: string;
freqaimodel?: string;
freqai?: {
identifier: string;
};
}
export interface PairResult {

View File

@ -220,6 +220,18 @@
</template>
<b-form-checkbox id="enable-freqai" v-model="freqAI.enabled"></b-form-checkbox>
</b-form-group>
<b-form-group
label-cols-sm="5"
label="FreqAI identifier:"
label-align-sm="right"
label-for="freqai-identifier"
>
<b-form-input
id="freqai-identifier"
v-model="freqAI.identifier"
placeholder="Use config default"
></b-form-input>
</b-form-group>
<b-form-group
v-if="freqAI.enabled"
label-cols-sm="5"
@ -349,6 +361,7 @@ const showLeftBar = ref(false);
const freqAI = ref({
enabled: false,
model: '',
identifier: '',
});
const enableProtections = ref(false);
const stakeAmountUnlimited = ref(false);
@ -416,6 +429,9 @@ const clickBacktest = () => {
}
if (freqAI.value.enabled) {
btPayload.freqaimodel = freqAI.value.model;
if (freqAI.value.identifier !== '') {
btPayload.freqai = { identifier: freqAI.value.identifier };
}
}
botStore.activeBot.startBacktest(btPayload);