PsychSignal sentiments data taken from www.quandl.com/PSYCH/
study("PsychSignal: Sentiment", shorttitle="SIV", precision=0) quandl_ticker = "QUANDL:PSYCH/" + ticker + "_R" bull = security(quandl_ticker+"|0", "D", close) bear = security(quandl_ticker+"|1", "D", close) pl = bull-bear si = abs(pl) < 10 ? 0 : pl color = si<0?red:green plot(si, color=color, style=histogram) plot(si != 0 ? bull/bear : 0, color=color, style=columns) hline(0)