Skip to content
All library documents

Recreating Broker Trades in TradingView’s Strategy Report

Article TradingView scripts

Summary

This script imports transaction rows from a broker or paper-trading CSV and replays them as orders in TradingView’s strategy engine. Users paste the exported history, apply the script to the matching chart symbol, and use the Strategy Tester to view a performance report. It supports two specified column layouts, filters transactions by the chart instrument, and skips cash entries. The author says the approach can also accommodate exports from other brokers when their data matches the expected format.

The script parses execution timestamps and submits limit orders at each recorded fill price when processing the corresponding bar. Its report therefore depends on the chart’s symbol and timeframe, the imported records, and the platform’s order simulation assumptions. The document does not compare the resulting report with broker statements or describe handling for every export variation. It also states that Pine’s string-length limit restricts the amount of trade history that can be pasted, to roughly 60–80 trades at the time of the note.

Key ideas

  • The script converts supported transaction CSV rows into orders for TradingView’s Strategy Tester.
  • The chart symbol selects which instrument’s trades are included in the report.
  • Recorded fill prices become limit prices, with trade timing mapped to chart bars.
  • The resulting report relies on the platform’s simulation and does not establish independent validation against broker records.
  • The document notes a Pine input-length constraint that limits the size of the imported history.

Tags

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