OPEN-SOURCE SCRIPT
已更新 Short Interest on Most Tickers

From searching on QUANDL I found that FINRA provides some data on Short Interest. From my understanding, it does this through two separate QUANDL codes, one for the NASDAQ Exchange and one for the NYSE Exchange. I decided to just add those 2 values together to arrive at a value for Short Interest.
I haven't tested a TON of stocks, but you should be able to type a symbol and pull SI data if it exists in QUANDL. Some tickers might need some adjustments to how you would type them, for example: in TradingView if you wanted Berkshire Hathaway Class A, you type "BRK.A", but for QUANDL you would need to enter "BRK_A" into the text field.
You can search through QUANDL for these tickers in FINRA here-
https://www.quandl.com/data/FINRA-Financial-Industry-Regulatory-Authority
Once you find the ticker you like, click that link, look near the top-right for where it says "Quandl Code" and look for the text at the end.
NOTE: because this data is refreshed daily, after close, it is NOT REAL-TIME!! It is not an indicator you can track intraday or during the day to try and trade. Because of this I have added the following code-
fix = barstate.isrealtime ? na : out
Without this code you would be seeing yesterday's data show up for today. I left the Moving Average's to continue on, though.
I made a few other outputs available to view the data-- by Percent Rank, Stochastic (3sma smoothed), and Relative Strength Index. These might be useful to some, I think they are a bit difficult to read and make much useful interpretation, but they're there regardless.
Please let me know if there are any errors in the Pine Script, something about the QUANDL data that I have misinterpreted, etc. And feel free to use the source code to how you please (obvious disclaimer is you are not allowed to take it and sell it for profits as your own on TradingView or elsewhere).

Example: Output via Stochastics

Example: Output via % Rank
I haven't tested a TON of stocks, but you should be able to type a symbol and pull SI data if it exists in QUANDL. Some tickers might need some adjustments to how you would type them, for example: in TradingView if you wanted Berkshire Hathaway Class A, you type "BRK.A", but for QUANDL you would need to enter "BRK_A" into the text field.
You can search through QUANDL for these tickers in FINRA here-
https://www.quandl.com/data/FINRA-Financial-Industry-Regulatory-Authority
Once you find the ticker you like, click that link, look near the top-right for where it says "Quandl Code" and look for the text at the end.
NOTE: because this data is refreshed daily, after close, it is NOT REAL-TIME!! It is not an indicator you can track intraday or during the day to try and trade. Because of this I have added the following code-
fix = barstate.isrealtime ? na : out
Without this code you would be seeing yesterday's data show up for today. I left the Moving Average's to continue on, though.
I made a few other outputs available to view the data-- by Percent Rank, Stochastic (3sma smoothed), and Relative Strength Index. These might be useful to some, I think they are a bit difficult to read and make much useful interpretation, but they're there regardless.
Please let me know if there are any errors in the Pine Script, something about the QUANDL data that I have misinterpreted, etc. And feel free to use the source code to how you please (obvious disclaimer is you are not allowed to take it and sell it for profits as your own on TradingView or elsewhere).
Example: Output via Stochastics
Example: Output via % Rank
版本注释
Realized that Pine can just pull the ticker you are viewing, as most people are probably interesting in that as opposed to viewing, say, TSLA with Short Interest set to SPY. Left manual entry available as I mentioned looking at a stock like BRK.B will not pull the ticker from QUANDL correctly.开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。