Breakout Patterns Detector: Triangle & Wedge [Splirus]

To achieve optimal results, users are encouraged to experiment with indicator parameters and analyze the dashboard summary to find the perfect configuration for each timeframe, pair, and market condition.
Pattern Identification
The indicator detects the following breakout patterns based on pivot highs and lows:
- Ascending Triangle: Flat upper trendline, rising lower trendline.
- Descending Triangle: Flat lower trendline, declining upper trendline.
- Symmetric Triangle: Converging trendlines with similar slopes (within a user-defined threshold).
- Ascending Wedge: Both trendlines slope upward, converging.
- Descending Wedge: Both trendlines slope downward, converging.
Patterns are identified using configurable left and right bars for small and big patterns, with slope thresholds normalized by ATR. A trend confirmation filter ensures breakouts align with market direction, and users can adjust breakout confirmation bars to validate signals.
The goal is to fine-tune these settings to suit specific timeframes and pairs, as each combination may require a unique setup for optimal performance.
Stop-Loss Calculation
Stop-loss levels are calculated dynamically based on pattern type and breakout direction:
- Symmetric Triangle: SL is set at the first pivot of the opposite trendline, adjusted by a buffer percentage.
- Ascending/Descending Triangle: SL is placed at the breakout trendline’s price, plus the buffer.
- Ascending/Descending Wedge: SL is set at the second pivot of the opposite trendline, adjusted by the buffer.
The indicator calculates leverage based on a user-defined risk tolerance percentage. Users should adjust the SL buffer and risk tolerance to balance risk and reward, monitoring the dashboard to assess how these settings impact performance across different timeframes and pairs.
Take-Profit Calculation
Three take-profit levels (TP1, TP2, TP3) are calculated using pattern height and user-defined multipliers:
- For Ascending/Descending Triangles, height is the difference between the max and min prices within the pattern.
- For Symmetric Triangles and Wedges, height is the vertical distance between trendlines at the pattern’s start.
TP levels are set as:
TP1 = Breakout price ± (Height × TP1 Multiplier).
TP2 = Breakout price ± (Height × TP2 Multiplier).
TP3 = Breakout price ± (Height × TP3 Multiplier, with a 1.5x adjustment for Wedges).
Experiment with TP multipliers to optimize the risk-reward ratio, using the dashboard to evaluate TP hit rates and overall profitability for each configuration.
Symmetric Triangle:
Ascending/Descending Wedge:
Ascending/Descending Triangles:
Finding the Perfect Configuration
The indicator’s dashboard provides a comprehensive summary of performance metrics, including total trades, TP1/TP2/TP3 hits, SL hits, profit/loss percentages, and win rates for bullish, bearish, and combined trades. These metrics are crucial for identifying the ideal parameter settings:
- Timeframe and Pair Variability: Each timeframe (e.g., 15m, 30min, 1H, 4H, Daily) and pair (e.g., BTC/USD, EUR/USD) behaves differently. Adjust parameters like left/right bars, minimum pattern length, and breakout confirmation bars to match the volatility and trend characteristics of the chosen pair and timeframe.
- Parameter Tuning: Modify slope thresholds, trend confirmation filters, and bars inside the pattern to filter out false breakouts. For example, a higher breakout confirmation bar setting may reduce signals but increase reliability on longer timeframes.
- Dashboard Analysis: Focus on the dashboard’s win rate, profit/loss ratio, and TP/SL hit frequencies. A “Perfect” win rate (>66%) or high TP hit rate indicates a strong configuration. If the SL hit rate is high, consider tightening the trend confirmation filter or increasing the SL buffer.
- Iterative Testing: Test different combinations of settings (e.g., small vs. big patterns, aggressive vs. conservative breakout confirmation) and compare dashboard results over time. The goal is to find a balance where the indicator consistently delivers high win rates and profitability for your specific trading setup.
Alert Modes
The indicator supports two alert modes to suit different trading styles:
Manual Mode: Generates alerts for breakouts with entry price, SL, TP1/TP2/TP3, and leverage, tailored for Crypto or Forex markets. Use this mode to manually evaluate signals while refining configurations.
Bot Mode: Sends automated trading signals. To avoid conflicts, Bot Mode ensures no short position alert is triggered while a long position is active, and vice versa. This mode is ideal once you’ve identified an optimal configuration via the dashboard.
Additional Features
- Historical Patterns: Displays past trendlines with customizable transparency and extension, helping users analyze how patterns performed under different settings.
- Customizable Settings: Adjust pattern size, breakout confirmation, trend filters, and visual preferences (colors, dashboard location) to match your trading style.
- Market Compatibility: Supports Crypto and Forex markets across all timeframes, but requires careful tuning for each market type.
Usage Notes
- Start with default settings and monitor the dashboard to establish a baseline performance for your chosen timeframe and pair.
- Gradually adjust one parameter at a time (e.g., left/right bars, TP multipliers) and compare dashboard results to identify improvements.
- Use historical pattern analysis to understand how past breakouts performed under different configurations, guiding your optimization process.
- Once a high win rate and profitability are achieved, consider automating trades with Bot Mode for consistent execution.
Disclaimer
This indicator is intended for educational purposes only and should not be considered financial advice. Trading involves significant risk, and past performance is not indicative of future results. Users are strongly advised to thoroughly test and validate the indicator’s signals in a demo environment before using it in live trading. The author is not responsible for any financial losses incurred while using this indicator. Always conduct your own research and consult with a qualified financial advisor before making trading decisions.
- Updated Dashboard information ( Results / WinRate )
- Added MACD Filter for Breakout confirmation ( Possibility to Active/Desactive the Filter )
- Updated Alert Messages
- Updated Default Parameters
Script su invito
Solo gli utenti autorizzati dall'autore hanno accesso a questo script e ciò richiede solitamente un pagamento. Puoi aggiungere lo script ai tuoi preferiti, ma potrai utilizzarlo solo dopo aver richiesto l'autorizzazione e averla ottenuta dal suo autore - per saperne di più leggi qui. Per maggiori dettagli, segui le istruzioni dell'autore qui sotto o contatta direttamente splirus.
TradingView NON consiglia di pagare o utilizzare uno script a meno che non ci si fidi pienamente del suo autore e non si comprenda il suo funzionamento. Puoi anche trovare alternative gratuite e open-source nei nostri script della comunità.
Istruzioni dell'autore
Attenzione: prima di richiedere l'accesso, leggi la nostra guida per gli script su invito.
Declinazione di responsabilità
Script su invito
Solo gli utenti autorizzati dall'autore hanno accesso a questo script e ciò richiede solitamente un pagamento. Puoi aggiungere lo script ai tuoi preferiti, ma potrai utilizzarlo solo dopo aver richiesto l'autorizzazione e averla ottenuta dal suo autore - per saperne di più leggi qui. Per maggiori dettagli, segui le istruzioni dell'autore qui sotto o contatta direttamente splirus.
TradingView NON consiglia di pagare o utilizzare uno script a meno che non ci si fidi pienamente del suo autore e non si comprenda il suo funzionamento. Puoi anche trovare alternative gratuite e open-source nei nostri script della comunità.
Istruzioni dell'autore
Attenzione: prima di richiedere l'accesso, leggi la nostra guida per gli script su invito.