OPEN-SOURCE SCRIPT
Cập nhật W Pattern Finder

📊 W Pattern Finder
English:
This indicator automatically detects W-Patterns (Double Bottoms) following the HLHL structure and marks the last four crucial points on the chart.
Additionally, it draws the neckline, a Take Profit (TP) and a Stop Loss (SL) – including a Risk/Reward ratio.
✨ Features
* Automatic detection of W-Patterns (Double Bottoms)
* Draws the neckline and the last 4 key points
* Calculates and displays TP and SL levels (with adjustable RR ratio)
* Auto-Clear: All objects are removed once TP or SL is reached
* Fully customizable colors & widths for pattern, TP and SL lines
* Tolerance filter for lows to improve clean pattern recognition
* Visual marking of the W-pattern directly in the chart
⚙️ Settings
* Pivot Length → controls sensitivity of pattern detection
* Line color & width for the pattern
* Individual colors and widths for TP and SL lines
* Risk/Reward Ratio (RR) freely adjustable
* Tolerance (%) for deviation of lows
📈 Use Case
This indicator is especially useful for chart technicians & pattern traders who trade W-formations (Double Bottoms).
With the automatic calculation of TP & SL, it becomes instantly clear whether a trade is worth taking.
⚠️ Disclaimer:
This indicator is not financial advice. It is intended for educational and analytical purposes only.
Use it in trading at your own risk
English:
This indicator automatically detects W-Patterns (Double Bottoms) following the HLHL structure and marks the last four crucial points on the chart.
Additionally, it draws the neckline, a Take Profit (TP) and a Stop Loss (SL) – including a Risk/Reward ratio.
✨ Features
* Automatic detection of W-Patterns (Double Bottoms)
* Draws the neckline and the last 4 key points
* Calculates and displays TP and SL levels (with adjustable RR ratio)
* Auto-Clear: All objects are removed once TP or SL is reached
* Fully customizable colors & widths for pattern, TP and SL lines
* Tolerance filter for lows to improve clean pattern recognition
* Visual marking of the W-pattern directly in the chart
⚙️ Settings
* Pivot Length → controls sensitivity of pattern detection
* Line color & width for the pattern
* Individual colors and widths for TP and SL lines
* Risk/Reward Ratio (RR) freely adjustable
* Tolerance (%) for deviation of lows
📈 Use Case
This indicator is especially useful for chart technicians & pattern traders who trade W-formations (Double Bottoms).
With the automatic calculation of TP & SL, it becomes instantly clear whether a trade is worth taking.
⚠️ Disclaimer:
This indicator is not financial advice. It is intended for educational and analytical purposes only.
Use it in trading at your own risk
Phát hành các Ghi chú
W & M Pattern Finder 2.0 (Double Top / Double Bottom)The W & M Pattern Finder 2.0 automatically detects Double Bottom (W) and Double Top (M) reversal formations directly on the chart.
It uses pivot analysis, tolerance filtering and neckline validation to highlight high-quality setups. Optional Take Profit (TP), Stop Loss (SL) and a detailed statistics panel are included.
✅ Features
* Automatic detection of Double Bottom (W) & Double Top (M)
* Dynamic neckline as entry trigger
* Optional candle close confirmation
* Automatic TP/SL calculation based on risk-to-reward
* Adjustable Risk/Reward Ratio (RRR)
* Full pattern visualization (structure lines & labels)
* Real-time statistics:
* detected patterns
* TP hits
* SL hits
* invalidated setups
* Optional history mode (keep old patterns visible)
* Deleted patterns can be faded for visual tracking
🧠 Logic
The indicator evaluates:
* Pivot structure sequences
* Symmetry tolerance (% deviation between highs/lows)
* Neckline break confirmation
* SL invalidation before confirmation
Pending patterns may become invalid if price violates the stop level.
🎯 TP & SL
* W (Double Bottom):
TP above the neckline, SL below lowest pivot
* M (Double Top):
TP below the neckline, SL above highest pivot
Risk/Reward Ratio is fully configurable.
📊 Live Statistics (per pattern type)
* Total
* TP hits
* SL hits
* Invalidated
All statistics are separated for M & W patterns.
⚙️ Inputs
* Pivot length
* Risk/Reward Ratio (RRR)
* Tolerance (%)
* Show TP/SL
* Neckline close confirmation
* History mode On/Off
* Fade deleted patterns
* Table position
🕵️ Ideal For
* Reversal traders
* Pattern-based strategies
* Swing trading
* Intraday setups
⚠️ Disclaimer
This indicator does not provide financial advice.
All signals are for educational and analytical purposes only.
Trading financial markets involves significant risk:
* past performance does not guarantee future results
* losses can occur at any time
Use at your own responsibility.
The author is **not liable** for financial losses or damages.
Always consider:
* market structure
* volatility
* volume context
* news events
⭐ Tip
Combine with volume confirmation or trend filters for stronger signal quality.
Good luck and trade safely! 🚀
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.