Skip to content
Algo Trade Analytics Docs

Work in the Algo Lab editor

Basic or Professional

Open Algo Lab → Editor to edit the active Pine strategy in the same workspace used for configuration, backtests, optimization, results, and Case Studies. The Algo Agent opens in a separate drawer and uses the active Lab context.

  • Select a tab to make it the active strategy.
  • Select + to create a tab named New Strategy. Duplicate names receive a numeric suffix.
  • Double-click a tab name to rename it. With the name focused, Enter or F2 starts renaming; Enter saves and Escape cancels.
  • The dot on a tab means its current code is not saved to the server.
  • Select the close icon to archive a tab. The confirmation includes unsaved code in the archived version.
  • Use Manage Archive to search, restore, or permanently delete archived strategies.
ActionCurrent behavior
SavePersists the active strategy; disabled when there are no unsaved changes.
CopyCopies the complete active strategy to the clipboard.
WebhookStarts a guided change for TradingView webhook output.
Add to Case StudyRecords the current script version as a Case Study variant.
Manage ArchiveOpens archived strategies for restore or permanent deletion.
SettingsOpens the Lab run settings.
Run / Re-runRuns the active strategy with the current Lab scope and settings.

The tab dot and enabled Save button are the visible unsaved-state indicators. If a save does not clear them, keep the page open, use Copy for a backup, and retry before navigating away.

The three-dot Editor options menu contains:

  • Auto Save — saves changed code after edits settle;
  • AI Autocomplete — enables or disables inline AI completions;
  • Validation — enables or pauses automatic validation;
  • Internal engine or TradingView API — chooses the validation provider;
  • rename and archive actions for the current script; and
  • archive management.

The tab toolbar also provides Undo and Redo. Their availability belongs to the active tab’s current editor history; restoring or opening another tab is not an undo operation.

With Validation enabled, the compact panel below the editor checks changed code after a short debounce. Expand reported errors or warnings and read the first causal diagnostic before using Fix with AI.

The default Internal engine validates against Algo Lab’s Pine-compatible runtime. TradingView API sends the source to the external compiler endpoint and requires a configured TradingView username. The two validators can disagree because they are not the same runtime.

See Validate Pine Script.

Agent and candidate-promotion flows can stage a read-only side-by-side diff. The active tab is not replaced until you choose Accept All. Reject All leaves the active source unchanged.

There is no per-hunk accept control. Reject a proposal containing unrelated lines and request a smaller change. After acceptance, validate, save, and rerun the relevant Lab baseline.

  1. Select and save the baseline strategy tab.
  2. Confirm the Lab symbol, timeframe, range, and Settings.
  3. Edit directly or ask Agent mode for one bounded change.
  4. Accept or reject the complete staged diff.
  5. Validate with the intended provider.
  6. Save and run the candidate.
  7. Add the version and evidence to the Case Study when the change belongs to a research decision.
  8. Confirm important behavior in TradingView before external use.