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.
Overview
Section titled “Overview”The CSV workflow involves two main steps:
- Export strategy alerts from TradingView to CSV format
- 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.
Part 1: TradingView CSV Export
Section titled “Part 1: TradingView CSV Export”Step 1: Configure Strategy Alerts
Section titled “Step 1: Configure Strategy Alerts”In your TradingView Pine Script strategy, ensure you have proper alert conditions:
//@version=5strategy("My Strategy", overlay=true)
// Your strategy logic herelongCondition = 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))Step 2: Set Up TradingView Alert
Section titled “Step 2: Set Up TradingView Alert”- Right-click on your chart and select “Add Alert”
- Condition: Select your strategy and “alert() function calls”
- Options:
- Frequency: “Once Per Bar Close” (recommended)
- Enable “Webhook URL” checkbox
- Message: Use this format for Algo Trade Analytics compatibility:
{"action": "{{plot("action")}}", "price": {{close}}, "time": "{{time}}", "symbol": "{{ticker}}"}
Step 3: Export Alert Log to CSV
Section titled “Step 3: Export Alert Log to CSV”- Navigate to TradingView Alert Log
- Filter alerts by your strategy
- Select timeframe for export
- Download as CSV file
Required CSV Format
Section titled “Required CSV Format”Your CSV should contain these columns:
| Column | Description | Example |
|---|---|---|
action | BUY or SELL | BUY |
symbol | Trading symbol | AAPL |
price | Signal price | 150.25 |
time | UTC timestamp | 2024-01-15T14:30:00Z |
quantity | Position size (optional) | 100 |
Common Export Issues
Section titled “Common Export Issues”❌ 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
Part 2: Algo Trade Analytics CSV Import
Section titled “Part 2: Algo Trade Analytics CSV Import”Step 1: Access Import Interface
Section titled “Step 1: Access Import Interface”- Login to Algo Trade Analytics dashboard
- Navigate to “Data Import” section
- Select “CSV Import” option
Step 2: Upload and Validate
Section titled “Step 2: Upload and Validate”- Choose your CSV file
- Map columns to Algo Trade Analytics fields:
- Action → Signal Type
- Price → Signal Price
- Time → Signal Time
- Symbol → Trading Symbol
- Preview data mapping
- Validate format and timestamps
Step 3: Import Configuration
Section titled “Step 3: Import Configuration”Configure import settings:
- Time Zone: Match your TradingView timezone
- Duplicate Handling: Skip or overwrite
- Signal Processing: Enable/disable signal filtering
Step 4: Review Import Results
Section titled “Step 4: Review Import Results”After import completion:
- Verify signal count matches expectations
- Check for any failed imports
- Review data in signals dashboard
Data Validation & Quality Checks
Section titled “Data Validation & Quality Checks”Automatic Validations
Section titled “Automatic Validations”Algo Trade Analytics automatically checks:
- ✅ Valid timestamp format
- ✅ Numeric price values
- ✅ Recognized symbol format
- ✅ Valid action types (BUY/SELL)
Manual Review Checklist
Section titled “Manual Review Checklist”Before analysis, verify:
- Signal timing matches your strategy
- Price levels are reasonable
- No duplicate signals
- Complete time coverage
Next Steps: Analysis
Section titled “Next Steps: Analysis”Once imported, you can:
- Compare Signals vs Execution in the analytics dashboard
- Identify Execution Gaps between signals and actual trades
- Export Results back to Pine Script for TradingView visualization
- Optimize Strategy based on execution analysis
Troubleshooting
Section titled “Troubleshooting”Import Errors
Section titled “Import Errors”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
Performance Issues
Section titled “Performance Issues”Slow Import: Large CSV files (>10MB) may take several minutes Memory Errors: Split large files into smaller chunks (<5MB each)
Advanced Tips
Section titled “Advanced Tips”Batch Processing
Section titled “Batch Processing”- Import multiple strategies separately for comparison
- Use consistent naming conventions
- Tag imports with strategy version numbers
Data Enrichment
Section titled “Data Enrichment”- Add custom fields for strategy parameters
- Include market condition tags
- Note any manual intervention signals
Related Documentation
Section titled “Related Documentation”- Webhook Integration - For real-time automation
- Pine Script Export - Export results back to TradingView
- Strategy Configuration - Optimize your TradingView setup