The Candle Emotion Index (CEI) Strategy is an innovative sentiment-based trading approach designed to help traders identify and capitalize on market psychology. By analyzing candlestick patterns and combining them into a unified metric, the CEI Strategy provides clear entry and exit signals while dynamically managing risk. This strategy is ideal for traders looking to leverage market sentiment to identify high-probability trading opportunities.
How It Works The CEI Strategy is built around three core oscillators that reflect key emotional states in the market:
Indecision Oscillator. Measures market uncertainty using patterns like Doji and Spinning Tops. High values indicate hesitation, signaling potential turning points.
Fear Oscillator. Tracks bearish sentiment through patterns like Shooting Star, Hanging Man, and Bearish Engulfing. Helps identify moments of intense selling pressure.
Greed Oscillator. Detects bullish sentiment using patterns like Marubozu, Hammer, Bullish Engulfing, and Three White Soldiers. Highlights periods of strong buying interest.
These oscillators are averaged into the Candle Emotion Index (CEI): CEI = (Indecision + Fear + Greed) / 3 This single value quantifies overall market sentiment and drives the strategy’s trading decisions.
Key Features
Sentiment-Based Trading Signals. Long Entry: Triggered when the CEI crosses above a lower threshold (e.g., 0.1), indicating increasing bullish sentiment. Short Entry: Triggered when the CEI crosses above a higher threshold (e.g., 0.2), signaling rising bearish sentiment.
Volume Confirmation. Trades are validated only if volume exceeds a user-defined multiplier of the average volume over the lookback period. This ensures entries are backed by significant market activity.
Break-Even Recovery Mechanism. If a trade moves into a loss, the strategy attempts to recover to break-even instead of immediately exiting at a loss. This feature provides flexibility, allowing the market to recover while maintaining disciplined risk management.
Dynamic Risk Management. Maximum Holding Period: Trades are closed after a user-defined number of candles to avoid overexposure to prolonged uncertainty. Profit-Taking Conditions: Positions are exited when favorable price moves are confirmed by increased volume, locking in gains. Loss Threshold: Trades are exited early if the price moves unfavorably beyond a set percentage of the entry price, limiting potential losses.
Cooldown Period. After a trade is closed, a cooldown period prevents immediate re-entry, reducing overtrading and improving signal quality.
Why Use This Strategy? The CEI Strategy combines advanced sentiment analysis with robust trade management, making it a powerful tool for traders seeking to understand market psychology and identify high-probability setups. Its unique features, such as the break-even recovery mechanism and volume confirmation, add an extra layer of discipline and reliability to trading decisions.
Best Practices
Combine with Other Indicators. Use trend-following tools (e.g., moving averages, ADX) and momentum oscillators (e.g., RSI, MACD) to confirm signals.
Align with Key Levels. Incorporate support and resistance levels for refined entries and exits.
Multi-Market Compatibility. Apply this strategy to forex, crypto, stocks, or any asset class with strong volume and price action.
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.