Skip to content
Algo Trade Analytics Docs

Pine Script in Algo Trade Analytics

Algo Trade Analytics uses Pine Script as the strategy language for editing, backtesting, and TradingView alert workflows. This section contains a deliberately small set of reviewed examples and reference pages for the parts of Pine Script most directly connected to those workflows.

Algo Lab validation and backtests, the Algo Agent, and the MCP research tools support Pine Script v6 only. Declare //@version=6 and migrate v5 or older scripts to v6 before you use them there. The alert and fill reviews read TradingView exports and webhook alerts, so they work with whichever version TradingView ran.

AI-assisted editing Basic or Professional

Section titled “AI-assisted editing ”

Use the Editor tab in Algo Lab to work on a strategy, ask the Algo Agent for a bounded change, review the staged diff, run validation, and test the result against the active market-data scope.

Open Algo Lab Editor

Once a strategy produces TradingView alerts, treat each downstream source as new evidence:

  1. Compare historical strategy events with captured alerts in Backtest vs Alerts.
  2. Compare alert intent with broker-reported records in Alerts vs Fills.
  3. Preserve the scope, settings, and findings in the relevant report or Case Study.