OPEN-SOURCE SCRIPT
Telah dikemas kini

CCI, RSI, Volume & ATR Buy Signal - Go with the herd!

1โ€ฏ205
๐Ÿ“Œ CCI, RSI, Volume & ATR Buy Signal Indicator
๐Ÿš€ Identify Smart Entry Opportunities with a Multi-Confirmation Approach
This indicator combines CCI (Commodity Channel Index), RSI (Relative Strength Index), Volume, and ATR (Average True Range) to provide a reliable buy signal by ensuring the market conditions are favorable before entering a trade.

๐Ÿ“Š How Does It Work?
This script evaluates market momentum, volatility, and trading volume to generate a clear entry decision:

โœ… (Green Check) โ†’ Favorable entry conditions
โŒ (Red Cross) โ†’ Not an ideal entry point
The indicator displays all the relevant metrics in one compact label, positioned above the most recent candle for quick and easy reference.

๐Ÿ“ˆ Components of the Indicator
Each metric is visually represented using traffic light colors (๐ŸŸข Green, ๐ŸŸก Yellow, ๐Ÿ”ด Red) for intuitive decision-making:

1๏ธโƒฃ CCI (Commodity Channel Index) โ€“ Momentum Strength

๐ŸŸข Strong: Market momentum is high (CCI above the entry threshold).
๐ŸŸก Moderate: Market is showing some movement, but not strong enough.
๐Ÿ”ด Weak: No significant momentum (CCI is low).
2๏ธโƒฃ RSI (Relative Strength Index) โ€“ Trend Confirmation

If RSI is above the user-defined threshold, the momentum is considered positive for entry.
3๏ธโƒฃ Volume โ€“ Market Participation

๐ŸŸข High: Trading volume is above the moving average, confirming strong participation.
๐ŸŸก Moderate: Volume is near its average, signaling indecisiveness.
๐Ÿ”ด Low: Weak participation, indicating potential false signals.
4๏ธโƒฃ ATR (Average True Range) โ€“ Volatility Indicator

๐ŸŸข High: The market is moving with sufficient volatility for a strong trade setup.
๐ŸŸก Moderate: Acceptable volatility but with some caution.
๐Ÿ”ด Low: Market is slow, and price movements may be weak.
๐Ÿ”ง Customizable Settings
You can fine-tune the indicator to match your trading strategy by adjusting:

CCI Threshold for Entry (default: 100)
RSI Threshold for Entry (default: 50)
Volume Multiplier for Confirmation (default: 1.0)
ATR Multiplier for Confirmation (default: 1.0)
๐Ÿ–ฅ๏ธ How to Use
1๏ธโƒฃ Add the indicator to your TradingView chart.
2๏ธโƒฃ Look for the label above the most recent candle.

Example output:
โœ… Vola: ๐ŸŸข Mom: ๐ŸŸข Volu: ๐ŸŸข โ†’ Strong confirmation for entry.
โŒ Vola: ๐ŸŸก Mom: ๐Ÿ”ด Volu: ๐ŸŸก โ†’ Entry conditions are not favorable.
3๏ธโƒฃ Only enter trades when โœ… appears and all or most indicators are green.
4๏ธโƒฃ Avoid trading when โŒ is displayed or when multiple indicators are yellow/red.
โšก Why Use This Indicator?
โœ… Multi-Factor Confirmation โ€“ Ensures you enter only high-probability setups.
โœ… Customizable for Any Strategy โ€“ Adjust thresholds based on your risk tolerance.
โœ… Traffic Light System โ€“ Easily interpret trade conditions at a glance.
โœ… Real-Time Updates โ€“ The label dynamically updates based on the latest price action.

๐Ÿ“Œ Final Notes
This indicator is not a standalone trading system but a powerful confirmation tool. Always use proper risk management and combine it with price action analysis for best results. ๐Ÿ“Š๐Ÿ“ˆ
Nota Keluaran
This multi-indicator trading tool is designed to help traders identify strong buy signals using a combination of key technical indicators.
The indicator provides:

