OPEN-SOURCE SCRIPT
Aggiornato

Ungli

170
Multi-Indicator Confluence System

This is a **multi-indicator confluence trading signal system** called "Ungli" that combines RSI, ADX, and MACD to identify high-probability momentum opportunities when used alongside chart pattern and trend line breakouts.

## Core Concept
The script identifies moments when multiple technical indicators align to suggest potential price momentum moves, specifically looking for oversold and overbought conditions with momentum confirmation. Use green and red highlights along with chart patterns and trend line breakouts that signal a breakout for confluence for a likely momentum move.

## Technical Indicators Used

**RSI (Relative Strength Index)**
- Default 14-period RSI
- Oversold threshold: < 40
- Overbought threshold: > 60

**ADX (Average Directional Index)**
- Default 14-period ADX with DI+ and DI-
- Threshold: 21
- Looks for ADX below threshold but ticking upward (momentum building)

**MACD (Moving Average Convergence Divergence)**
- Fast: 12, Slow: 26, Signal: 9
- Uses MACD line direction as trend filter

## Signal Logic

**Green Background (Bullish Momentum Signal):**
- RSI > 60 (overbought)
- ADX < 21 AND rising
- MACD line trending upward

**Red Background (Bearish Momentum Signal):**
- RSI < 40 (oversold)
- ADX < 21 AND rising
- MACD line trending downward

## Key Strategy Elements

1. **Confluence Approach**: Requires all three indicators to align, reducing false signals
2. **Momentum Filter**: ADX must be building (rising) even if low, indicating emerging trend strength
3. **Trend Confirmation**: MACD direction must match the expected move
4. **Visual Simplicity**: Clean background highlighting without chart clutter
5. **Pattern Integration**: Designed to work with chart patterns and breakout strategies

## Use Case

This indicator is designed for swing trading and breakout strategies, identifying moments when oversold/overbought conditions coincide with building momentum in the expected direction. The ADX filter helps avoid choppy, trendless markets. Best used in conjunction with:

- Support/resistance breakouts
- Chart pattern breakouts (triangles, flags, channels)
- Trend line breaks
- Key level violations

The background highlights serve as confluence confirmation when combined with your chart analysis and breakout setups.
Note di rilascio
# Ungli - Double Screen Momentum Indicator

## Overview
**Ungli** means "finger", named after the hook shape that ADX makes before price starts trending.
Ungli is a momentum indicator that can work well if accompanied by a trendline breakout/breakdown.

Ungli identifies high-probability momentum opportunities by detecting divergences between price momentum and directional strength. It combines RSI, ADX, and MACD analysis with optional higher timeframe confirmation to filter out noise and focus on significant momentum shifts.

## Core Concept: Momentum Divergence Detection
The indicator identifies moments when:
- **RSI shows extreme conditions** (oversold <40 or overbought >60)
- **ADX shows low but increasing momentum** (below threshold but ticking up)
- **MACD confirms directional bias** (falling for bearish, rising for bullish signals)
- **Higher timeframe MACD aligns** (optional "tide" confirmation)

This combination catches potential reversal points where momentum is shifting but hasn't yet reached high levels.

## Signal Types

### 🔴 Bearish Signals (Red Background)
**Conditions:**
- RSI < 40 (oversold territory)
- ADX < threshold (default 60) AND ADX rising
- MACD line falling (current < previous)
- Higher timeframe MACD falling (if enabled)

### 🟢 Bullish Signals (Green Background)
**Conditions:**
- RSI > 60 (overbought territory)
- ADX < threshold (default 60) AND ADX rising
- MACD line rising (current > previous)
- Higher timeframe MACD rising (if enabled)

## Multi-Timeframe Analysis
The **"Check Tide in Direction of Wave"** feature adds higher timeframe MACD confirmation using automatic timeframe selection:

- **1m/3m/5m charts** → Confirmed by 15m MACD
- **15m/30m charts** → Confirmed by 1H MACD
- **1H/2H/3H/4H charts** → Confirmed by Daily MACD
- **Daily charts** → Confirmed by Weekly MACD
- **Weekly charts** → Confirmed by Monthly MACD

This ensures your signals align with the broader trend context.

## Visual Features

### Dynamic Transparency Gradient
Background colors use intelligent transparency based on ADX levels:
- **ADX = 10**: Maximum color intensity (strongest signals)
- **ADX = threshold**: Minimum color intensity (weakest signals)
- **Linear gradient between**: Visual strength indicator

### Customizable Display
- **Independent transparency controls** for bullish/bearish signals
- **Show/hide toggles** for each signal type
- **Separate color intensity** based on signal strength

## Input Parameters

### Core Settings
- **RSI Length**: Period for RSI calculation (default: 14)
- **ADX Length**: Period for ADX calculation (default: 14)
- **RSI Upper/Lower Thresholds**: Overbought/oversold levels (default: 60/40)
- **ADX Threshold**: Maximum ADX for signal validity (default: 60)

### MACD Settings
- **Fast/Slow/Signal Lengths**: MACD parameters (default: 12/26/9)
- **Check Tide in Direction of Wave**: Enable higher timeframe confirmation

### Display Controls
- **Bullish/Bearish BG Transparency**: Independent opacity control (0-95, default: 60)
- **Show Bullish/Bearish Highlights**: Toggle individual signal types

## Trading Applications

### Reversal Trading
Use signals as potential reversal points in ranging or trending markets. The low ADX requirement helps identify accumulation/distribution phases before major moves.

### Confluence Analysis
Combine with support/resistance levels, chart patterns, or other indicators for higher probability setups.

### Risk Management
- Stronger visual intensity (darker colors) = Lower ADX = Potentially stronger signals
- Weaker visual intensity (lighter colors) = Higher ADX = Less reliable signals

## Alert System
Three alert types available:
- **Bearish Signal**: RSI + ADX + MACD oversold conditions met
- **Bullish Signal**: RSI + ADX + MACD overbought conditions met
- **Any Signal**: Either bullish or bearish signal triggered

## Best Practices
1. **Use on multiple timeframes** for context
2. **Enable higher timeframe confirmation** for trend alignment
3. **Adjust transparency** based on chart visibility preferences
4. **Combine with price action** for entry/exit timing
5. **Consider market context** - works best in trending or transitional markets

## Technical Notes
- **Overlay indicator** - plots directly on price chart
- **No repainting** - signals are confirmed on bar close
- **Resource efficient** - optimized for real-time analysis
- **Compatible** with all market types and timeframes

---

*The name "Ungli" represents the finger pointing to potential market turning points - helping traders identify when momentum is shifting beneath the surface.*

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.