Skip to content
Algo Trade Analytics Docs

Review Staged Pine Script Changes

Basic or Professional

When Agent mode returns an applicable edit, Algo Lab stages it in a read-only side-by-side Monaco diff. The original script is on the left and the proposed script is on the right. Nothing is merged until you choose Accept All.

  • Removed lines appear on the original side.
  • Added lines appear on the proposed side.
  • Unchanged lines provide location and control-flow context.
  • The editor supports scrolling and split-view resizing for larger changes.

The current editor does not expose a separate inline-diff mode or per-hunk accept buttons. Treat the proposal as one staged change.

  1. Compare the request with the total diff. A one-line repair should not silently replace unrelated strategy logic.

  2. Review declarations, entry conditions, exit conditions, sizing, order behavior, alert payloads, and inputs touched by the proposal.

  3. Choose Reject All if the base script changed, the scope is too large, or any behavior is unexplained. Then send a narrower request from the current script.

  4. Choose Accept All only when every changed line is understood. Accepting replaces the active editor content with the proposed version and clears the staged state.

  5. Validate with the intended provider and rerun the relevant baseline or comparison. A clean diff is not evidence that trading behavior stayed equivalent.

ChangeCheck before accepting
Validation repairThe edit addresses the reported diagnostic and does not suppress another error
Entry or exit logicPosition direction, confirmation timing, pyramiding, and order identifiers remain intentional
Risk or sizingUnits, defaults, and strategy properties match the requested behavior
Webhook payloadRequired authentication, ticker, price, quantity, and position intent remain valid JSON
RefactorBacktest events and alert behavior remain equivalent under the same inputs

For a large replacement, ask for smaller staged steps. Smaller diffs make it easier to attribute a later result change to one decision.

  • Confirm the active tab is the script used to generate the request.
  • Reject stale staged changes and share the current script again.
  • Ask for one minimal unified diff against the exact current content.
  • If the assistant returned explanation without an applicable edit, use that explanation to create a new bounded Agent request.