Exporting Scan Results to a TradingView Watchlist

January 09, 2019

I was asked earlier today about how to export a list of stocks from a SwingTradeBot scan result into a TradingView Watchlist.  That reminded me that I forgot to write about an enhancement that I added last summer.  

In response to another TradingView watchlist request I added another column (called tradingview_symbol) to SwingTradeBot's CSV file exports.  That column contains TradingView's ticker symbol.  TradingView combines the stock symbol with the stock's listing exchange, so AAPL, which is listed on the Nasdaq would be NASDAQ:AAPL.  So that column of data will look something like:

NASDAQ:SRPT
NASDAQ:VGIT
NYSE:AWF
AMEX:BKLN
NYSE:BMY

From what I can tell, TradingView can import a text file of those symbols into a watchlist.  So here's how you can get a list of symbols from SwingTradeBot to TradingView:

  1. Download / export a CSV from SwingTradeBot
  2. Open that file in a spreadsheet program. (Microsoft Excel, Apple Numbers, Google Spreadsheets, LibreOffice Calc, etc.)
  3. Copy all the data from the tradingview_symbol column
  4. Paste that copied text into a new text file (or you could delete all the other columns in the original CSV)
  5. Import that new file, which should only contain the TradingView-formatted symbols into a TradingView watchlist.

Importing into Other Systems

You could do something similar if you have a system that takes a comma-delimited list of symbols.  A simple spreadsheet formula can help you transform the data:

  1. Download / export a CSV from SwingTradeBot
  2. Open that file in a spreadsheet program (Microsoft Excel, Apple Numbers, Google Spreadsheets, LibreOffice Calc, etc.)
  3. Create a formula to transform the column of data you want either symbol or tradingview_symbol
  4. Copy the result of that formula

Here's an example of a Google Spreadsheet with such a formula.  In this case, the symbols are in column A and the formula to use is:

 =JOIN(",", A1:A1000)

Using the same sample data from above would give you: NASDAQ:SRPT,NASDAQ:VGIT,NYSE:AWF,AMEX:BKLN,NYSE:BMY

You could do something similar in Excel with TextJoin and there should be similar functions in other spreadsheets.