blackcat1402

[blackcat] L3 Emotion Line

**I. Overview**

The Emotion Line is an innovative technical indicator designed to capture market sentiment by analyzing price dynamics. This indicator calculates the average of opening, high, low, and closing prices over the past three days and combines the concepts of Dynamic Moving Average (DMA) and Exponential Moving Average (EMA) to generate a value reflecting market sentiment. The Emotion Line is implemented in Pine Script on the TradingView platform, providing users with an intuitive tool for market sentiment analysis.

**II. Calculation Method**

1. **Ray**: Calculate the average of the past three days' prices, i.e., (2 * C + H + L) / 4, where C represents the closing price, H the highest price, and L the lowest price. Then, take the Simple Moving Average (SMA) of this average over 3 days with a smoothing factor of 2.

2. **CL (Close Line)**: Assign the value of Ray to CL as the basis for subsequent calculations.

3. **DIR1 (Directional Change)**: Calculate the absolute difference between CL and the CL of the previous two days, indicating the magnitude of price movement.

4. **VIR1 (Volume in Range)**: Calculate the sum of the absolute differences between CL and the previous day's CL over the past two days, measuring the accumulation of price fluctuations.

5. **ER1 (Efficiency Ratio)**: The ratio of DIR1 to VIR1, measuring the efficiency of price movement.

6. **CS1 (Cumulative Strength)**: Apply a weighted process to ER1 to obtain CS1.

7. **CQ1 (Cumulative Quotient)**: The square of CS1, further strengthening the cumulative effect of price movement.

8. **AMA5 (Adjusted Moving Average)**: Calculate the Dynamic Moving Average (DMA) of CL with the dynamic factor CQ1, then apply a 2-day Exponential Moving Average (EMA) to the result.

9. **Cost**: Calculate the 7-day Simple Moving Average (SMA) of AMA5.

10. **CLX (Composite Line)**: Calculate the average of AMA5 and Cost to obtain CLX.

11. **Emotion Line**: Calculate the proportion of CLX increasing continuously for N days, with N defaulting to 7 days. Multiply the result by 100 to get the Emotion Line value.

12. **MA_emotionLine (Moving Average Emotion Line)**: Calculate the M-day moving average of the Emotion Line, with M defaulting to 6 days.

**III. Market Logic**

By analyzing the cumulative effect and efficiency of price movement, the Emotion Line attempts to reveal the strength of market sentiment. When the Emotion Line rises, it indicates a positive market sentiment, and investors may have an optimistic attitude towards the stock; a falling Emotion Line may signal a weakening market sentiment. The absolute value and trend changes of the Emotion Line can provide investors with references for buying, holding, or selling.

**IV. Usage**

1. **Attention Signal**: When the Emotion Line exceeds 20%, the market sentiment may begin to be positive, and investors should pay attention to related stocks.

2. **Entry Signal**: When the Emotion Line exceeds 40%, the market sentiment is relatively strong, and investors may consider entering the market.

3. **Reduce Position Signal**: When the Emotion Line exceeds 80%, the market may be overly optimistic, and investors should consider reducing their positions to avoid risk.

4. **Exit Signal**: When the Emotion Line breaks below its M-day moving average, it may signal a shift in market sentiment, and investors should consider exiting the market.

**V. Notes**

- The Emotion Line is an auxiliary tool, and investors should make comprehensive judgments based on other technical analysis and fundamental analysis.
- Market sentiment is influenced by various factors, and the Emotion Line may have lag, so investors should use it cautiously.
- Investors should adjust the parameters of the Emotion Line according to their risk tolerance and investment strategy.

**VI. Conclusion**

The Emotion Line is an intuitive indicator that reflects market sentiment through quantitative methods, providing a new perspective for investors to observe market dynamics. However, no technical indicator is foolproof, and investors should remain cautious when using it, combining their personal experience and market conditions to make decisions. Through the TradingView platform, investors can easily add the Emotion Line indicator to their charts to assist in their trading decision-making process.

Avoid losing contact!Don't miss out! The first and most important thing to do is to join my Discord chat now! Click here to start your adventure: discord.com/invite/ZTGpQJq 防止失联,请立即行动,加入本猫聊天群: discord.com/invite/ZTGpQJq
Protected script
This script is published closed-source but you may use it freely. You can favorite it to use it on a chart. You cannot view or modify its source code.
Disclaimer

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.

Want to use this script on a chart?

Related Ideas