Skip to main content

Workspaces

Workspaces save the layout and state of the HyperionX trading environment.

A workspace should let a user close the platform and later return to the same trading setup: chart windows, instruments, timeframes, indicators, Chart Trader visibility, AI state, tool windows, and supporting panels.

What A Workspace Should Save

Workspace persistence should include:

  • Main window placement and size.
  • Open chart windows.
  • Chart instrument.
  • Chart connection/account context where applicable.
  • Data series type and value.
  • Loaded indicators and their parameters.
  • Indicator panel layout and heights.
  • Drawing objects where supported.
  • Chart Trader visibility and panel width.
  • Multi-chart layout mode and selected chart.
  • AI avatar/chat visibility and placement.
  • DOM/tool windows.
  • Performance, optimizer, strategy, and validator windows where supported.

What A Workspace Should Not Save

Some state should not be persisted directly:

  • API keys and private secrets.
  • Wallet private keys.
  • One-time session tokens.
  • Temporary connection error state.
  • Live order confirmation dialogs.
  • Internal object references that cannot be restored safely.

Saved workspaces should store serializable user intent, not fragile runtime object references.

Restore Flow

A safe restore flow should happen in stages:

  1. Load global settings and theme.
  2. Load connection definitions.
  3. Load custom script metadata.
  4. Restore the main window.
  5. Restore chart windows.
  6. Attach chart data series.
  7. Request historical data.
  8. Apply indicators after chart data/source objects exist.
  9. Restore Chart Trader and AI overlays after layout is valid.
  10. Reconnect live providers if auto-connect is enabled.

This sequencing matters. If overlays or indicators are restored before the chart is ready, the platform can show no data, incorrect panel sizing, or layout exceptions.

Multi-Chart Workspace Behavior

When a workspace contains a multi-chart layout:

  • The layout mode should restore.
  • Each chart pane should restore its own instrument and timeframe.
  • Source chart indicators should remain attached to the intended panes.
  • The selected chart should be restored or default to chart 1.
  • The top toolbar should reflect the selected chart.
  • Chart Trader should not duplicate if it was already visible.
  • AI avatar should remain visible and anchored to the active chart area.

Workspace Bugs To Watch For

Common workspace restore issues include:

  • Chart opens with "No data" before historical loading starts.
  • Indicators are listed but not plotted until removed and re-added.
  • Chart Trader opens twice after toggling in multi-chart mode.
  • AI avatar restores at the wrong size or wrong position.
  • Saved chart layout does not match the restored layout.
  • Tool windows inherit owner/minimize behavior when they should stay independent.
  • Connection name missing from restored chart title.
  • Theme resources load after windows are created, causing light title bars or white buttons.

The production direction should be a modular layout model:

  • Store layout as data.
  • Store each chart pane as a chart model.
  • Store indicators as serializable script descriptors.
  • Store panel heights as ratios, not raw pixels when possible.
  • Store active selected chart separately from chart collection.
  • Restore visual overlays only after chart controls are loaded.
  • Avoid saving UI objects directly.

This makes workspaces more stable across screen sizes, DPI changes, platform updates, and multi-chart layouts.