โœ”๏ธ Clear Buy/No-Entry Signals (โœ… / โŒ)
โœ”๏ธ Traffic Light Color Coding (๐Ÿ”ด๐ŸŸข) for Quick Analysis
โœ”๏ธ Live Tooltip Insights Explaining the Market Conditions
โœ”๏ธ Customizable Indicator Settings & Thresholds
โœ”๏ธ Adjustable Label Positioning for Better Visibility

๐Ÿš€ Perfect for traders looking for high-probability entry signals across multiple asset classes!

๐Ÿ”ข How the Indicator Works

The indicator calculates and analyzes five key technical indicators:

โœ… Commodity Channel Index (CCI): Measures trend momentum.
โœ… Relative Strength Index (RSI): Identifies overbought/oversold conditions.
โœ… Volume Moving Average (Volume MA): Confirms strength in price movement.
โœ… Average True Range (ATR): Evaluates market volatility and trend consistency.
โœ… Moving Average Convergence Divergence (MACD): Confirms trend direction and strength.

๐Ÿ”น A Buy Signal (โœ…) appears only when all conditions confirm a strong setup.
๐Ÿ”น A No-Entry Signal (โŒ) appears if the setup lacks confirmation.

๐Ÿ“Š Signal Interpretation (Traffic Light Colors)

The indicator provides a quick color-based summary of the current trend:

๐ŸŸข Green = Strong confirmation โœ…
๐Ÿ”ด Red = Weak signal, avoid โŒ
๐ŸŸก Yellow = Sideways movement (ATR Only)

Example 1: Strong Buy Signal (All Green)

โœ… | Volatility: ๐ŸŸข | Momentum: ๐ŸŸข | Volume: ๐ŸŸข | MACD: ๐ŸŸข

๐Ÿ“Œ Interpretation:

ATR confirms strong volatility.

CCI indicates strong momentum.

Volume is high, confirming price action.

MACD is bullish.

Example 2: No Entry (Weak Trend)

โŒ | Volatility: ๐Ÿ”ด | Momentum: ๐Ÿ”ด | Volume: ๐ŸŸข | MACD: ๐Ÿ”ด

๐Ÿ“Œ Interpretation:

ATR indicates weak volatility.

CCI momentum is weak.

Volume is strong, but MACD confirms a bearish trend.

๐Ÿ›  Customization Options

You can fine-tune the indicator settings based on your trading strategy. The following settings are adjustable:

๐Ÿ”น Indicator Lengths: Modify CCI, RSI, Volume MA, ATR, and MACD lengths.
๐Ÿ”น Entry Thresholds: Adjust CCI, RSI, Volume, and ATR confirmation multipliers.
๐Ÿ”น Label Positioning: Move the signal box up/down, left/right for better visibility.

๐Ÿ“Œ Adjusting the Indicator Position

1๏ธโƒฃ Go to "Settings" โ†’ "Inputs"
2๏ธโƒฃ Change Vertical Offset to move the label up/down
3๏ธโƒฃ Change Horizontal Offset to move the label left/right
4๏ธโƒฃ Click OK, and the signal box will reposition instantly.

๐Ÿ“Œ Tooltip with Live Market Data

๐Ÿ“Š Hover over the signal label to see real-time explanations.

โœ” Example Tooltip:

Explanation:
โ€ข Volatility: ATR is high, indicating strong volatility.
โ€ข Momentum: CCI above threshold, strong momentum.
โ€ข Volume: High volume, confirming trend.
โ€ข MACD: MACD Histogram positive, bullish confirmation.

๐Ÿ“Œ Easily understand why each signal is bullish/bearish!

๐Ÿ”” How to Enable Alerts for Buy Signals

๐Ÿšจ You can receive alerts whenever a Buy Signal appears!

๐Ÿ“Œ Setting Up Alerts in TradingView

1๏ธโƒฃ Click on "๐Ÿ”” Alerts" at the top of the TradingView chart.
2๏ธโƒฃ Select "CCI, RSI, Volume, ATR & MACD Buy Signal" as the condition.
3๏ธโƒฃ Choose Buy Signal Alert from the list.
4๏ธโƒฃ Set the alert frequency:

โœ… "Once per bar close" (Recommended): Ensures the alert is valid after the candle closes.

