Master + per-strategy bot toggles
The bot toggle in /app/settings has one aggregate master switch and two per-strategy switches (v6.4 + v7). The master is derived from the children — turning it off turns both children off.
What each toggle controls
The master switch is a convenience shortcut. Toggling it OFF disables both v6.4 and v7 strategies — equivalent to flipping both per-strategy switches OFF. Toggling it ON re-enables both.
The per-strategy switches (v6.4, v7) give granular control. Disable just one if you want the other to keep running.
How the bot reads them
Each switch persists to two places: a User row column in the SaaS DB (audit + non-tenant logic) and a Redis flag the live bot reads on every signal evaluation. Cache TTL is 5 seconds on the bot side.
When a signal fires for v6.4 (or v7), the bot first checks both the master Redis flag and the per-strategy Redis flag. If EITHER is "false", the signal is skipped with a log line like "strategy_disabled". No order is placed.
What happens to open positions
Disabling a strategy stops the bot from opening NEW positions for that strategy. Existing positions are NOT closed automatically — they continue to be managed (TP, SL, max-hold, regime exits) until their natural close.
If you want existing positions closed too, the disable dialog has a "Close all + disable" button. That sends an explicit close command for each currently-open position in the affected scope.
Reading the visible state
If both v6.4 and v7 are ON, the master shows "Bot trading enabled" with green check. If both are OFF, master shows "Bot trading disabled". If one is ON and the other OFF, master shows ON (at least one strategy active) and the OFF strategy shows its own "OFF" badge.
The /api/app/bot-toggle/state endpoint returns the canonical state (DB columns + Redis flags side by side) — useful for verifying that the live bot really sees what the UI says.