OPEN-SOURCE SCRIPT

MACD, ADX & RSI -> for altcoins

# MACD + ADX + RSI Combined Indicator

## Overview
This advanced technical analysis tool combines three powerful indicators (MACD, ADX, and RSI) into a single view, providing a comprehensive analysis of trend, momentum, and divergence signals. The indicator is designed to help traders identify potential trading opportunities by analyzing multiple aspects of price action simultaneously.

## Components

### 1. MACD (Moving Average Convergence Divergence)
- **Purpose**: Identifies trend direction and momentum
- **Components**:
- Fast EMA (default: 12 periods)
- Slow EMA (default: 26 periods)
- Signal Line (default: 9 periods)
- Histogram showing the difference between MACD and Signal line
- **Visual**:
- Blue line: MACD line
- Orange line: Signal line
- Green/Red histogram: MACD histogram
- **Interpretation**:
- Histogram color changes indicate potential trend shifts
- Crossovers between MACD and Signal lines suggest entry/exit points

### 2. ADX (Average Directional Index)
- **Purpose**: Measures trend strength and direction
- **Components**:
- ADX line (default threshold: 20)
- DI+ (Positive Directional Indicator)
- DI- (Negative Directional Indicator)
- **Visual**:
- Navy blue line: ADX
- Green line: DI+
- Red line: DI-
- **Interpretation**:
- ADX > 20 indicates a strong trend
- DI+ crossing above DI- suggests bullish momentum
- DI- crossing above DI+ suggests bearish momentum

### 3. RSI (Relative Strength Index)
- **Purpose**: Identifies overbought/oversold conditions and divergences
- **Components**:
- RSI line (default: 14 periods)
- Divergence detection
- **Visual**:
- Purple line: RSI
- Horizontal lines at 70 (overbought) and 30 (oversold)
- Divergence labels ("Bull" and "Bear")
- **Interpretation**:
- RSI > 70: Potentially overbought
- RSI < 30: Potentially oversold
- Bullish/Bearish divergences indicate potential trend reversals

## Alert System
The indicator includes several automated alerts:
1. **MACD Alerts**:
- Rising to falling histogram transitions
- Falling to rising histogram transitions

2. **RSI Divergence Alerts**:
- Bullish divergence formations
- Bearish divergence formations

3. **ADX Trend Alerts**:
- Strong trend development (ADX crossing threshold)
- DI+ crossing above DI- (bullish)
- DI- crossing above DI+ (bearish)

## Settings Customization
All components can be fine-tuned through the settings panel:

### MACD Settings
- Fast Length
- Slow Length
- Signal Smoothing
- Source
- MA Type options (SMA/EMA)

### ADX Settings
- Length
- Threshold level

### RSI Settings
- RSI Length
- Source
- Divergence calculation toggle

## Usage Guidelines

### Entry Signals
Strong entry signals typically occur when multiple components align:
1. MACD histogram color change
2. ADX showing strong trend (>20)
3. RSI showing divergence or leaving oversold/overbought zones

### Exit Signals
Consider exits when:
1. MACD crosses signal line in opposite direction
2. ADX shows weakening trend
3. RSI reaches extreme levels with divergence

### Risk Management
- Use the indicator as part of a complete trading strategy
- Combine with price action and support/resistance levels
- Consider multiple timeframe analysis for confirmation
- Don't rely solely on any single component

## Technical Notes
- Built for TradingView using Pine Script v5
- Compatible with all timeframes
- Optimized for real-time calculation
- Includes proper error handling and NA value management
- Memory-efficient calculations for smooth performance

## Installation
1. Copy the provided Pine Script code
2. Open TradingView Chart
3. Create New Indicator -> Pine Editor
4. Paste the code and click "Add to Chart"
5. Adjust settings as needed through the indicator settings panel

## Version Information
- Version: 2.0
- Last Updated: November 2024
- Platform: TradingView
- Language: Pine Script v5
Bollinger Bands (BB)Breadth Indicators

สคริปต์โอเพนซอร์ซ

ด้วยเจตนารมณ์หลักของ TradingView ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถเข้าใจและตรวจสอบได้ ต้องขอบคุณผู้เขียน! ที่ให้คุณใช้ได้ฟรี แต่การนำโค้ดนี้ไปใช้ในการเผยแพร่ซ้ำจะต้องอยู่ภายใต้ กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?

คำจำกัดสิทธิ์ความรับผิดชอบ