โŒ "Once per bar": May generate false alerts due to price fluctuations.
5๏ธโƒฃ Click "Create Alert" to activate notifications.

๐Ÿ“ข Now, you'll receive a real-time alert when a buy signal is confirmed!

๐Ÿ”ฅ Why Use This Indicator?

โœ… Saves Time: Eliminates the need to check multiple indicators manually.
โœ… Reduces False Entries: Ensures multiple confirmations before signaling.
โœ… Fully Customizable: Adjust to fit any trading strategy.
โœ… Works on Any Timeframe & Market: Stocks, Crypto, Forex, Futures.
โœ… Real-Time Alerts: Never miss a high-confidence trade!

๐Ÿš€ Get Started Now!

1๏ธโƒฃ Add the indicator to your TradingView chart.
2๏ธโƒฃ Customize settings for your trading style.
3๏ธโƒฃ Look for โœ… to confirm strong buy signals.
4๏ธโƒฃ Hover over the signal box for in-depth market insights.
5๏ธโƒฃ Enable alerts for real-time notifications!

๐Ÿš€ Upgrade your trading accuracy today with this powerful multi-indicator strategy! ๐Ÿ“ˆ

๐Ÿ’ฌ Need More Features? Let me know in the comments! ๐Ÿš€
Nota Keluaran
# **CCI, RSI, Volume, ATR & MACD Buy Signal Indicator**

## **๐Ÿ“Œ Overview**
This **multi-indicator trading tool** is designed to help traders **identify strong buy signals** using a combination of key technical indicators. The indicator provides:

โœ”๏ธ **Clear Buy/No-Entry Signals (โœ… / โŒ)**
โœ”๏ธ **Traffic Light Color Coding (๐Ÿ”ด๐ŸŸข) for Quick Analysis**
โœ”๏ธ **Live Tooltip Insights Explaining the Market Conditions**
โœ”๏ธ **Customizable Indicator Settings & Thresholds**
โœ”๏ธ **Adjustable Label Positioning for Better Visibility**

๐Ÿš€ **Perfect for traders looking for high-probability entry signals across multiple asset classes!**

---

## **๐Ÿ”ข How the Indicator Works**
The indicator calculates and analyzes five key technical indicators:

โœ… **Commodity Channel Index (CCI):** Measures trend momentum.
โœ… **Relative Strength Index (RSI):** Identifies overbought/oversold conditions.
โœ… **Volume Moving Average (Volume MA):** Confirms strength in price movement.
โœ… **Average True Range (ATR):** Evaluates market volatility and trend consistency.
โœ… **Moving Average Convergence Divergence (MACD):** Confirms trend direction and strength.

๐Ÿ”น **A Buy Signal (โœ…) appears only when all conditions confirm a strong setup.**
๐Ÿ”น **A No-Entry Signal (โŒ) appears if the setup lacks confirmation.**

---

## **๐Ÿ”ข Detect Trend Direction**
```pinescript
priceChange = ta.sma(close - close[1], 5) // Moving average of price change
isUptrend = priceChange > 0 // Positive price movement
isDowntrend = priceChange < 0 // Negative price movement

// ๐Ÿ“‰ **New: Volume Color Adjusted for Trend Direction**
volumeColor = isUptrend and volume > volMA * volumeMultiplier ? "๐ŸŸข" :
isDowntrend and volume > volMA * volumeMultiplier ? "๐Ÿ”ด" :
"๐ŸŸก" // Low volume, sideways movement
```

---

## **๐Ÿ“Š Signal Interpretation (Traffic Light Colors)**
The indicator provides a **quick color-based summary** of the current trend:

๐ŸŸข **Green** = Strong confirmation โœ…
๐Ÿ”ด **Red** = Weak signal, avoid โŒ
๐ŸŸก **Yellow** = Sideways movement (ATR Only)

### **Example 1: Strong Buy Signal (All Green)**
```
โœ… | Volatility: ๐ŸŸข | Momentum: ๐ŸŸข | Volume: ๐ŸŸข | MACD: ๐ŸŸข
```
๐Ÿ“Œ **Interpretation:**
- ATR confirms strong volatility.
- CCI indicates strong momentum.
- Volume is high, confirming price action.
- MACD is bullish.

