OPEN-SOURCE SCRIPT
Aggiornato

2HH2LL [CCE_Charts]

228
Detects the "Two Higher Highs, Two Lower Lows" (2HH2LL) pattern formation and provides strength analysis with trade signals. The indicator displays visual markers, S/R zones, and clear signals for LONG or SHORT positions.

Pattern Description

The 2HH2LL pattern consists of two consecutive higher highs and two consecutive lower lows. This formation can signal potential trend reversals or continuations depending on market context.

Key Features

• Pattern strength analysis using S/R zone and volume confirmation
• Clear LONG or SHORT trade signals
• Visual markers highlighting pattern components
• Support/Resistance zone visualization
• Customizable alerts for real-time notifications
• Detailed information panel

How to Use This Indicator

1. Add the indicator to your chart
2. Configure settings based on your trading style
3. Look for the "2HH2LL" label when a valid pattern forms
4. Check the pattern strength (STRONG, MEDIUM, WEAK)
5. Note the trade direction signal (LONG or SHORT)
6. Verify the pattern with other technical tools
7. Set up alerts for real-time notifications

Settings Guide

Pattern Settings
• Lookback Period: Controls pivot point detection (5-50)
• Minimum Swing Strength: Required percentage change between highs/lows

Confirmation Settings
• S/R Zone Size: Size of support/resistance zone
• Volume Confirmation Threshold: Volume multiple required for confirmation
• Volume Average Period: Bars used for volume average calculation

Visual Settings
• Show H1/H2/L1/L2 Labels: Toggle pattern component labels
• Show S/R Zone: Toggle support/resistance zone display

Signal Settings
• Trade Direction: How trade direction is determined (SHORT, LONG, AUTO)

Alert Settings
• Alert on All Patterns: Trigger alerts for all valid patterns
• Alert on STRONG Patterns Only: Only alert on strong patterns
• Alert on Direction: Filter alerts by trade direction

Pattern Strength Analysis

The indicator classifies pattern strength into three categories:
• STRONG: Both confirmation factors present (S/R test and volume)
• MEDIUM: One confirmation factor present
• WEAK: No confirmation factors present

For best results, use this indicator in combination with other technical tools and always consider the broader market context.
Note di rilascio
resolve historical buffer limit error

- Fix "Error on bar 23064: The requested historical offset (5635) is beyond the historical buffer's limit (5634)"
- Set max_bars_back to maximum allowed value (5000)
- Add explicit buffer management for historical data access
- Optimize pivot detection to work within TradingView's historical data limitations
Note di rilascio
Changelog for Fixed 2HH2LL [CCE_Charts] Indicator

1. Modified isPivotHigh() function (lines 47-54)

Added safety check: if bar_index >= len*2 to prevent lookback beyond available data
Restructured the function with proper conditional handling
Added explicit result variable for clearer code flow
Added false return for cases with insufficient historical data


2. Modified isPivotLow() function (lines 56-63)

Added same safety check: if bar_index >= len*2 to prevent lookback beyond available data
Restructured function with the same pattern as isPivotHigh()
Added explicit result variable for consistency
Added false return for cases with insufficient historical data

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.