Skip to article
XTester Help
XTester Studio

Portfolio

Open strategies, switch between them and manage your portfolio.

Reviewed: Applies to: 1.0.0-preview.1

Create, open and switch projects

Use New Project… (xtester.newProject) to choose a name and parent folder. Studio creates a separate root with xtester.project.json and an empty strategies/ directory. Create independent projects beside each other. New Strategy adds a strategy to the current managed project's strategies/ directory; it does not create another independent workspace.

Application screenshotXTester 1.0.0-preview.1
The Portfolio is on the left and First Check’s main.cs is on the right. A checkmark controls participation in a portfolio run; the open source identifies the strategy you are editing.Interface screenshot · XTester 1.0.0-preview.1
  1. Portfolio and strategy files.
  2. Source of the selected strategy.

Open Project… (xtester.openProject) opens an existing folder. Switch Project… (xtester.switchProject), also available from the project name in the status bar, lists recent roots and offers New Project and Open Project. An idle window switches using the native folder workspace. If there is running, prepared or paused work, an attached agent, an unsaved run result, or work state cannot be verified, Studio opens the target in a new window and preserves the original engine and its work.

Each root keeps its own strategy files, project settings, research and saved results. Returning to the same root restores its workspace tabs and saved chart state. Restored reports show an immutable captured result; restoring a view does not resume a simulation, a live connection or execution.

Managed roots also keep calculation history in .xtester/jobs/lab, Market Research documents, attachments and jobs in .xtester/market-research, and background reports and robustness artifacts in .xtester/background-calculations. Another project's jobs and research do not appear in these stores.

History data, the global cache, shared research knowledge and configured exchange accounts remain shared by Studio. Projects organize work; they are not a security boundary or a separate account store.

Existing strategy and library folders open without being rewritten. Only roots managed by xtester.project.json automatically place newly created strategies in their own strategies/ directory. Existing library files are not migrated automatically. Older XTester desktop formats and windows are not automatically available in Studio; keep a backup before adapting their source.

The strategy manifest

The xtester.strategy.json file describes the strategy project and its defaults. Keep it beside the C# files. The creation wizard writes the manifest from your selected project settings.

Exchange, market, and symbol identify different instruments; changing only a ticker does not change the underlying market. Keep parameter names and API identifiers unchanged when switching the interface language.

Compile before running

Run the Compile Strategy command after editing. Compilation is performed by EngineHost, not by the help extension. Read diagnostics in the editor and the XTester output channel before starting a test.

Application screenshotXTester 1.0.0-preview.1
Select the error in Problems to jump to the affected line.Interface screenshot · XTester 1.0.0-preview.1
  1. Compiler error

Start with a small change and a short, covered date range. A successful compilation validates the source but does not establish that the strategy logic or results are correct.

Managing a strategy portfolio

A portfolio brings the strategies of one project root together. Named portfolio variants inside that root share the same strategy source files; a separate independent project has its own files. On Welcome, choose Strategy portfolio, then Open Portfolio for Portfolio Explorer or Portfolio Settings for the current project composition and settings. Open a strategy or project before configuring its portfolio.

Application screenshotXTester 1.0.0-preview.1
The table shows included strategies and capital shares. The warning identifies that both strategies use BTCUSDT on the same account.Interface screenshot · XTester 1.0.0-preview.1
  1. Choose the active portfolio.
  2. Review included strategies and shares.
  3. Check the shared trading pair.

In Portfolio Explorer, include or exclude strategies with checkboxes, create nested logical folders and drag strategies into them. Double-click activates a strategy; its disclosure arrow expands its contents. xtester.portfolio.json stores organization as folders [{id,name,parentId?}] and strategyFolders [{strategyId,folderId}]. This is presentation metadata: moving a row does not move files on disk, reorder execution or change participation.

Portfolio Settings controls starting balances, capital allocation (shares or pool), the test period and shared simulation settings. Save named variants, switch or rename them, and delete inactive portfolios. A portfolio calculation runs selected strategies on one simulated account; the report includes combined results and each participant result.

Copilot and external MCP agents use get_portfolio, save_portfolio and run_portfolio; list_portfolios, copy_portfolio, rename_portfolio, switch_portfolio and delete_portfolio manage named variants. Copilot prefixes the first three tools with xtester_ and uses xtester_manage_portfolios for named variants. After approved MCP attachment, observers can read; saving and running require writer access and confirm: true.

To edit logical folders, read get_portfolio first, then send the full current strategies [{id,enabled,...}] to save_portfolio without changing its order, shares or overrides, together with the new organization. Preserve existing folder IDs; parentId must name an existing folder without cycles, and each strategy has at most one folder. Omitting organization preserves the tree; null clears it. This uses the existing engine contract.

External agents, MCP sessions and job ownership

