diff --git a/src/stores/btStore.ts b/src/stores/btStore.ts
index 47344650..b8df2251 100644
--- a/src/stores/btStore.ts
+++ b/src/stores/btStore.ts
@@ -11,6 +11,8 @@ export const useBtStore = defineStore('btStore', {
stakeAmount: '',
startingCapital: '',
allowCache: true,
+ enableProtections: false,
+ stakeAmountUnlimited: false,
freqAI: {
enabled: false,
model: '',
diff --git a/src/views/BacktestingView.vue b/src/views/BacktestingView.vue
index 67c90a00..fc7f1d9d 100644
--- a/src/views/BacktestingView.vue
+++ b/src/views/BacktestingView.vue
@@ -167,7 +167,7 @@
Unlimited stake
@@ -178,7 +178,7 @@
type="number"
placeholder="Use strategy default"
step="0.01"
- :disabled="stakeAmountUnlimited"
+ :disabled="btStore.stakeAmountUnlimited"
>
@@ -191,7 +191,7 @@
>
{
const showLeftBar = ref(false);
-const enableProtections = ref(false);
-const stakeAmountUnlimited = ref(false);
const btFormMode = ref('run');
const pollInterval = ref(null);
@@ -392,13 +390,13 @@ const clickBacktest = () => {
const btPayload: BacktestPayload = {
strategy: btStore.strategy,
timerange: btStore.timerange,
- enable_protections: enableProtections.value,
+ enable_protections: btStore.enableProtections,
};
const openTradesInt = parseInt(btStore.maxOpenTrades, 10);
if (openTradesInt) {
btPayload.max_open_trades = openTradesInt;
}
- if (stakeAmountUnlimited.value) {
+ if (btStore.stakeAmountUnlimited) {
btPayload.stake_amount = 'unlimited';
} else {
const stakeAmountLoc = Number(btStore.stakeAmount);