Skip to content

CSV Export & Import Workflow

Complete TradingView to Algo Trade Analytics CSV Workflow

Section titled “Complete TradingView to Algo Trade Analytics CSV Workflow”

Bridge your TradingView strategy signals with Algo Trade Analytics using the CSV workflow. This method is perfect for analyzing historical strategy performance and comparing backtesting results with live execution.

The CSV workflow involves two main steps:

  1. Export strategy alerts from TradingView to CSV format
  2. Import the CSV data into Algo Trade Analytics for signal vs execution analysis

This method is ideal for:

  • Historical strategy analysis
  • Backtesting validation
  • One-time data migration
  • Manual signal review

For real-time automation, consider using Webhook Integration instead.

In your TradingView Pine Script strategy, ensure you have proper alert conditions:

//@version=5
strategy("My Strategy", overlay=true)
// Your strategy logic here
longCondition = ta.crossover(ta.sma(close, 14), ta.sma(close, 28))
shortCondition = ta.crossunder(ta.sma(close, 14), ta.sma(close, 28))
if longCondition
strategy.entry("Long", strategy.long)
// Alert for CSV export
alert("BUY," + str.tostring(close) + "," + str.tostring(time))
if shortCondition
strategy.entry("Short", strategy.short)
// Alert for CSV export
alert("SELL," + str.tostring(close) + "," + str.tostring(time))
  1. Right-click on your chart and select “Add Alert”
  2. Condition: Select your strategy and “alert() function calls”
  3. Options:
    • Frequency: “Once Per Bar Close” (recommended)
    • Enable “Webhook URL” checkbox
  4. Message: Use this format for Algo Trade Analytics compatibility:
    {"action": "{{plot("action")}}", "price": {{close}}, "time": "{{time}}", "symbol": "{{ticker}}"}
  1. Navigate to TradingView Alert Log
  2. Filter alerts by your strategy
  3. Select timeframe for export
  4. Download as CSV file

Your CSV should contain these columns:

ColumnDescriptionExample
actionBUY or SELLBUY
symbolTrading symbolAAPL
priceSignal price150.25
timeUTC timestamp2024-01-15T14:30:00Z
quantityPosition size (optional)100

❌ Problem: Missing timestamps ✅ Solution: Ensure your alert includes {{time}} placeholder

❌ Problem: Incorrect price data
✅ Solution: Use {{close}} for current bar close price

❌ Problem: Mixed signal formats ✅ Solution: Standardize BUY/SELL action naming

  1. Login to Algo Trade Analytics dashboard
  2. Navigate to “Data Import” section
  3. Select “CSV Import” option
  1. Choose your CSV file
  2. Map columns to Algo Trade Analytics fields:
    • Action → Signal Type
    • Price → Signal Price
    • Time → Signal Time
    • Symbol → Trading Symbol
  3. Preview data mapping
  4. Validate format and timestamps

Configure import settings:

  • Time Zone: Match your TradingView timezone
  • Duplicate Handling: Skip or overwrite
  • Signal Processing: Enable/disable signal filtering

After import completion:

  • Verify signal count matches expectations
  • Check for any failed imports
  • Review data in signals dashboard

Algo Trade Analytics automatically checks:

  • ✅ Valid timestamp format
  • ✅ Numeric price values
  • ✅ Recognized symbol format
  • ✅ Valid action types (BUY/SELL)

Before analysis, verify:

  • Signal timing matches your strategy
  • Price levels are reasonable
  • No duplicate signals
  • Complete time coverage

Once imported, you can:

  1. Compare Signals vs Execution in the analytics dashboard
  2. Identify Execution Gaps between signals and actual trades
  3. Export Results back to Pine Script for TradingView visualization
  4. Optimize Strategy based on execution analysis

Error: “Invalid timestamp format” Solution: Ensure timestamps are in ISO 8601 format (YYYY-MM-DDTHH:mm:ssZ)

Error: “Unknown symbol”
Solution: Use standard symbol naming (e.g., “AAPL” not “NASDAQ:AAPL”)

Error: “Duplicate signals detected” Solution: Check for multiple alerts on same bar, clean data before import

Slow Import: Large CSV files (>10MB) may take several minutes Memory Errors: Split large files into smaller chunks (<5MB each)

  • Import multiple strategies separately for comparison
  • Use consistent naming conventions
  • Tag imports with strategy version numbers
  • Add custom fields for strategy parameters
  • Include market condition tags
  • Note any manual intervention signals