An MCP agent such as Codex or Claude can work with a Studio window only after you approve its connection. The External Connections view lists every connection with its access and writer state. Only one agent at a time holds the writer. Your own actions in Studio are never refused because an agent holds it: they wait until the agent's current operation ends. Starting a simulation or a strategy conversion while another one runs still reports that the engine is busy.

A job an agent starts, such as a history download, a backtest, a simulation or a strategy conversion, belongs to that agent. Only that agent, or you in Studio, can cancel it, and other agents do not see it. If the agent disconnects, the job is kept and appears in External Connections as an orphaned job; no other agent can take it over. Stop it with its usual Studio control if you no longer need it. Cancelling a simulation job stops the session and resets it to the start of its period; pausing keeps the position.

While a simulation is prepared, running or paused, or a strategy conversion is running, the current engine remains bound to its project. Opening another independent project uses a new window when work, an attached agent or an unsaved result must be preserved, or when the work state is unknown. This never transfers job ownership or resumes execution in the target window.

Agents receive stable refusal codes: WRITER_BUSY (another agent holds the writer), STALE_CONTEXT (the project changed after the agent read it, so it must read again), JOB_NOT_OWNER (the job belongs to another connection), ACTIVE_JOB_BLOCKS_PROJECT_SWITCH (an active simulation or conversion keeps the project), SHARED_PROJECT_WRITE_BLOCKED (the folder is open in another Studio window), READ_ONLY_SESSION (the connection was approved for reading only) and PROJECT_BINDING_CHANGED (the window switched to another project, so the agent needs a new approval).

When Codex or Claude asks to connect, Studio shows Allow for this dialog, Read only, or Reject. Allow grants writer capability for that connection; Read only never receives a writer lease; Reject closes the request. Closing the dialog or letting it time out is the same as Reject for that request. Starting an MCP host alone does not open Studio and does not focus an existing window.

Autonomous agents mode (setting xtester.mcp.autonomousAgents, off by default; Studio offers it once on first launch) lets agents connect, write to the project and take over the writer without these dialogs.

Access to exchange accounts and API keys, and deletions, still need your explicit permission: the agent asks you in its own chat and passes your answer back with consent_answer, or Studio asks in the window, where you can allow access once or always for this project. Remembered permissions are listed and revoked in Settings → External Agents; deleting exchange keys asks every time.

Turn the mode on or off in Settings by searching for autonomousAgents; an agent cannot change this setting itself.

You can disconnect an agent from External Connections at any time. Disconnect revokes its grant immediately; orphaned jobs stay listed until you stop them in Studio. Secrets, tokens and nonces never appear in tool arguments the model can see.

Read the current full agent catalog from XTester.McpHost --studio through tools/list. For a specific task, use search_tools, then get_tool_schema: the schemas of this build take precedence over an older tool list. list_studio_actions describes shared UI actions and run_studio_action executes them, including market_research_open to open the research chat and market_research_show to show a result. The portfolio section describes composition, capital, logical folders and calculation.

Independent projects use the shared actions list_projects, create_project and open_project (Copilot names have the xtester_ prefix). Discover their schemas with list_studio_actions and invoke them through run_studio_action with read-write approval, writer access and confirm: true, including the read action list_projects.

Its JSON result distinguishes workspaceRoot from activeStrategy and lists projects [{folder,name,id?,current}]. create_project requires name and the exact absolute parentFolder; it creates an empty project without opening it. open_project accepts the exact absolute folder and always requests another window.

It keeps the invoking session and never selects or approves the target: call list_studio_sessions, then select_studio_session for the exact intended window before working there.

Related commands

Command Palette reference
Command nameIdentifier

Find these actions by name in the Command Palette; availability depends on the current project and operation state.

Open Projectxtester.launcherBots.openProject
New Project…xtester.newProject
Open Project…xtester.openProject
Add to Portfolioxtester.portfolioAddStrategy
Portfolio Analysisxtester.portfolioAnalysis
New Portfolio Folder…xtester.portfolioCreateFolder
Remove Folder and Keep Contentsxtester.portfolioDeleteFolder
Exclude All Strategiesxtester.portfolioExcludeAll
Exclude from Portfolioxtester.portfolioExcludeStrategy
Find Strategy in Portfolio…xtester.portfolioFindStrategy
Include All Strategiesxtester.portfolioIncludeAll
Add to Portfolioxtester.portfolioIncludeStrategy
Portfolio: Live Executionxtester.portfolioLive
Move to Folder…xtester.portfolioMoveToFolder
Only the Selected Strategiesxtester.portfolioOnlySelected
Only This Strategyxtester.portfolioOnlyStrategy
Rename Folder…xtester.portfolioRenameFolder
Portfolio Settings…xtester.portfolioSettings
Portfolio Calculationxtester.runPortfolio
Switch Project…xtester.switchProject