Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web/strategy-switch-console/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1584,13 +1584,13 @@
const cleanProfile = cleanStrategyProfile(profile);
const catalogEntry = strategyCatalogEntry(cleanProfile);
if (!catalogEntry.profile) return false;
if (catalogEntry.runtime_enabled !== true) return false;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Allow paper-only strategy switches

This rejects every non-runtime profile before checking the selected execution mode, but the worker still treats paper-only candidates as valid: assertStrategyAllowedForAccount only requires runtime_enabled for execution_mode === "live", and the validation test explicitly allows us_equity_combo_leveraged in paper mode. For paper accounts, these allowed_execution_modes: ["paper", ...] shadow/candidate strategies disappear from the UI, so users can no longer launch paper experiments that the backend still supports.

Useful? React with 👍 / 👎.

if (dcaConfigForStrategy(cleanProfile) && !platformSupportsDca(platform)) return false;
if (!supportedDomainsForAccount(platform, account).includes(catalogEntry.domain)) return false;
const mode = normalizeExecutionMode(executionMode, false);
if (mode === "live") return strategyCanSwitchLive(catalogEntry);
const allowedModes = normalizeAllowedExecutionModes(catalogEntry.allowed_execution_modes);
if (allowedModes.length && !allowedModes.includes(mode)) return false;
if (catalogEntry.runtime_enabled !== true && !allowedModes.length) return false;
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion web/strategy-switch-console/app_js.js

Large diffs are not rendered by default.

Loading