PROTECTED SOURCE SCRIPT

Pattern Detector Pro

57
📊 Advanced Market Pattern Recognition Suite (Pine Script® v6)

The Advanced Market Pattern Recognition Suite is an original comprehensive technical analysis indicator designed to automatically identify, visualize, and track high-probability candlestick and chart patterns directly on the chart in real time. This tool is built for traders who rely on structured price action, classical pattern theory, and rule-based confirmations rather than subjective interpretation.

The indicator continuously scans price data and applies independent, rule-driven logic to each supported pattern. Every pattern is detected using precise candlestick measurements, trend context, and structural validation to ensure clarity and consistency across all market conditions.

🔍 What This Indicator Detects

Candlestick Reversal Patterns:

Hammer
Inverted Hammer
Hanging Man
Shooting Star
Bullish Engulfing
Bearish Engulfing
Bullish Harami
Bearish Harami
Piercing Pattern
Dark Cloud Cover

Multi-Candle Reversal Patterns:

Morning Star
Evening Star
Three White Soldiers
Three Black Crows

Continuation Patterns:

Rising Three Methods
Falling Three Methods

Chart & Structure Patterns:

Bullish Flag
Bearish Flag
Bullish Symmetrical Triangle
Ascending Triangle
Descending Triangle

Each pattern is evaluated independently and only displayed when its specific rules are met.

⚙️ How It Works
Trend Context Filtering

The indicator includes an optional trend filter based on moving averages to ensure reversal patterns appear within appropriate market conditions (for example, bullish reversals in downtrends and bearish reversals in uptrends). This helps reduce noise and improves pattern relevance.

Real-Time Pattern Printing

All patterns are detected and plotted in real time as price develops. No repainting logic is used. Patterns remain fixed once confirmed.

Entry Suggestion Framework

For each pattern, the indicator can optionally display common entry confirmation levels such as:

Break of candle high or low

Confirmation candle close
These entry visuals can be turned on or off based on user preference.

📈 Backtesting & Performance Overview

The indicator includes an optional on-chart performance summary box that tracks historical outcomes of detected patterns based on predefined entry, stop, and target logic. This allows traders to visually review how patterns have historically behaved on a given market and timeframe.

Displayed metrics may include:

Total pattern occurrences
Win rate
Average return
Profit factor

This feature is intended for analytical and educational purposes only.

🎛 Customization & Controls

Users can fully customize the indicator, including:

Enabling or disabling individual patterns
Limiting the number of patterns displayed on the chart
Turning entry suggestions on or off
Enabling or disabling alerts per pattern
Adjusting visual styles and label sizes
Enabling or disabling the performance summary box

🚨 Alerts

Alert conditions are available for each pattern and can notify the user when a new bullish or bearish pattern is detected. Alerts include the pattern name and direction for quick decision-making.

👤 Who This Indicator Is For

This tool is suitable for:

Price-action traders
Candlestick pattern traders
Technical analysts
Swing and position traders
Traders who want structured, rule-based pattern recognition

⚠️ Disclaimer

This indicator is for educational and informational purposes only and does not constitute financial advice. Trading involves risk, and past performance does not guarantee future results.

Exención de responsabilidad

La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.