Skip to content
All library documents

Importing CSV Trades into a TradingView Strategy Report

Article Strategy library · Author: adolgov

Summary

This Pine Script utility turns a supported transaction CSV into simulated strategy orders on a TradingView chart, allowing traders to use the platform’s strategy performance report for recorded trades. It accepts two specified header formats, with or without a commission column, parses symbol, side, quantity, fill price, and closing timestamp, and skips cash transactions. It filters imported rows to the chart’s ticker and schedules orders using the recorded price and time against chart bars.

The page explains the motivation: the Trading Panel does not provide a performance report, so imported transactions can be represented as strategy orders. The example CSV contains BTCUSD transactions, but the page gives no comparison against an external report or validation results. The utility depends on the supported column names and timestamp format, chart symbol matching, and bar timing; the shown orders use limit prices, so simulated fills may not reproduce actual execution. It is a reporting aid rather than a trading signal or strategy.

Key ideas

  • The script parses transaction rows from CSV and converts them into chart strategy orders.
  • It supports two CSV header formats, with or without a commission column, and skips cash rows.
  • Imported trades are filtered by ticker and scheduled using their recorded timestamps and fill prices.
  • Its output depends on the expected CSV format and chart timing, and the page reports no validation results.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.