The Candle Emotion Index (CEI) is a comprehensive sentiment analysis indicator that combines three sub-oscillators—Indecision Oscillator, Fear Oscillator, and Greed Oscillator—to provide a single, unified measure of market sentiment. By analyzing bullish, bearish, and indecisive candlestick patterns, the CEI delivers a holistic view of market emotions and helps traders identify key turning points.
How It Works Indecision Oscillator: Measures market uncertainty using Doji and Spinning Top candlestick patterns. Scores their presence and normalizes the results over a user-defined lookback period. Fear Oscillator: Measures bearish sentiment using Shooting Star, Hanging Man, and Bearish Engulfing candlestick patterns. Scores their presence and normalizes the results over a user-defined lookback period. Greed Oscillator: Measures bullish sentiment using Marubozu, Bullish Engulfing, Hammer, and Three White Soldiers candlestick patterns. Scores their presence and normalizes the results over a user-defined lookback period. Candle Emotion Index Calculation: The CEI is calculated as the average of the Indecision, Fear, and Greed Oscillators: CEI = (Indecision Oscillator + Fear Oscillator + Greed Oscillator) / 3 Plotting: The CEI is plotted as a single line on the chart, representing overall market sentiment. Reference lines are added to indicate Low Emotion, Neutral, and High Emotion levels.
The Candle Emotion Index provides a unified perspective on market sentiment by blending indecision, fear, and greed into one easy-to-interpret metric. It serves as a powerful tool for traders seeking to gauge market psychology and identify high-probability trading opportunities. For best results, use the CEI in conjunction with other technical indicators to confirm signals.
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.