indicator · own pane · open source
Market Sentiment Composite
Running…
Loading chart…
About
Market Sentiment Composite — combines short/long MA spread, a 50-bar trend bias, and volume confirmation into a single sentiment score. >0 = bullish, <0 = bearish; |score| > 25 = high conviction.
- Read as a single-number sentiment gauge that can replace 3 indicators.
Source code
//@version=5
indicator("Market Sentiment Composite", overlay=false)
spread = (ta.rma(close, 10) - ta.rma(close, 50)) / math.max(close, 0.0001) * 100
bias = close > ta.rma(close, 50) ? 1 : -1
volBias = volume > ta.sma(volume, 20) ? 1 : -1
sentiment = spread * 2 + bias * 25 + volBias * 10
hline(25, "Bullish", color=color.gray)
hline(-25, "Bearish", color=color.gray)
p_Sentiment = plot(sentiment, "Sentiment", color=color.blue, linewidth=2)
alertcondition(ta.crossover(sentiment, 25), "Bullish sentiment", "Sentiment crossed above +25")
alertcondition(ta.crossunder(sentiment, -25), "Bearish sentiment", "Sentiment crossed below -25")
No comments yet.
Sign in to comment.