-1

I am interested to know if is it possible to read chart data from the TradingView website chart and store it as a CSV file format to do data analysis on it?

Ahmed Nabil
  • 17,392
  • 11
  • 61
  • 88
Hasani
  • 3,543
  • 14
  • 65
  • 125
  • There is no official way to extract chart data from a web-hosted TradingView chart or from a local instance of the TradingView Charting Library. If you are just looking for the candlesticks, you may be able to intercept the charts API calls for the OHLC data. – Nick Friskel May 25 '19 at 13:41
  • @NickFriskel: How? May you explain more? – Hasani May 26 '19 at 07:50

2 Answers2

2

Tradingview price data is sended by websocket,you can try by using some libraries for websocket data scraping. Another way is using selenium to locate the OHCL and Volume element in sourcepage and use key 'left' to go to the previous candlestick and repeat scraping data for every bar,but the problem is you need to login in and use pinescript of tradingview itself to show timestamp and convert it to datetime format. Another way is using the published ideas, you can find codes in Github, good luck!

suncg1985
  • 31
  • 4
  • Can you please explain how to get the OHCL of the candlestick? For instance in chrome. How to find first candlestick? – JavaRunner Jan 24 '20 at 11:25
  • open, high, low, close, volume can be located in page source,you can use chrome F12 to locate them – suncg1985 Apr 17 '20 at 09:10
2

You can now use the Export chart data... selection from the burger menu.

enter image description here

PineCoders-LucF
  • 8,288
  • 2
  • 12
  • 21