---

### **Example 2: No Entry (Weak Trend)**
```
โŒ | Volatility: ๐Ÿ”ด | Momentum: ๐Ÿ”ด | Volume: ๐Ÿ”ด | MACD: ๐Ÿ”ด
```
๐Ÿ“Œ **Interpretation:**
- ATR indicates weak volatility.
- CCI momentum is weak.
- Volume is high, but price is trending downward (indicating selling pressure).
- MACD confirms a bearish trend.

---

## **๐Ÿ›  Customization Options**
You can **fine-tune the indicator settings** based on your trading strategy. The following settings are adjustable:

๐Ÿ”น **Indicator Lengths:** Modify `CCI`, `RSI`, `Volume MA`, `ATR`, and `MACD` lengths.
๐Ÿ”น **Entry Thresholds:** Adjust `CCI`, `RSI`, `Volume`, and `ATR` confirmation multipliers.
๐Ÿ”น **Label Positioning:** Move the signal box **up/down, left/right** for better visibility.

### **๐Ÿ“Œ Adjusting the Indicator Position**
1๏ธโƒฃ **Go to "Settings" โ†’ "Inputs"**
2๏ธโƒฃ Change **`Vertical Offset`** to move the label **up/down**
3๏ธโƒฃ Change **`Horizontal Offset`** to move the label **left/right**
4๏ธโƒฃ **Click OK**, and the signal box will reposition instantly.

---

## **๐Ÿ“Œ Tooltip with Live Market Data**
๐Ÿ“Š **Hover over the signal label to see real-time explanations.**

โœ” **Example Tooltip:**
```
Explanation:
โ€ข Volatility: ATR is high, indicating strong volatility.
โ€ข Momentum: CCI above threshold, strong momentum.
โ€ข Volume: High volume, but price is trending down (selling pressure).
โ€ข MACD: MACD Histogram positive, bullish confirmation.
```
๐Ÿ“Œ **Easily understand why each signal is bullish/bearish!**

---

## **๐Ÿ”” How to Enable Alerts for Buy Signals**

๐Ÿšจ You can receive alerts **whenever a Buy Signal appears!**

### **๐Ÿ“Œ Setting Up Alerts in TradingView**
1๏ธโƒฃ **Click on "๐Ÿ”” Alerts" at the top of the TradingView chart.**
2๏ธโƒฃ **Select "CCI, RSI, Volume, ATR & MACD Buy Signal" as the condition.**
3๏ธโƒฃ **Choose `Buy Signal Alert` from the list.**
4๏ธโƒฃ **Set the alert frequency:**
- โœ… **"Once per bar close" (Recommended):** Ensures the alert is valid after the candle closes.
- โŒ "Once per bar": May generate false alerts due to price fluctuations.
5๏ธโƒฃ **Click "Create Alert" to activate notifications.**

๐Ÿ“ข **Now, you'll receive a real-time alert when a buy signal is confirmed!**

---

## **๐Ÿ”ฅ Why Use This Indicator?**
โœ… **Saves Time:** Eliminates the need to check multiple indicators manually.
โœ… **Reduces False Entries:** Ensures multiple confirmations before signaling.
โœ… **Fully Customizable:** Adjust to fit any trading strategy.
โœ… **Works on Any Timeframe & Market:** Stocks, Crypto, Forex, Futures.
โœ… **Real-Time Alerts:** Never miss a high-confidence trade!

---

## **๐Ÿš€ Get Started Now!**
1๏ธโƒฃ **Add the indicator to your TradingView chart.**
2๏ธโƒฃ **Customize settings for your trading style.**
3๏ธโƒฃ **Look for โœ… to confirm strong buy signals.**
4๏ธโƒฃ **Hover over the signal box for in-depth market insights.**
5๏ธโƒฃ **Enable alerts for real-time notifications!**

๐Ÿš€ **Upgrade your trading accuracy today with this powerful multi-indicator strategy!** ๐Ÿ“ˆ

---

