PROTECTED SOURCE SCRIPT

Tweezer Top & Bottom Pattern

59
NOTE: This script is provided as-is for educational and trading purposes. Always use risk management strategies when trading.

Overview
This is the initial release of the "Tweezer Top & Bottom Pattern" Pine Script, it provides real-time detection of Tweezer candlestick reversal patterns with customizable filters, trend confirmation, and visual aids for traders using TradingView.

Key Features
- Pattern Detection: Identifies Tweezer Bottom (bullish reversal) and Tweezer Top (bearish reversal) patterns based on matching highs/lows, opposite candle directions, and user-defined tolerance.
- Noise Filtering: Optional ATR-based tolerance to adapt to market volatility, reducing false signals in noisy conditions.
- Wick Requirements: Configurable minimum wick size as a percentage of the candle body for stricter pattern validation.
- Engulfing Filter: Toggleable option to require the second candle to engulf the first, enhancing signal reliability.
- Trend Context: Uses a simple EMA (Exponential Moving Average) to ensure patterns occur in appropriate uptrends or downtrends.
- Visual Indicators:
- Labels ("TB ↑" for bottoms, "TT ↓" for tops) with customizable colors and styles.
- Persistent horizontal lines at pattern levels for stop-loss or support/resistance reference (resets on new patterns).
- Optional background highlights for quick visual spotting.
- Alerts: Built-in alert conditions for Tweezer Bottom and Top detections, integrable with TradingView's notification system.
- Customization: User inputs for toggling patterns, adjusting tolerance, ATR settings, wick percentages, engulfing requirements, and EMA length.

Usage Instructions
- Add the script to your TradingView chart via the Pine Editor.
- Customize settings through the indicator's input menu.
- Best suited for higher timeframes (e.g., 1H, Daily) on volatile assets like stocks, forex, or cryptocurrencies.
- Combine with other indicators (e.g., RSI, volume) for confirmation

Known Limitations
- Performance depends on market conditions—backtest thoroughly before live use.
- No volume integration in this version (planned for future updates).

Installation
1. Open TradingView and access the Pine Editor.
2. Paste the provided script code.
3. Save and add to your chart.
4. Adjust inputs as needed.

For feedback or issues, consider sharing on TradingView communities or forums dedicated to Pine Script development.

Future Plans
- Version 1.1: Add volume confirmation filter and multi-timeframe support.
- Version 2.0: Integrate machine learning-based pattern scoring (if feasible in Pine Script).

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.