Skip to content
Algo Trade Analytics Docs

Quick Start

⏱️ 5 minutes Basic & Pro Plans

This guide walks you through creating your first Pine Script using the AI assistant. By the end, you’ll have a working strategy ready to copy into TradingView.


Before you begin, ensure you have:

  • Basic or Pro plan — Required for editor access
  • AI Credits available — Check your balance in Account Settings
  • A strategy idea — Know what you want to build (e.g., “RSI crossover strategy”)

  1. Navigate to Algo Trade Analytics → Pine Script AI Editor from the main menu.

    The editor loads with:

    • A code editor panel on the left
    • An AI chat panel on the right
  2. Click the + button in the editor tab bar to create a new tab.

    Name your tab something descriptive like “RSI Strategy v1”.

    The editor starts with a blank canvas ready for your code.

  3. In the chat panel on the right, type your request:

    Create an RSI mean-reversion strategy for BTCUSD on the 15-minute chart.
    Entry when RSI crosses below 30, exit when it crosses above 70.
    Include webhook alerts for Algo Trade Analytics.

    Press Enter or click Send.

  4. The AI responds with generated Pine Script code.

    Key things to check:

    • The code appears in a diff viewer showing what will be added
    • Green lines = new code being added
    • The AI explains what each section does
  5. If the code looks good, click Apply to insert it into your script.

    The code moves from the diff viewer into your actual script tab.

  6. Click the Validate button (checkmark icon) in the toolbar.

    Possible outcomes:

    • No errors — Your code is syntactically correct
    • Errors found — Click “Fix with AI” to automatically resolve them
  7. Once validation passes:

    1. Click Copy Code (clipboard icon)
    2. Open TradingView Pine Editor
    3. Paste and save
    4. Add to your chart

Here’s an example conversation flow:

You: Create a simple EMA crossover strategy for stocks

AI: Generates a complete EMA crossover strategy with entry/exit logic

You: Add a stop loss at 2% below entry

AI: Shows a diff adding stop loss logic to your existing code

You: Now add webhook alerts that send orders to Algo Trade Analytics

AI: Adds alertcondition() calls with proper JSON payloads


Speed up your workflow with these shortcuts:

ShortcutAction
Ctrl/Cmd + SSave current tab
Ctrl/Cmd + EnterSend chat message
Ctrl/Cmd + ZUndo last change
Ctrl/Cmd + Shift + ZRedo
EscapeDismiss AI suggestion

❌ “Make a trading strategy”

✅ “Create an RSI strategy for ETHUSD on the 4-hour chart with entries below 25 and exits above 75”

❌ “Fix this error”

✅ “Fix this TradingView error: ‘Undeclared identifier rsi_value’ on line 15”

Instead of asking for everything at once:

  1. Generate the basic strategy
  2. Add entry logic
  3. Add exit logic
  4. Add risk management
  5. Add alerts

Learn the Editor

Explore Editor Workspace for multi-tab editing and advanced features.

Master AI Chat

Read AI Chat Panel to get the most out of your conversations.


The AI needs to return code changes. Try asking more specifically:

  • “Generate the full Pine Script code for…”
  • “Show me the complete updated script"

Click Fix with AI next to any error. The AI will analyze the error and propose a fix.

”The strategy doesn’t work in TradingView”

Section titled “”The strategy doesn’t work in TradingView””

Ensure you:

  1. Selected the correct Pine Script version (v6)
  2. Copied the complete code including the //@version=6 header
  3. Applied to the correct chart timeframe

See Troubleshooting for more solutions.