I need to copy candle data from tradingview to txt, is there a way to do that?
- User
I need to copy candle data from tradingview to txt, is there a way to do that?
- Assistant
Yes, you can copy candle data from TradingView to a text file by following these steps:
- Launch TradingView and open the chart you want to extract data from.
- Click on the up arrow button at the right bottom corner of the chart.
- Click on the "Export chart data" button (it looks like a small cloud with an arrow pointing down).
- A CSV file will be downloaded, which contains all the candle data for the specified time frame and symbol.
- Open the CSV file using any spreadsheet software (e.g., Microsoft Excel, Google Sheets) or a text editor that supports CSV format (e.g., Notepad++).
- If you opened the file in a spreadsheet software, copy the data you need and paste it into a new text file using a plain text editor like Notepad.
- If you opened the file in a text editor that supports CSV format, you can copy the data directly from there and paste it into a new text file or save it as a .txt file.
Now you have the candle data from TradingView saved as a text file.
- User
any way to do it with a trading view script?
- Assistant
Yes, you can use the Pine Script language in TradingView to create a script that exports candle data. However, Pine Script does not natively support writing or exporting data to a file. Nevertheless, you can create a script that displays the data on your chart for you to manually copy to a text file.
Here's a simple Pine Script example to display candle data on your chart's label: