Skip to content

Bug: Chart tab automatically closes when the active Python file does not match the chart's strategy #4

Closed

Description

@tripolskypetr

Describe the bug

PyneIDE appears to automatically synchronize the active chart tab with the currently selected Python strategy file.

However, when the active PytBug: Chart tab automatically closes when the active Python file does not match the chart's strategy

hon file belongs to a different strategy, or when no Python files are open, the existing candlestick chart tab unexpectedly closes instead of remaining open.

This behavior makes it difficult to work with multiple strategies simultaneously, as switching between Python files can cause unrelated chart tabs to disappear.

bug.mp4

To Reproduce

  1. Open two Python strategy files, such as supertrend_ml_pro.py and quantum_momentum_analyzer.py.
  2. Run a strategy to open its corresponding candlestick chart.
  3. Switch to a Python file associated with a different strategy.
  4. Observe that the existing chart tab automatically closes.
  5. Alternatively, close all Python editor tabs while a strategy chart is open.
  6. Observe that the chart does not remain available.

Video timestamps

  • 00:12–00:15 — quantum_momentum_analyzer.py is active, while the supertrend_ml_pro — Chart tab is visible.
  • 00:16 — The chart tab disappears, leaving only the Python editor.
  • 00:20–00:21 — The last Python file is closed, leaving the editor empty. The chart does not reappear.
  • 00:30–00:32 — The issue occurs again: supertrend_ml_pro.py is active while quantum_momentum_analyzer — Chart is displayed. The chart tab subsequently disappears.
  • 00:54–00:55 — Running quantum_momentum_analyzer.py causes its corresponding chart to appear again.

The issue can be reproduced with different strategy files and does not appear to depend on the strategy's implementation.

Expected behavior

Chart tabs should remain open independently of the currently active Python editor.

  • Switching to a Python file associated with another strategy should not close existing charts.
  • Closing all Python editor tabs should not close or remove chart tabs.
  • Automatic synchronization should only change the active chart when a matching chart exists.
  • When no matching chart exists, PyneIDE should preserve the currently open chart tabs and their state.

A change in editor focus should never implicitly close a chart tab.

Screenshots

See the attached bug.mp4 screen recording.

Relevant timestamps: 00:12–00:16, 00:20–00:21, 00:30–00:32, and 00:54–00:55.

Environment

  • PyneIDE version: To be provided
  • Editor and version: To be provided
  • OS: To be provided
  • Python environment: To be provided
  • PyneCore version: To be provided
  • File type: .py (Pyne)

Logs

The issue appears to be related to chart tab lifecycle management and automatic editor synchronization rather than a Python strategy execution error. There are no "securify" errors in the logs; furthermore, if the file itself is opened while working with a chart, the error does not occur and the chart is displayed correctly.

Additional context

The issue appears to involve the automatic synchronization mechanism between strategy files and chart tabs.

The chart lifecycle seems to be incorrectly coupled to the currently active Python editor. When there is no corresponding strategy for the selected file, PyneIDE appears to remove the existing chart instead of leaving it open.

Ideally, chart visibility and lifecycle should be managed independently from Python editor selection.

This is particularly important when comparing multiple trading strategies or inspecting charts while editing unrelated Python files.

Activity

  1. tripolskypetr commented on Nov 7, 2026

    @tripolskypetr
    Author
  2. wallneradam commented on Nov 7, 2026

    @wallneradam
    Contributor

    Thanks for the report and the recording, Peter! This is fixed in PyneIDE 0.13.2 Preview. Charts now stay open when the source tab closes or when a run started from the sidebar finishes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions