Skip to content
Algo Trade Analytics Docs

Use AI chat in Algo Lab

Basic or Professional AI credits required

Open Algo Lab → Editor and create or select a chat tab. The assistant is configured for Pine Script v6, but its answers and code changes still require review and validation.

ModeCurrent behaviorUse it for
AskConversational and read-onlyUnderstanding code, an error, or the latest visible result
ResearchCan inspect evidence and use Lab research tools without applying editor editsEvaluating a hypothesis or extending the active Case Study
AgentCan use tools, run an evidence-gated research loop, and stage editor changesA bounded implementation or research mission you intend to supervise

Mode changes the request contract, not the truth of the response. Use Ask for explanation, Research when the research record should advance without changing the script, and Agent only when tool use or a staged code change is intended. Agent availability depends on the account.

Every request includes the active strategy source, the open-tab names and contents, the latest ten messages from the active chat, and the current Lab scope. When available, that scope can include symbol, timeframe, date range, latest backtest result, optimization settings, regime/market context, and the attached Case Study.

The attachment menu can add:

  • another open script tab;
  • the active tab as an explicit code attachment;
  • an image for the next message; or
  • a saved analysis report.

Code attachments are selected within the current model’s context budget. The Case Study selector attaches or detaches research history at the chat-tab level. Remove items that no longer support the task, and verify the chips and Case Study label before sending a request.

  1. Select the script and chat that belong to the task.

  2. Choose Ask for explanation, Research for a read-only research turn, or Agent for supervised tool use and proposed changes.

  3. State the desired outcome, the behavior that must not change, and the evidence the response should use.

  4. Attach only the relevant script tab, report, image, and Case Study.

  5. Send the request and review the response, tool trail, and proposed diff. Stop a running request if it has moved outside the stated task.

  6. In Agent mode, answer any approval or decision prompt and accept or reject a staged change before continuing from that editor state.

Example repair request:

Fix the Pine Script v6 validation error shown on line 23.
Preserve the entry and exit conditions and change only the invalid request.security call.
Return one minimal staged diff and explain why it compiles.

Example evidence request:

Using the attached Backtest vs Alerts report, list the three largest mismatch clusters.
For each cluster, cite the timestamps or counts in the report and give one manual check.
Do not propose code changes yet.
  • Use + to create a separate conversation for a new task.
  • Select a tab to restore its messages and attachments.
  • Double-click a chat-tab name, or focus it and use Enter/F2, to rename it.
  • Start a new chat when old history would bias or crowd the new request.

The model button shows the choices currently available to the account. Model names and defaults can change; use the in-product selector rather than a version copied from documentation. If credits are unavailable, the composer offers the purchase or request action permitted by the account.