๐Ÿ’ฌ **Need More Features?** Let me know in the comments! ๐Ÿš€
Nota Keluaran
- The indicator label is now always positioned above the latest candle, ensuring clear visibility without overlapping previous price action.

- Dynamic positioning automatically adjusts the labelโ€™s height based on the chart's movement.

- User customization remains available through the Label Position Offset setting, allowing traders to fine-tune the labelโ€™s placement as needed.

- This update enhances clarity and usability, making the signal display more adaptable to different market conditions. ๐Ÿš€๐Ÿ“Š
Nota Keluaran
Trend Indicator Updates:

๐ŸŸข Green Dot for Uptrend
๐Ÿ”ด Red Dot for Downtrend
๐ŸŸก Yellow Dot for Uncertain Trend
Refined Volume Logic:

High Volume + Downtrend โ†’ ๐Ÿ”ด (Red)
High Volume + Uptrend โ†’ ๐ŸŸข (Green)
Low Volume โ†’ ๐ŸŸก (Yellow)
Updated Buy Signal Icons:

โœ‹ (Wait) replaces โŒ when no entry is recommended
โœ… (Checkmark) remains for confirmed buy signals
Trend Indicator in Tooltip:

Now displays a colored dot matching trend direction
Nota Keluaran
๐Ÿ”น Logical Enhancements:
Breakout Confirmation Added:

Now detects if a breakout above a manual resistance level occurs.
If price stays above the resistance for X bars (configurable), it confirms the breakout.
Otherwise, it warns that confirmation is required before considering an entry.
Trend Indicator Update:

๐Ÿ”ผ Green Arrow โ†’ Uptrend
๐Ÿ”ฝ Red Arrow โ†’ Downtrend
๐ŸŸก Yellow Button โ†’ Sideways Trend
More Accurate Volume Trend Calculation:

If volume is high but the trend is downward, the volume dot is ๐Ÿ”ด (Red) instead of ๐ŸŸข (Green).
If volume is high and the trend is up, it stays ๐ŸŸข (Green).
๐Ÿ”น Visual Enhancements:
Buy Signal Icons Adjusted:
โœ… โ†’ Buy Confirmed
๐Ÿ–๏ธ โ†’ Wait for Confirmation (Replaces โŒ to signal a more intuitive approach).
Breakout Status in Tooltip:
Now clearly indicates if resistance was broken or if confirmation is still required before an entry.
More Intuitive Trend Indicator in Tooltip:
๐Ÿ”ผ Uptrend
๐Ÿ”ฝ Downtrend
๐ŸŸก Sideways
๐Ÿ”น Code Refinements:
Improved handling of na values to avoid calculation errors.
Tooltip formatting optimized for easier reading.
Nota Keluaran
๐Ÿ”น Enhancements & Fixes
1๏ธโƒฃ Improved Volume Comparison Display in Tooltip:
The volume comparison now follows the requested format:
Current Volume >/</= MA Volume (X days)
Previously, it displayed "Volume" twice and lacked clarity on the moving average volume value.

2๏ธโƒฃ Refined Volume Indicator on the Chart:
Instead of showing the actual volume comparison (e.g., 58,421,456 > 37,067,358.32), the chart now only displays a colored dot:
๐ŸŸข Green โ†’ Volume is above the moving average.
๐Ÿ”ด Red โ†’ Volume is below the moving average.
๐ŸŸก Yellow โ†’ Volume is equal to the moving average.

3๏ธโƒฃ Removed Resistance Level Settings Due to TradingView Limitation:
The feature allowing a manual resistance level per stock was removed due to a TradingView limitation, where the input value was applied globally across all charts instead of per-symbol.
This issue prevented unique resistance levels per stock, making it unreliable.

4๏ธโƒฃ Tooltip Descriptions Added to Input Settings:
Each configurable input parameter now has a tooltip providing a clear explanation of its function.
This helps users better understand how each setting impacts the indicator's behavior.

5๏ธโƒฃ Removed โ€˜Breakout Confirmation Barsโ€™ Setting:
Since the resistance level feature was removed, the confirmation bars logic no longer applies and has been removed from the settings.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.