How to Export TradingView Strategy Results to CSV

Exporting your optimization data to CSV lets you analyze results in Excel, Google Sheets, or Python. Here is how the export works and what you can do with it.

What the CSV Includes

Pineify CSV export includes every parameter combination tested along with 16+ performance metrics. Each row is one complete backtest result. The columns cover everything from basic metrics to advanced risk-adjusted measures.

Key columns: net profit, gross profit, gross loss, profit factor, total trades, win rate, max drawdown, max drawdown percentage, Sharpe ratio, Sortino ratio, recovery factor, average trade, average win, average loss, largest win, largest loss, and number of bars.

I use this data to build a parameter sensitivity analysis in Excel. Here is my workflow: load the CSV, create a pivot table with the parameter values as rows and average profit factor as values. This instantly shows me which parameter ranges consistently produce better results.

Analyzing in Excel

Open the CSV in Excel and use pivot tables to find patterns. Place your primary parameter in the rows section, your performance metric in the values section, and use conditional formatting to highlight the best combinations.

I sort by profit factor descending, then apply a filter to exclude combinations with fewer than 30 trades or max drawdown above 10 percent. The remaining rows are your candidate parameter sets.

For deeper analysis, create scatter plots with parameter values on the x-axis and performance metrics on the y-axis. This reveals which parameters have the most impact on results. A flat line means the parameter does not matter much. A steep slope means it is critical to optimize carefully.

Analyzing in Python

Python gives you more analysis flexibility. Use pandas to load and filter the data, matplotlib to visualize parameter interactions, and seaborn to create heatmaps of the parameter space.

I use this snippet as a starting point: pandas.read_csv reads the data, then df.groupby groups by parameter values to find the mean performance for each setting. A heatmap of two parameters against profit factor instantly shows the best parameter zone.

The real power of CSV analysis in Python is running custom metrics. TradingView only calculates built-in metrics. With the raw CSV data, I can calculate custom metrics like Calmar ratio, profit per unit of drawdown, or Monte Carlo confidence intervals.

I exported a grid search with 1,200 combinations and used Python to find that my strategies optimal region was much narrower than the in-app sort suggested. The top 10 rows in the app were clustered around one specific parameter combination, but the Python analysis revealed a different cluster with better consistency.

FAQ

Export Your Optimization Data

Download Pineify Supercharged and export your optimization results to CSV for deep analysis.

Add to Chrome Free