Wedge Pattern ProHello Traders!
Overview
Wedge patterns are among the most reliable chart formations in technical analysis, yet identifying them manually requires constant trendline drawing and subjective judgement about whether two converging lines truly form a valid wedge. The TRN Wedge Pattern indicator automates the detection of rising and falling wedges using a proprietary swing-based converging trendline analysis — delivering real-time pattern identification with automatic entry, stop loss, and take profit levels.
The indicator runs up to four concurrent detection sizes simultaneously, identifying wedge formations across multiple scales on a single chart. When a wedge breaks out, the indicator automatically computes entry, stop loss, and take profit levels, displays them on the chart, and tracks their outcome in a built-in statistics table. This gives traders a complete, structured framework for trading wedges — from pattern detection to trade evaluation.
What It Detects
The indicator identifies two core wedge types:
Rising Wedge
Forms when price makes higher highs and higher lows within converging trendlines
The lower trendline rises more steeply than the upper trendline, indicating weakening buying momentum
Classic breakout direction is downward (bearish)
Falling Wedge
Forms when price makes lower highs and lower lows within converging trendlines
The upper trendline falls more steeply than the lower trendline, indicating weakening selling momentum
Classic breakout direction is upward (bullish)
Detection is based on swing-based slope analysis of converging trendlines. The indicator uses a proprietary algorithm to compute slope relationships between swing highs and swing lows, validates convergence geometry, and filters for steepness and duration constraints — ensuring that only structurally valid wedges are identified. The trendlines are not drawn once and left static. As new swing points form within an active pattern, the trendlines dynamically update to reflect the best-fit converging lines, producing cleaner and more accurate wedge boundaries as the pattern evolves.
Feature List
Quad-size detection
Three target calculation modes
Reverse breakout support
Visualization of entry, stop-loss and take-profit levels
Pattern performance statistics
Calculation of risk-reward ratio
Breakout alerts
Customizable detection sizes and pattern length
Customizable look and feel
Quad-Size Detection
Unlike most wedge indicators that operate on a single detection scale, TRN Wedge Pattern runs up to four independent detection layers simultaneously. Each detection layer has its own swing sensitivity (Size) and maximum pattern length (Max Length), allowing traders to scan for micro wedges and macro wedges on the same chart at the same time. Each detection size is rendered in its own color — from subtle to prominent — so traders can instantly distinguish between small, emerging patterns and large structural formations. Detection sizes must be entered in ascending order. This multi-scale approach means a small wedge completing inside a larger wedge is visible on the same chart, providing context that single-scale detectors miss entirely.
snapshot
Breakout Targeting
Once a wedge breakout is confirmed — when price closes beyond the trendline boundary — the indicator automatically calculates and displays entry, stop loss, and take profit levels. The stop loss is placed at the most recent swing extreme opposite to the trade direction. The take profit is determined by one of three target calculation modes:
Fixed Risk Reward: Uses a configurable risk-reward multiplier (default 2.0) applied to the distance between entry and stop loss. For example, with a 2R target, if the risk is 50 points, the target is 100 points from entry.
Pattern Height: Uses the full height of the wedge pattern measured from its widest point. This mode ties the target directly to the pattern's geometry — larger wedges produce larger targets.
Max (Fixed RR, Pattern Height): Uses the larger of the two calculations, ensuring the target is at least as large as the fixed risk-reward but can be larger if the pattern's height exceeds it.
Reverse Breakout
Classic wedge theory predicts that a rising wedge breaks down and a falling wedge breaks up. But experienced traders know that wedge failures happen — and those failures are themselves tradeable setups. The optional reverse breakout mode enables trading in the opposite direction of the expected breakout. When activated, a rising wedge breaking upward or a falling wedge breaking downward also generates a trade signal with its own entry, stop loss, and target levels. The statistics table tracks reverse breakout performance separately, so traders can evaluate whether these counter-setups are profitable on their specific instrument and timeframe.
Pattern Performance Statistics
The built-in statistics table tracks historical pattern performance in real-time. For each trade direction (long, short, reverse long, reverse short), the table displays the number of occurrences, win rate, loss rate, expired trades (timeout), and cumulative R — the total risk-adjusted return across all trades. This allows traders to evaluate whether wedge patterns actually produce an edge on the asset and timeframe they are watching, rather than relying on theoretical expectations. The table supports Dark and Light theme presets and is fully customizable in position, text size, and styling.
How to Trade with this Indicator
Identify the Pattern
Add the TRN Wedge Pattern to your chart and look for wedge formations on the asset and timeframe of your choice. Wedges are detected in real-time. As the pattern develops, the indicator dynamically updates the trendlines until a breakout occurs or the pattern becomes invalid. You can use the built-in alerts to get notified when a breakout happens.
Check Pattern Statistics
Before entering a trade, check the statistics table. It shows how successful wedge breakouts have been historically on the asset and timeframe you are watching. If rising wedge breakdowns have a strong win rate but falling wedge breakouts do not, you can adjust your trade direction filter accordingly.
Breakout — Entry, Stop Loss and Target
When a breakout is confirmed, the indicator displays the entry price line (EP), stop loss line (SL), and take profit line (TP) directly on the chart. The entry is at the next bar open after the breakout candle closes beyond the wedge boundary. Set your stop-loss at the SL level and your take-profit at the TP level. The risk-reward ratio is displayed on the entry label.
Detection Sizing
Adjust the four detection sizes to match your trading style. Smaller swing sizes (e.g. 7) detect frequent, shorter-duration wedges suited for intraday trading. Larger swing sizes (e.g. 21–35) detect structural patterns more suited for swing or position trading. Each detection size has an independent Max Length setting that limits how far back in bars the pattern can extend.
Alerts
Rising Wedge Breakout (Short) — classic rising wedge breaking down
Falling Wedge Breakout (Long) — classic falling wedge breaking up
Rising Wedge Reverse Breakout (Long) — rising wedge breaking upward
Falling Wedge Reverse Breakout (Short) — falling wedge breaking downward
Any Classic Wedge Breakout — any breakout in the expected direction
Any Wedge Breakout — any breakout in any direction
What Makes This Indicator Unique
Standard wedge detection tools typically use fixed lookback windows and detect only one pattern scale at a time. TRN Wedge Pattern takes a fundamentally different approach: four independent detection layers run concurrently with proprietary swing-based trendline analysis that dynamically refines pattern boundaries as new data arrives. The result is more precise wedge detection across multiple timeframe scales simultaneously. The addition of reverse breakout tracking and per-direction performance statistics provides a level of analytical depth that goes beyond basic pattern detection — enabling traders to make data-driven decisions about which wedge setups are worth trading on their specific instrument.
Key Settings
Detection Sizes 1–4: Swing sensitivity for each detection layer. Must be in ascending order. Each size has an independent Max Length to limit pattern duration. Defaults: 7, 14, 21, 35.
Trade Directions: Filter for Long + Short, Long Only, or Short Only.
Target Type: Fixed Risk Reward, Pattern Height, or Max of both. Default: Fixed Risk Reward at 2.0R.
Reverse Breakout: Enable to also detect and manage breakouts in the non-classic direction. Includes independent target type for reverse trades. Default: Off.
Log Scale: Enable for correct slope calculations on instruments with large price ranges. Recommended for most assets. Default: On.
Trade Timeout: Maximum trade duration in bars. If neither target nor stop loss is reached within this window, the trade counts as expired in the statistics. Default: 500 bars.
All visual elements — pattern fill colors, outline styles, line widths, trade visualization colors, and statistics table styling — are fully customizable.
Designed to provide a structured, data-driven framework for trading one of the most established patterns in technical analysis.
Risk Disclaimer
The content, tools, scripts, articles, and educational resources offered by TRN Trading are intended solely for informational and educational purposes. Remember, past performance does not ensure future outcomes.
Pine Script® göstergesi






















